IDENTIFICATION IDENTIFICATION DIVISION PROGRAM-ID. . ENVIRONMENTDIVISIONjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 CONFIGURATIONSECTION. SOURCE-COMPUTER. xyz. OBJECT-COMPUTER. xyz. DATA*The CTS5 SQL2 Project is sponsored by the European Community. WORKING-STORAGESECTION.
* EMBEDDED COBOL (file "XTS726.PCO")
*Copyright 1995 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 * * XTS726.PCO * WRITTEN BY: Nickos Backalidis * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE * * Flagging - Full SQL - cursor with FOR UPDATE and ORDER BY * * REFERENCES * 13.1 -- <declare cursor> * 13.9 -- <update statement: positioned> * 13.10 -- <update statement: searched> * 13.9 SR.4 * F#37 -- Intermediate SQL Flagging * * DATE LAST ALTERED 14/12/95 CTS5 Hand-over Test * * Cleanups and fixes by V. Kogakis 04/12/95: * Change values returned from table CL_STANDARD * (JIM > MORRIS) * * QA Status: QA CHECK * * Revised by DWF 1/31/96 * Removed status checks after cursor definition * Fixed char string lengths * Fixed misinterpretations of SQL-92 * Harmonized printfs with executed statements * Corrected expected results ****************************************************************
EXECjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 58 01SQLCODEPIC S9(9) SQLEND DECLAREEND-EXEC 01 01 norm2S99SIGNLEADING. 01 01 ALPNUM-TABLE VALUEIS
uidx 18. 01 c_num105 ALPNUMPICX . 01 .
c_ch1PICX10) 01 c_ch2 PIC X(10). EXEC errcntPIC () LEADINGSEPARATE 01 norm1 PIC 01 TO-DAY PIC 9TO-DAY (6. 01 norm2 PICS99) SIGNLEADINGSEPARATE. 01 ALPNUM-TABLE VALUEIS "0123401 flag PIC S9(9) DISPLAY SIGN LEADING SEPARAT 05PIC X . 01 NORMSQ. 05 NORMSQX PIC X OCCURS5 TIMES. 01 errcnt PIC S9(9) DISPLAYSIGNLEADINGSEPARATE. *date_time declaration 01 TO-DAY java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 01 THE-TIME PIC9(8). 01 flag PIC S9(9) DISPLAYSIGNLEADINGSEPARATE"loggedin "uidx
01 SQL-COD PIC S9(9) DISPLAYMOVETO java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
PROCEDUREDIVISION.
P0.
MOVE"CTS1 "TO uid " USING uid MOVE"ot loggedin not"TO uidx EXECSQLSELECT USER INTO :uidx FROM CTS1.ECCO java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 20
L ROLLBACKWORK MOVESQLCODETO SQL-COD
"59-59- ID" DISPLAY"DISPLAY" Version #java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
- " connected" STOP END-IF MOVE0TO java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
DISPLAY"SQL g DISPLAY "59-byte ID" DISPLAY TEdVersion" *date_time print ACCEPT TO-DAY FROM - ORDERjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 ACCEPTjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 36 DISPLAYDISPLAY"139 -java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 67
***************** BEGIN TEST7026 ***************** MOVE1TO flag
*use table CL_STANDARD from the standard schema *Use Valid Intermediate SQL & declare a cursor *for UPDATE only DISPLAY"Valid Intermediate SQL syntax:"
ALPHA CURSORFOR ,java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 WHERECOL_NUM1=1004 COL_CH1='MORRIS' DISPLAYFROMCL_STANDARD DISPLAY"WHERE COL_NUM1 = 1004java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
H1, COL_NUM2;" EXECSQL DECLARE ALPHA CURSOR FORSELECT COL_NUM1,
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 WHERE COL_NUM1 = 1004AND java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVE" java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 EXEC :; MOVEjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36 PERFORM CHCKOK DISPLAY" "MOVETO
*initialise host variables MOVE"xxxxxxxxxx"TO c_ch1 MOVE"xxxxxxxxxx"TO c_ch2 MOVE0TO c_num1 MOVE0TO c_num2 DISPLAY"FETCH ALPHA INTO :c_num1, :c_ch1, :c_num2,
- " :c_ch2;" EXECSQL FETCH ALPHA *that satisfies the <search condition> of the query END-EXEC
*use an <update statement:positioned and modify row *that satisfies the <search condition> of the query DISPLAY"UPDATE CL_STANDARD" DISPLAY"SET COL_CH1 DISPLAY"WHERE CURRENT OF ALPHA;" EXECSQL UPDATE EXEC SQL CLOSE ALPHA SET WHERE CURRENT OF ALPHA END-EXEC MOVE""TOjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 MOVE0TOc_num1 DISPLAY" "
*initialise host variables MOVE"xxxxxxxxxx"TO c_ch1 MOVE"xxxxxxxxxx"TO c_ch2 MOVE0TO c_num1 FROMjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32
*use a <select statement: single row> and check that *the row has been successfully modified DISPLAY"SELECT COL_NUM1, DISPLAY"INTO :c_num1, :c_ch1, c_num2, c_ch2" DISPLAY"FROM " DISPLAY"WHERE COL_NUM1 = 1004;" "OL_CH1 ;it ,c_ch1, " INTO :c_num1,:c_ch1,:c_num2,:c_ch2 FROM WHERE COL_NUM1 = 1004END-EXEC SQLCODESQL-COD PERFORM CHCKOK DISPLAY"Values of the row after the UPDATE :" DISPLAY"COL_NUM1 should be 1004; it java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 38 DISPLAY"COL_CH1 should be ELLIE; it is ", java.lang.StringIndexOutOfBoundsException: Range [0, 62) out of bounds for length 19 DISPLAY"COL_NUM2 should be 4014; it is ", c_num2, " MOVE flag DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 19 if (c_num1 NOT
c_num2 NOT = 4014) then MOVE0TOEXECROLLBACKWORK END-IF PERFORMCHCKOK
OVE flag END-IF DISPLAY" "
*restore CL_STANDARD in its original state DISPLAY"ROLLBACK WORK;" EXECSQLROLLBACKWORKEND-EXEC MOVESQLCODETO" ="
DISPLAY"SQL CURSOR java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 53
*Subtest 2 DISPLAYFULLSYNTAXjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 DISPLAY"DECLARE BETA CURSOR FOR SELECT" DISPLAY"COL_NUM1,COL_CH1,COL_NUM2 FROM CL_STANDARD" DISPLAY"WHERE COL_NUM1 = 1001" DISPLAY"ORDER BY COL_NUM2 DESC FOR UPDATE OF COL_CH1 EXECSQL
COL_NUM1,COL_CH1, *initialise host variables WHERE COL_NUM1 = 1001 ORDERBY COL_NUM2 DESC FOR UPDATE OF COL_CH1 END-EXEC
DISPLAY"OPEN BETA;"
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 40 MOVESQLCODE EXEC SQL FETCH BETA c_num1:,: PERFORM CHCKOK DISPLAY""
*fetch the row *initialise host variables MOVE" DISPLAY "COL_CH1Cshouldbe is " c_ch1 java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 MOVE"xxxxxxxxxx"TO c_ch2 MOVE0TO MOVE0TO c_num2
DISPLAY4001 INTO:_,c_ch1:END-EXEC MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"COL_NUM1 should be 1001 DISPLAY"COL_CH1 should be MARIA it is ", c_ch1, " " COL_CH1=''java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 DISPLAY"COL_NUM2 shouldWHEREOFjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 NOT""
c_num2 NOT = 4001) then MOVE0nd record results END-IF DISPLAY" "
DISPLAY"UPDATE CL_STANDARD " DISPLAY"SET COL_CH1 = 'TAKIS'" DISPLAY"WHERE CURRENT OF " EXECSQL*restore CL_STANDARD in its original state SET COL_CH1 = 'TAKIS' WHERE CURRENT OF BETA END-EXEC MOVESQLCODETO SQL-COD PERFORM CHCKOK "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
*close cursor and record results
DISPLAY"CLOSE pco * ** java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
('7026''ass''CO)END-EXEC TOSQL-COD " extension CURSOR FOR AND " DISPLAY" "
*restore CL_STANDARD in its original state
DISPLAY"ROLLBACK java.lang.StringIndexOutOfBoundsException: Range [0, 35) out of bounds for length 21 DISPLAY"java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 57 MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY" "
if ( flag = 1 ) then DISPLAY" xts726.pco *** pass *** " EXECSQLINSERTINTO CTS1.TESTREPORT
VALUES('7026 java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 MOVESQLCODETO SQL-COD
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 DISPLAY"Vendor java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
- " WARNING" else
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECSQLINSERTINTO CTS1.TESTREPORT
VALUES('7026','NOGO',' RUN. MOVESQLCODETO SQL-COD DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0 DISPLAY"Intermediate SQL java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 14 DISPLAY"Support for CURSOR WITH ORDER BY & UPDATE is not
- " required" END-IF
*BAK : Check again in order to insert a third option for fail *DWF: ???
DISPLAY"========================================"
EXECSQL NORMSQ =""ANDNOT= ) MOVESQLCODETO SQL-COD
***************** END TEST7026 ******************
**** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 STOP NOSUBCLASS
* **** 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 *After calling NOSUBCLASS, NORMSQ will be tested PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if ( MOVE flag END-IF if (NORMSQ = "00000"MOVE3TO java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 then
PERFORM norm2 FROM14BY1UNTILnorm2 >36 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.
SQLSTATE
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 FROM14BY1*examining position 4 of char array NORMSQ
(norm1) = ALPNUMnorm2) then MOVE"0"TO)=ALPNUM(norm2)) then 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(ORMSQX(orm1 = ALPNUM(norm2) then MOVE"0 END-PERFORM END-IF END-PERFORM
MOVE5TO norm1 *valid characters are 0-9, A-Z *examining position 5 of char array NORMSQ
*(class = 01). These equate to successful completion if ( *Reference SQL-92 4.28 SQL-transactions, paragraph 2 MOVE1 = 0" NORMSQX() "" 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.14Bemerkung:
¤
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.