IDENTIFICATION java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 29 PROGRAM-ID. YTS794. ENVIRONMENTDIVISION. CONFIGURATIONSECTIONjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 SOURCE-COMPUTER. =)then OBJECT-COMPUTER. xyz. DATADIVISION. WORKING-STORAGESECTION.
* EMBEDDED COBOL (file "YTS794.PCO")
*Copyright 1996 National Computing Centre Limited, *and Computer Logic R&D S.A *on behalf of the CTS5 SQL2 Project. *All rights reserved. *The CTS5 SQL2 Project is sponsored by the European Community. * *The National Computing Centre Limited and Computer Logic R&D *have given permission to NIST to distribute this program *over the World Wide Web in order to promote SQL standards. *DISCLAIMER: *This program was reviewed by employees of NIST for *conformance to the SQL standards. *NIST assumes no responsibility for any party's use of *this program.
**************************************************************** * * COMMENT SECTION * * SQL VALIDATION TEST SUITE V6.0 * * YTS794.PCO * WRITTEN BY: Susan Watters * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE * * GRANT USAGE on character set, no WGO * * * REFERENCES * 11.28 <character set definition> * 11.36 <grant statement> * 10.3 <privileges> * 11.3 <table definition> * 11.4 <column definition> * 16.4 <set session authorization identifier statement> * F#45 Character set definition * F#32 User authorisation * F#3 Basic schema manipulation * F#2 Basic information schema * * DATE LAST ALTERED 02.01.96 CTS5 Hand-over Test * * QA Status: Full FC * * Revised by DWF 1996-03-22 * Added rollback after authid * Fixed charset usage * Fixed bad schema refs * Fixed SDL transactions ****************************************************************
EXECSQL BEGIN DECLARE SECTIONEND-EXECEXECSQLGRANT ONCHARACTERSET .CS2 TOCTS4 01PIC(9) COMP. 01 SQLSTATE PIC X(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 01 ggt SQLCODEbe ;its valueis"SQL-COD PICX18. 01 uidx PIC X(18). EXECSQLEND DECLARE SECTIONEND-EXEC 01 norm1 PIC S9(9) DISPLAYSIGNLEADINGMOVE java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 01 norm2 ()DISPLAYSIGNLEADINGSEPARATEjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 01 ALPNUM-TABLE VALUEIS 01234ABCDEFGH56789IJKLMNOPQRSTUVWXYZ 0TOflag
END-I 05 NORMSQX if (NORMSQ " NORMSQ ) 01 errcnt PIC S9(9) DISPLAYSIGNLEADING java.lang.StringIndexOutOfBoundsException: Range [0, 57) out of bounds for length 17 *date_time declaration 01 TO-DAY PIC" WORK;" 01THE-TIMEPIC()java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 01 flag PIC S9(9) DISPLAY( ()java.lang.StringIndexOutOfBoundsException: Range [46, 42) out of bounds for length 65
01 SQL-COD PIC S9(9) DISPLAYSIGNLEADINGSEPARATE.
PROCEDUREDIVISION.
P0.
MOVE" MOVE TO CALL CHCKOK MOVE"not logged in, not"TOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECSQLSELECT : FROM.ECCOEND-EXEC
SQL-COD EXECSQLROLLBACK WORK END-EXEC MOVE if (uid NOT DISPLAYERROR: ",uid,"expected User" ,"
- " connected" STOPRUN END-IF MOVE0TO errcnt
DISPLAY"SQL Test Suite, java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 36 DISPLAY "59-byte ID"
DISPLAYSELECT* gFROMTB *date_time print ACCEPT TO-DAY FROMDATE ACCEPT THE-TIME FROMTIME
DISPLAY " shouldbe 'ef' was "
******************** BEGIN TEST7528 ******************* MOVE java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
DISPLAY" TEST7528 " DISPLAY" GRANT USAGE on java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 19 DISPLAY References DISPLAY" 11.28 <character set definition>" DISPLAY" 11.36 <grant statement>" DISPLAY" 10.3 <privileges>" DISPLAY" 11.3 <table definition>" DISPLAY" 11.4 <column definition>" DISPLAY" 16.4 <set session PERFORMCHCKOK
- " statement>" DISPLAY*ensure database is left in a consistent state "DROPTABLE CASCADE" DISPLAY F32 User" DISPLAY" F#3 DISPLAY" F#2 Basic java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 25 DISPLAY" - - - - - - - - - COMMIT
COMPUTESQLCODE = -1 MOVE"xxxxx"TO SQLSTATE
DISPLAY"This program is the java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
cGRANT acharset no
- " GRANT OPTION" DISPLAY""
*That should generate an Syntax Rule or Access Rule Violation *which is SQLSTATE 42000
DISPLAY"SQLCODE should be < 0; its value is COMPUTE errcnt =errcnt 1
========================="
" should be 42000; its is", PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if**** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
0 flag END-IF if ( then DISPLAY" *Test SQLCODE and SQLSTATE for normal completion. END-IF "
DISPLAY" WORK;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 EXECSQLCOMMIT WORK END-EXEC MOVE0TOflag
*create table using character set
DISPLAY"CREATE TABLE java.lang.StringIndexOutOfBoundsException: Range [13, 1) out of bounds for length 17
(TBCCHARACTER3CHARACTERSETCTS1CS2; EXECSQL
(TBCjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVESQLCODE* SQLSTATE will be printed. PERFORM CHCKOK
SPLAY
*subclass begins inposition3of char array NORMSQ *valid subclass begins with 5-9, I-Z, end of ALPNUM table EXECSQLCOMMIT WORK END-EXEC
SQLCODE TOSQL-COD PERFORM DISPLAY
*insert value into table
DISPLAY"INSERT INTO TB *Changed NORMSQ means implementation-defined subclass,
(ORMSQ )then MOVETOSQL-COD PERFORM DISPLAY" "
DISPLAY" *examining position 4 of char array NORMSQ EXEC PERFORM VA FROM1BY1 >36 MOVESQLCODETO MOVE"0 (norm1) DISPLAY"value returned should END-PERFORM
(ggtNOT d" MOVE0*valid characters are 0-9, A-Z END-IF
DISPLAY"OMMIT WORK;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
" WORK;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 EXECSQLCOMMIT WORK END-EXEC. MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY" "
EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD ******************** END TEST7528 ********************
**** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 STOPRUN.
* **** Procedures for PERFORM statements
*Test SQLCODE and SQLSTATE for normal completion.
CHCKOK. DISPLAY"SQLCODE should be 0; its value is ", SQL-COD DISPLAY"SQLSTATE should be 00000; its value is ", SQLSTATE PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODENOT = 0OR NORMSQ NOT = "00000") then MOVE0TO flag END-IF if (NORMSQ = "00000"AND NORMSQ NOT = SQLSTATE) then DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF
.
NOSUBCLASS.
*This routine replaces valid implementation-defined *subclasses with 000. This replacement equates valid *implementation-defined subclasses with the 000 value *expected by the test case; otherwise the test will fail. *After calling NOSUBCLASS, NORMSQ will be tested * SQLSTATE will be printed.
MOVE SQLSTATE TO NORMSQ
MOVE3TO norm1 *subclass begins in position 3 of char array NORMSQ *valid subclass begins with 5-9, I-Z, end of ALPNUM table PERFORMVARYING norm2 FROM14BY1UNTIL norm2 > 36 if (NORMSQX(norm1) = ALPNUM(norm2)) then MOVE"0"TO NORMSQX(norm1) END-IF END-PERFORM
*Quit if NORMSQ is unchanged. Subclass is not impl.-def. *Changed NORMSQ means implementation-defined subclass, *so proceed to zero it out, if valid (0-9,A-Z) if (NORMSQ = SQLSTATE) then GOTO EXIT-NOSUBCLASS END-IF
MOVE4TO norm1 *examining position 4 of char array NORMSQ *valid characters are 0-9, A-Z PERFORMVARYING norm2 FROM1BY1UNTIL norm2 > 36 if (NORMSQX(norm1) = ALPNUM(norm2)) then MOVE"0"TO NORMSQX(norm1) END-IF END-PERFORM
MOVE5TO norm1 *valid characters are 0-9, A-Z *examining position 5 of char array NORMSQ PERFORMVARYING norm2 FROM1BY1UNTIL norm2 > 36 if (NORMSQX(norm1) = ALPNUM(norm2)) then MOVE"0"TO NORMSQX(norm1) END-IF END-PERFORM
*implementation-defined subclasses are allowed for warnings *(class = 01). These equate to successful completion *SQLSTATE values of 00000. *Reference SQL-92 4.28 SQL-transactions, paragraph 2
if (NORMSQX(1) = "0"AND NORMSQX(2) = "1") then MOVE"0"TO NORMSQX(2) END-IF
.
EXIT-NOSUBCLASS. EXIT.
Messung V0.5 in Prozent
¤ Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.0.5Bemerkung:
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.