IDENTIFICATIONDIVISIONjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 PROGRAM-ID. -java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
ACCEPT DATE CONFIGURATIONSECTION. SOURCE-COMPUTER. xyz. OBJECT-COMPUTER. xyzjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 DATADIVISIONjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 WORKING-STORAGE .
* EMBEDDED COBOL (file "YTS813.PCO")
*Copyright 1996 National Computing Centre Ltd, *and Computer Logic R&D S.A *on behalf of 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 * * YTS813.PCO * WRITTEN BY: Susan Watters * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE * * This routine tests <null predicate> with * (numeric value expression> in <row value constructor> * * * REFERENCES * 8.6 GR2 <null predicate> - IS NULL * 8.6 GR3 <null predicate> - IS NOT NULL * 6.12 GR1 <numeric value expression> * 6.2 GR7 <value specification> and <target specification> * 13.5 GR2b <select statement : single row> * F#48 Expanded null predicate * * DATE LAST ALTERED 02.01.96 CTS5 Hand-over Test * * QA Status: Full FC * * Revised by DWF 1996-04-03 * Added rollback after authid * Removed EXEC SQL from printfs * Renamed variable * Fixed expected results ****************************************************************
DISPLAYVALUES234)java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69 01SQLCODEPIC S9(9) java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 " 01 java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 61 01 ( . 01 uid PIC X(18). 01 uidx PIC X(18). EXECSQLEND DECLARE SECTIONEND-EXEC 01TO
01 ALPNUM-TABLE "01234 PIC36 TIMES. 01 NORMSQ. 05 NORMSQX PICSQL CTS1PROJ_DURATION (,6 ) 01 errcnt PIC S9(9) DISPLAYSIGNLEADINGSEPARATE. *date_time declaration 01 TO-DAY PIC9( DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 PIC ()DISPLAYSIGNLEADINGSEPARATE.
01 SQL-COD PIC S9
PROCEDUREDIVISION.
P0.
DISPLAY"ROM P" ""USINGuid MOVESELECTCOUNT * val1 EXECSQLSELECT USER INTO :uidx FROM CTS1 FROM . SQLCODETO EXECSQLROLLBACK WORK MOVETO if (uid NOT = uidx) thenDISPLAY" expected was 2, value returned was ", val1 DISPLAY"ERROR: User ", uid, " expected. User ", uidx, "
- " connected" STOPRUN END-IF MOVE0TO errcnt
DISPLAY"SQL Test Suite, V6.0st Suite, V6. Embedded COBOL pjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 DISPLAY "59- MOVE0TO java.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29 DISPLAY"TEd Version #" *date_time print ACCEPT TO-DAY FROMDATE ACCEPT THE-TIME FROMTIME DISPLAYDate YYMMDD TO-DAY"at THE-TIME
******************** BEGIN TEST7570 ******************* MOVE1TO flag
DISPLAY" TEST7570" DISPLAY" <null predct>, <numrc val expr> in <java.lang.StringIndexOutOfBoundsException: Range [0, 64) out of bounds for length 39
-"cons>" DISPLAY"References:" " . null >-IS " DISPLAY" 8.6 EMP_HOURS IS NULL "6 numeric expression>" DISPLAY" 6.2 GR7 <value specification> and" DISPLAY" <java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 0 DISPLAY" 135 GR2b select statement:single " DISPLAY" F#48 Expanded null predicate" DISPLAY" - - - - - CHCKOK
COMPUTESQLCODE = -1 MOVE"xxxxx"TO
*Prepare database for test
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
- " EMP_HOURS)" DISPLAY"VALUES (1, 2);"
SQL INTOjava.lang.StringIndexOutOfBoundsException: Range [72, 38) out of bounds for length 72 DISPLAY"1 expected,"" MOVESQLCODETO SQL-COD PERFORMCHCKOK DISPLAY" "
*count rows where TIME_LEFT + EMP_HOURS is not NULL
*initialise host variable
99val1
SELECT * :al1 DISPLAY"FROM CTS1.PROJ_DURATIONEND-IF DISPLAY" + ;java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 EXECSQLSELECTCOUNT (*) INTO :val1 FROM CTS1PROJ_DURATION WHERE TIME_LEFT + 0TOflag
PERFORM CHCKOK DISPLAYjava.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 72 if (val1 MOVE0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*declare a cursor to return MONTHS when TIME_LEFT- EMP_HOURS is
CURSORFOR DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 DISPLAYWHEREEMP_HOURS- NULLjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58 DISPLAYSET=" EXECSQL DECLARE data813 CURSOR FOR FROM.java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 WHERE EMP_HOURS - WHERE EMP_HOURS * :val1 INDICATOR NULL ORDERBYSQLCODE SQL-COD
DISPLAY"FETCH data813 INTO 0 TO EXECSQL NORMSQ="2000"ANDNORMSQ ) DISPLAY Validimplementation-defined. PERFORM CHCKOK
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 19 if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 END-IF
*initialise host variables
MOVE99TO val1
DISPLAY" WHERE =9;" EXEC SQL COUNT* INTO: TO SQL-COD 9END-EXEC
ed, " " if (val1 NOT = 3) then MOVE0TO flag END-IF
DISPLAY"FETCH data813 INTO :val1;" EXECSQL FETCHdata813 :val1 END-EXEC MOVESQLCODETO SQL-COD
*That should generate a no data exception *which is SQLSTATE 02000
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 if (SQLCODENOT = MOVE0TO flag END-IF DISPLAYjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 33 PERFORM NOSUBCLASS THRU java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 if (NORMSQ NOTSET java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 MOVE0TO flag END-IF ifNORMSQ="" =SQLSTATE then
java.lang.StringIndexOutOfBoundsException: Range [15, 1) out of bounds for length 33 END-IF
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
*execute update statement
*put negative value into null indicator
DISPLAY"indic1 = -99;" COMPUTE indic1 = -99
*put random value into host variable
DISPLAY"ROMCTS1P" MOVE34TO val1
UPDATEPROJ_DURATION DISPLAY"SET TIME_LEFT = 9"FROMCTS1PROJ_DURATION DISPLAYWHEREEMP_HOURS val1 :IS
- " NULL;"
ATE CTS1PROJ_DURATION SET TIME_LEFT = 9 WHERE EMP_HOURS * " expected 3 value returned is "val1 END-EXEC MOVESQLCODETO SQL-COD
DISPLAY"SQLCODE should be 100java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 if (SQLCODENOT = 100) then MOVE0TO flag END-IF "QLSTATEshould 02000 its valueis "SQLSTATE PERFORM NOSUBCLASS THRU java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 28 if (NORMSQ NOT java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 57 MOVE IF if (NORMSQ then DISPLAY"SQLCODETO PERFORM DISPLAY" indic1 -;its is ,indic1
*check no rows have been updated
MOVE99TO val1
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY"FROM CTS1.java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 0 DISPLAY"EXEC ROLLBACK END-EXEC COUNT* : FROM CTS1.PROJ_DURATION WHERE TIME_LEFT = 9END-EXEC MOVESQLCODETO java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0 PERFORM CHCKOK DISPLAY"value expected is 0, value returned is ", val1 if (val1 NOT = 0) then MOVE flag END-IF
*execute an update statement where indic1 is positive
DISPLAY"UPDATE CTS1.PROJ_DURATION " DISPLAY"SET EMP_HOURS = 3 " DISPLAY java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
-"NULL" EXECSQL UPDATE CTS1.PROJ_DURATION SET EMP_HOURS = 3 WHERE EMP_HOURS * :val1 INDICATOR :indic1 ISNOTNULL END-EXEC******************** END TEST7570 ******************** MOVESQLCODETO SQL-COD **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
SPLAY""
*check relevent rows have been updated
MOVE99TO val1 DISPLAY"SELECT COUNT (*) INTO *Test SQLCODE and SQLSTATE for normal completion.
DISPLAY SQLCODE should be0;itsvalueis", SQL-COD DISPLAY"WHERE EMP_HOURS = 3;" EXECSQLSELECTDISPLAY" shouldbe 00000 itsvalue ",SQLSTATE FROM CTS1.PROJ_DURATION WHERE EMP_HOURS = 3END-EXEC MOVE SQL-COD PERFORM CHCKOK DISPLAY"value expected is 3, value returned is ", val1 if (val1 NOT = 3) if (NORMSQ = "00000" AN NOT=SQLSTATE) MOVE0TO flagthen END-IF
*check row containing null value in EMP_HOURS has not been updat
*initialise host variables
MOVEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVE99TO val1
DISPLAY"SELECT EMP_HOURS *After calling NOSUBCLASS, NORMSQ will be tested DISPLAY"FROM CTS1.PROJ_DURATION" DISPLAY"WHERE MONTHS = 3;"
EXECSQLSELECT EMP_HOURS INTO :val1:indic1 FROM CTS1.PROJ_DURATION WHERE* SQLSTATE will be printed. MOVESQLCODEMOVETO PERFORM 3TOjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 DISPLAY"indic1 should norm2 FROM 14 1 UNTIL >36 if (indic1 NOT (norm2)then MOVE END-IF
*ensure database is left in a consistent state
DISPLAY"ROLLBACK WORK" EXECSQLROLLBACK WORK END-EXEC MOVESQLCODETO SQL-COD PERFORM CHCKOK
java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 25
EXECSQL WORK MOVESQLCODETO SQL-COD ******************** END TEST7570 ********************
**** 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 ", java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY"SQLSTATE should be 00000; its value is ", SQLSTATE PERFORM THRUEXIT-NOSUBCLASS if (SQLCODENOT = MOVE0TO java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 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"TONORMSQXnorm1) 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
(1=" 2 ="" MOVE"0"TO NORMSQX(2) END-IF
.
EXIT-NOSUBCLASS.
EXE SQLROLLBACKEND-EXEC
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.8Bemerkung:
¤
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.