* DATE 1996-04-17 EMBEDDED COBOL LANGUAGE PROGRAM-ID* DISCLAIMER: * implementations for conformance to the SQL standards. CONFIGURATIONSECTION. SOURCE-COMPUTER. xyz * OBJECT-COMPUTER. xyz. DATADIVISION. WORKING-STORAGESECTION.
* EMBEDDED COBOL (file "DML164.PCO")
**************************************************************** * * COMMENT SECTION * * DATE 1996-04-17 EMBEDDED COBOL LANGUAGE * SQL VALIDATION TEST SUITE V6.0 * DISCLAIMER: * This program was written by employees of NIST to test SQL * implementations for conformance to the SQL standards. * NIST assumes no responsibility for any party's use of * this program. * * DML164.PCO * WRITTEN BY: David Flater * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE * * This routine tests Intermediate SQL. * * REFERENCES * FIPS PUB 127-2 14.2 Intermediate SQL * ANSI SQL-1992 * ****************************************************************
EXECPIC (java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
01 PICS9
0DATE 1996-0 PIC(9) ISPLAYLEADINGSEPARATE
01 uid PIC X(18).
0 * DISCLAIMER:
0 * This program was written by employees of NIST to test SQL
java.lang.StringIndexOutOfBoundsException: Range [70, 7) out of bounds for length 26 PIC X9.* this program.
001T PIC ()java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
0 wrd7)
01 wrd2 PIC X(20).
01 cnt1 PIC
1 PIC X(1)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 SQLSECTION
01 norm1 PIC P0
01 PIC (9) DISPLAYLEADING.
01 ALPNUM-TABLE VALUEIS "01234ABCDEFGH56789IJKLMNOPQRSTUVWXYZ".
05 ALPNUM PIC X OCCURS 36 TIMES.
01 NORMSQ.
05 NORMSQX PIC X OCCURS 5 TIMES.
01 errcnt PIC S9(9) DISPLAYSIGNLEADINGSEPARATECALL AUTHIDuid *date_time declaration SQL USER INTO:uidx FROM HU.ECCO * FIPS PUB 127-2 14.2 Intermediate SQL
01 flag PIC S9(9) DISPLAYSIGNLEADINGSEPARATE.
01 SQL-COD PIC S9(9) DISPLAYSIGNLEADINGSEPARATE.
PROCEDUREDIVISION. EXEC = ) then
MOVE"FLATER " - "connected"" CALL"AUTHID"USINGEND-IF MOVE"not logged in,not EXEC"5-byte " MOVE SQLCODE TO-DAY FROMDATE EXECSQL ROLLBACK WORK END-EXEC MOVE SQLCODE TO SQL-COD if (uid NOT = uidx) then DISPLAY"ERROR: User 01 SQLSTATEPICX(5).
- " connected" STOPRUN END-IF MOVE 0 TO errcnt
0 ******************** BEGIN TEST0867 ******************* DISPLAY "5901kywd3PICX(3). DISPLAY"TEd Version #" *date_time print ACCEPT TO-DAY 0 kywd9 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 ACCEPTTHE-TIME TIME
D"F28LIKEenhancements""
******************** BEGIN TEST0867 *******************
Ojava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
DISPLAY" TEST0867" DISPLAY" LIKE enhancements: keyword search" DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" 0 *correct length. *These queries are similar to what might be generated by a progr
COMPUTE SQLCODE = -1 MOVE"xxxxx"TO SQLSTATE
*Carmelo: in translations, replace varchars with strings of the *correct length.
*These queries are similar to what might be generated by a progr *to do keyword searches.
1ALPNUM-TABLE IS DISPLAY"SELECTCOUNT() :cnt1" DISPLAY" FROM TIDES.LOCATIONS" DISPLAY LOC_NAME'||kywd3| '" DISPLAY ISPLAYORLOC_NAME ''0 java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 DISPLAY" OR FROMTIDES *date_time declaration COUNT*I cnt1 FROM TIDES.LOCATIONS
LOC_NAME '% | |'%java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
LOC_NAME ' LOC_NAME = kywd3END-EXEC OR LOC_NAME=:kywd3 END-EXEC PERFORM CHCKOK
01SQL-COD S9 3then
cnt1 java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 MOVE flag
"" java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 SQLINTO HU END-EXEC
MOVE 0 TO cnt1 DISPLAY"SELECT LOC_ID INTO :cnt1" DISPLAY" LOC_NAME= :;" DISPLAY" WHERE LOC_NAME LIKE ' ' | kywd9 | ''java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
ISPLAYOR DISPLAY" OR LOC_NAME = :kywd9; WHERELOC_NAMELIKE % '| kywd9 ifNOT = uidx EXEC''||:|'%java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
.
LOC_NAME%'||: |'% OREND-IF
LOC_NAMEkywd9 MOVE SQLCODE TO SQL-COD TO PERFORMSuite0Embedded,java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 61
Y"cnt1 1;ivalueis"cnt1 if (cnt1 NOT = 10) then
0 TO END-IF
EXECSQLSELECT 'SELECT LOC_ID FROM TIDES.LOCATIONS' ' OR LOC_NAME LIKE ''' | ? '%' ' OR LOC_NAME LIKE ''%'' || ' ( LIKE |'%' ' OR LOC_NAME = ? MOVE1TO flag ' AND (LOC_NAME LIKE 'OR ?' ' ORLOC_NAMELIKE '%'| "References" 'OR LOC_NAME SQLCODE TOS
.END-EXEC MOVE OMPUTE = -
DISPLAY"longst = "EXEC PREPARE
EXECSQL PREPARE S0867 MOVEDISPLAYkywd3= 'Keyjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 PERFORMDISPLAY"ALLOCATE 'java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 DISPLAY" "
DISPLAY"DECLARE PERFORMCjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
E SQL C0867 FOREND-EXEC
DISPLAY"SET DESCRIPTOR ' EXECSQL SELECTCOUNT(*)INTO: MOVE.LOCATIONS
QLCODE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 PERFORMCHCKOK "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
= 1java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 MOVE 1 TO cnt1DATAkywd6 END-EXEC SET'D0867 VALUE:" DISPLAYDISPLAY"cnt1should be1;i is", cnt1 DISPLAY 6" DISPLAYDATATO SQLDESCRIPTOR' :cnt1
TYPE " MOVE2TO cnt1 LENGTH=6, DATA = kywd6 ," MOVE SQLCODE TO SQL-COD PERFORM DISPLAY" "
DISPLAY"cnt1 = 2;"
OVELENGTH=6, DISPLAY"SET DESCRIPTOR 'D0867' DATA = :kywd6END-EXEC
ISPLAY ,java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 DISPLAY" LENGTH = 6," " DATA = :kywd6;" EXECSQLEXEC OVETOjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
TYPE DISPLAY" 1O =:END-EXEC DATA = :kywd6 END-EXEC MOVETOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
SQLif ( NOT 1)then
DISPLAY"cnt1 = 3;"
DESCRIPTORVALUE DISPLAYD " ='London"
ISPLAY =6, DISPLAY" DATA = :kywd6 PERFORM CHCKOKd wrd7 EXECSQL ISPLAY
TYPE
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 26 DATA kywd6 MOVE' LOC_NAME LIKE '%'| ? || '' PERFORM CHCKOK ""
cnt14
cnt1 DISPLAY"SET AND LOC_NAMELIKE DISPLAY" =java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 EXEC QL DESCRIPTOR'ALUE:java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 DISPLAY" = 7, DISPLAY" DATAM SQL-COD MOVETOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
=7 DATAEXECDISPLAYcnt1 5;" MOVE SQLCODE TO SQL-COD PERFORMCHCKOK DISPLAY" "
DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 MOVELENGTH, DISPLAY" D0867 VALUE:"
SQLCODE SQL-COD DISPLAY" LENGTH = 7,"PERFORM DISPLAY" DATA = :wrd7;" SQL DESCRIPTOR''VALUE :cnt1
TYPEMOVE 6 cnt1 LENGTH"SET DESCRIPTOR 'D0867' :cnt1" DATA = :wrd7DISPLAY"TYPE=1," MOVE SQLCODE TO SQL-COD PERFORM CHCKOK "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
"cnt1 =6" MOVEDATA =: END-EXEC
DISPLAYSET'' :" DISPLAY"TYPE=1," DISPLAYPERFORM DISPLAY" DATA = :wrd7;" EXECSQLSET DESCRIPTOR DECLARECURSOREND-EXEC
TYPE = 1,
GTHALLOCATED0867 EXECSQL MOVE SQLCODE PERFORM java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 "
" C0867 SQL DISPLAY INTO:java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 46 EXEC" MOVE SQLCODE PERFORM CHCKOK " "
MOVE 0 TO cnt1DISPLAYSET'D0867' alue " cnt1 DISPLAY"FETCH C0867 INTO :cnt1;" SQL C0867cnt1 MOVE SQLCODE DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 19 PERFORM CHCKOK "cnt1 should be 22 java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 if (cnt1 DATA=:kywd6 MOVE 0 TO flag
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
NOSUBCLASSEXIT-NOSUBCLASS
F C0867 END-EXEC MOVE SQLCODE TO SQL-CODMOVETO flag DISPLAYSQLCODE 0 ="20"NOT DISPLAY"SQLSTATE should be 02000; DISPLAY "Valid implementation-definedSQLSTATE accepted DISPLAY "'D0867 VALUE :java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 " DATA = :kywd6;" if (SQLCODE NOT = 100 EXEC COMMIT= java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 MOVE 0 TO flag
ifD " "
DISPLAY"Valid implementation-defined MOVE3 TO cnt1 END-IF DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
COMMIT EXEC DESCRIPTOR cnt1 DATA :". **fail* java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
CHCKOK DISPLAY"
SQLCODESQL-COD DISPLAY" ** pass *** " EXECSQL 4END-IF DISPLAY =1,java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 MOVESQLCODE SQL-COD EXECCOMMIT END-EXEC else DISPLAY pco* ***java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 EXECSQLINTOHU
VALUES('0867','fail','PCO')
SQLCODE SQL-COD COMPUTE errcnt CHCKOK END-IF
ISPLAY==D =7"
WORK MOVE*Find how many data sets are redundant ******************** END TEST0867 ******************** ******************** BEGIN TEST0868 ******************* MOVEDISPLAYA=wrd7 END-EXEC
DISPLAY" TEST0868" DISPLAY" More UNIQUE CHCKOK
ISPLAY:
9- redicate DISPLAY" MOVEDISPLAY java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 64
COMPUTE SQLCODE = -1 MOVE"xxxxx"TO SQLSTATE
*Find how many data sets are redundant
MOVE 0 TO cnt1TYPE =1, DISPLAY"SELECT COUNT(*) INTO :cnt1" DISPLAY" TIDES.LOCATIONSA" DISPLAY" WHEREUDE = A.DEG_LONGITUDE)PERFORM CHCKOK DISPLAY"SELECT* java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAYOPENUSING D0867 DISPLAY SQLCODE SQL-COD EXECSQLPERFORM FROM TIDES
WHERE NOT UNIQUE ( SELECT * FROM TIDES.LOCATIONS
WHERE DEG_LATITUDE = MOVE 0 flag AND DEG_LONGITUDE = A.DEG_LONGITUDE CHCKOK MOVE SQLCODE TO SQL-COD PERFORM 0 cnt1
cnt1 be 12; its is", cnt1
cnt1 =1)thenDISPLAY"FROMHU.WORKS A WHERE UNIQUE" MOVE END-IF
*True on zero rows.
MOVE0 cnt1 DISPLAY"SELECT COUNT(*) INTO :cnt1" DISPLAY" FROM HU.WORKS A WHERE UNIQUE" DISPLAY" ( "ANDCITY Deale
WHERE BEMPNUM DISPLAY" AND GRADE =java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 29 DISPLAY" AND CITY = 'Deale');" SQLCOUNT*) INTO :cnt1 FROM HU. WHERE A.EMPNU .java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
(SELECT EMPNUM NORMSQ"00ANDNORMSQ =SQLSTATE)
WHERE A.EMPNUM = B.EMPNUM AND GRADE " AND CITY = " should be 12; its value is ", cnt1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
SQLCODE TO PERFORM CHCKOK DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 END-IF
ND-IF
DISPLAY"COMMIT WORK;" EXECSQL COMMIT MOVETO SQL-COD MOVESQLCODE SQL-CODVALUES'086','pass','PCO'java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 PERFORMelse DISPLAY" "
if ( flag = 1 ) then " ** *** " EXECSQLINSERTINTO HU.TESTREPORT
VALUES'86''pass' ('086'''PCOjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 MOVETO SQL-COD
pco* "D " co fail EXECSQLINSERTINTO HU.TESTREPORT
VALUES06''''VALUES86'fail'PCO
SQLCODESQL-COD
rrcnt java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 END-IF
DISPLAY"
EXECSQL COMMIT DISPLAY " More <unique predicate>"predicate
******************** END TEST0868 ******************** ******************** BEGIN TEST0869 ******************* DISPLAY References
DISPLAYCREATELOCATIONS "BILLID INT KEY,"
java.lang.StringIndexOutOfBoundsException: Range [23, 15) out of bounds for length 44 EXECPERFORM=.) java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
BILLID INT " PERFORMCHCKOK
BILLAMOUNT DECIMAL(7,2)) END-EXEC
SQLCODEDISPLAYCOMMIT
java.lang.StringIndexOutOfBoundsException: Range [19, 15) out of bounds for length 29 DISPLAY" "
DISPLAYCREATEPAYMENTS DISPLAY" BILLID INT, PAYAMOUNT DECIMAL(7,2))END-EXEC DISPLAY" PAYID INT PRIMARY KEY," DISPLAY" PAYAMOUNT DECIMAL(7,2));" EXECSQL CREATE TABLEANDDISPLAY
BILLID,
PAYID INTEXEC COMMIT TO
SQLCODE " be 2i value is ,cnt1 MOVE SQLCODE TO SQL-COD PERFORM
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
DISPLAYCORRESPONDING * FROM; SQLCOMMITWORK MOVE SQLCODE TO SQL-COD PERFORM CHCKOK " DISPLAY java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
"CREATE BILLS_SENTjava.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69 DISPLAY" EXCEPT CORRESPONDING SELECT * FROM PAYMENTS;" EXECSQL CREATE VIEW SQL WORK
EXCEPT CORRESPONDINGSELECT * FROM PAYMENTS CHCKOK MOVE SQLCODE TO SQL-COD PERFORM DISPLAY" 088'fail,0.)"
MOVETO. END-EXEC SQL WORK MOVE SQLCODE PERFORMjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 "
******************** END TEST0868 ******************** DISPLAY" 0, 100.00);" EXECSQL java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 0
1 8.0 MOVETO PERFORM DISPLAY" CHCKOK
B VALUES DISPLAY" 1, 80.00java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECSQL" 2 0..00)"
1, 80.00) END-EXEC MOVETO PERFORM CHCKOK DISPLAY java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 0
DISPLAY5)
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
,5.0)END-EXEC MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" "" "
DISPLAY DISPLAY" 0, 0, 100.00);" EXECINSERT PAYMENTS ( INSERTPAYMENTS
0, 0, 100.00) END-EXEC MOVE SQLCODEP java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
CHCKOK DISPLAY" "
DISPLAY PAYIDjava.lang.StringIndexOutOfBoundsException: Range [45, 42) out of bounds for length 47 MOVETO EXECSQLINSERTINTO PAYMENTS INT
,4000 END-EXEC MOVE SQLCODE TO SQL-CODDISPLAY" WORK;" PERFORM CHCKOK DISPLAY" "
"PERFORMCHCKOK DISPLAY" 1, 2, 40.00);"DISPLAY"" EXECSQLINSERTINTOMOVE
D "FROMNO_PAY" MOVESQLCODE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 PERFORM java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY" "
"COMMIT PERFORM CHCKOK EXECSQL DISPLAY "cnt1 s be; value" java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0 DISPLAY" "
MOVE 0 PERFORM " BILLIDINTO:cnt1java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 " FROM ;" EXECSQLSELECT BILLID INTO :cnt1
FROM END-EXECINTEND-EXEC MOVE SQLCODE TO SQL-COD TO PERFORM CHCKOK
cnt1 be2 its if (cnt1 NOT = 2) then
0 TOSQLCODE END-IF
DISPLAY"COMMIT WORK;" EXECSQL COMMIT WORK TO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"CREATE TABLE LOSSY_OUTPUTDISPLAY COMMITDISPLAY" 00.);java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 " INT);" EXECSQL CREATE TABLE LOSSY_OUTPUT java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAYINSERTjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 MOVE SQLCODE TO SQL-COD PERFORM ,, 40) DISPLAY" "
DISPLAY COMMIT SQL WORK MOVE PERFORM CHCKOK DISPLAY
DISPLAY( DISPLAY" AS SELECT EXEC INSERT INTO VALUES 1 java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
DISPALY " SELECT PORTVAL FROM LOSSY_OUTPUT;" EXECSQL CREATE VIEW CORRECT_AND_LOSSY (PORTVAL)
AS SELECT * FROM CORRECT_OUTPUT INTERSECT ALL SELECT PORTVAL FROM LOSSY_OUTPUT END-EXEC MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"INSERT INTO LOSSY_OUTPUT VALUES java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 INTO (2) MOVESQLCODE PERFORM CHCKOK DISPLAY" "
DISPLAY"INSERT INTO LOSSY_OUTPUT VALUES (1);" EXEC" MOVE SQLCODE TO SQL-COD*
CHCKOK " 1; DISPLAYEXECINSERTINTO VALUES1END-EXEC
DISPLAY"INSERT INTO LOSSY_OUTPUT VALUES (1);" EXECSQLINSERTINTO LOSSY_OUTPUT VALUES MOVE flag MOVE SQLCODE TO SQL-CODjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
MOVE TO DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY"INSERT INTO LOSSY_OUTPUT VALUES (3);" SQL LOSSY_OUTPUT CREATE CORRECT_OUTPUT MOVE SQLCODE EXEC SQL INSE INTO VALUES PERFORM CHCKOK DISPLAY""
DISPLAY"INSERT INTO LOSSY_OUTPUT VALUES ( SQLINSERTPERFORM java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 EXECPERFORM MOVE SQLCODE SQL java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 PERFORM CHCKOK DISPLAY ISPLAY
DISPLAY"INSERT INTO LOSSY_OUTPUTPERFORM CHCKOK EXECSQLINSERTINTO LOSSY_OUTPUT SQL TABLE ( MOVE SQLCODE TO SQL-COD PERFORM CHCKOK
SQLCODE SQL-COD
DISPLAY"INSERT INTO LOSSY_OUTPUT VALUES (1);" EXECSQLINSERTSQLjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 MOVE SQLCODEDISPLAY PERFORM CHCKOK DISPLAY" "
DISPLAY"INSERT EXEC SQLCREATEVIEWCORRECT_AND_LOSSY java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 36 EXECSQL"" MOVE SQLCODE TO SQL-COD DISPLAY" INTOCORRECT_OUTPUTVALUES(4)"
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAYLOSSY_OUTPUT
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
E INTO (java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 PERFORMINSERT LOSSY_OUTPUT;" DISPLAY" "
*Changes: two more 1s; a 3 changed to a 4
DISPLAY"INSERT INTO CORRECT_OUTPUT VALUES (1);" EXECSQLINSERTINTO CORRECT_OUTPUT MOVE SQLCODE TO SQL-COD PERFORM CHCKOKSQLINTO VALUES java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 DISPLAY" "
DISPLAYEXEC DECLARE CURSORFOR *
EXCEPT * FROM
OVETOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 PERFORM CHCKOK;" DISPLAY" "
DISPLAY VALUES EXECSQLINSERTINTO CORRECT_OUTPUTjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 0 MOVE SQLCODE TO SQL-COD PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
0 cnt1
DISPLAY"INSERT INTO SQL C0869 INTO :cnt1END-EXEC EXECSQLINSERTINTO CORRECT_OUTPUT VALUES (1) END-EXEC
ifNOTjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
0TO
DISPLAY"INSERT INTO CORRECT_OUTPUT VALUESEXEC SQL FETCH SQLINSERTINTOLOSSY_OUTPUTVALUES()END-EXEC SQLINTO VALUES3)java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 MOVE SQLCODE CHCKOK DISPLAY" DISPLAY"
DISPLAY" SQLINSERT LOSSY_OUTPUTVALUES MOVE flag EXECINSERT CORRECT_OUTPUT ()Ejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 SQL C0869: END-EXEC
CHCKOK DISPLAY" "DISPLAYSQLCODE0 ,SQL-COD
DISPLAY"INSERT INTO CORRECT_OUTPUT VALUES (4);" EXECSQLINSERTINTO CORRECT_OUTPUT VALUES (4) END-EXEC MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"INSERT INTO CORRECT_OUTPUTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECINSERT VALUESEND-EXEC MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAYMOVETOjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 EXECSQLOPEN C0869 END-EXEC MOVE SQLCODE TO SQL-COD PERFORM CHCKOK ""
MOVE0Ocnt1 DISPLAY"FETCH EXECSQLINSERTINTO CORRECT_OUTPUT VALUES 3 END-EXEC EXECSQL FETCH C0869 TOSQL-COD MOVE PERFORM DISPLAYcnt1DISPLAY"INSERTINTOCORRECT_OUTPUT VALUES 11" if (cnt1 NOT = 1) MOVEE SQLINTO VALUES1 MOVE 0 TO flag END-IF
MOVE"FROM" DISPLAY"FETCH C0869 INTO :cnt1;" EXECSQL FETCH C0869 INTO : CHCKOK MOVE SQLCODEWHERE = END-EXEC PERFORM DISPLAYINSERTC )java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 ifNOT = 1then MOVE 0 TODISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 END-IF
MOVE 0 TO cnt1DISPLAYINTO ()" DISPLAY"FETCH C0869 INTO :cnt1;" EXECSQL FETCH C0869 INTO :cnt1 END-EXEC MOVEEXECSELECT(* : EXEC SQL SELECT COUNT(*) INTO :cnt1 ()END-EXEC PERFORM CHCKOK DISPLAY"cnt1 should be 4; its value is ", cnt1 if (cnt1 PERFORM CHC MOVE 0 TO flag END-IF
DISPLAY"FETCH C0869 INTO :cnt1;" EXECSQL FETCH C0869 INTO :cnt1 END-EXEC MOVE SQLCODE TO SQL-COD DISPLAY"SQLCODE should be 100; its value is ", SQL-COD DISPLAY"SQLSTATEPERFORMCHCKOK PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
( 0 ="20" MOVEEXEC DROP CASCADE END-IF
(NORMSQ"20 ANDNORMSQ = ) then DISPLAY" . END-IF DISPLAY" "
MOVE 0 TO cnt1 DISPLAY" DISPLAY java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
ISPLAY PORTVAL EXECSQLSELECTCOUNT(*) INTO :cnt1 FROM CORRECT_AND_LOSSY
WHERE PORTVAL = 1java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0 MOVE SQLCODE TO SQL-COD PERFORM DISPLAY"cnt1 should be 5; its value DISPLAY "FETCH C0869 :cnt1 if cnt1 =5) MOVE 0 TO flag END-IFMOVETOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
( NOTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECSQLCOMMIT java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 DISPLAY" FROM CORRECT_AND_LOSSY" DISPLAY" WHERE PORTVAL = 2;" EXECSQLSELECTCOUNT(*) INTO :cnt1 FROM CORRECT_AND_LOSSY
WHERE PORTVAL = 2 END-EXEC MOVE SQLCODE TO SQL-COD PERFORM CHCKOK " be2 valuejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (cnt1 NOT = 2) then MOVE 0 TO flag END-IF
MOVE 0 TOSQL C0869 cnt1 "SELECTCOUNT*)INTO :cnt1" DISPLAY SQLCODE isSQL-COD " WHEREPORTVAL ;" EXECSQLSELECT SQLCODETO FROM CORRECT_AND_LOSSY
WHERE PORTVAL = 3 END-EXEC MOVE" WORK;" PERFORMCHCKOK DISPLAY"cnt1 should be 1; its value is ", cnt1ifNORMSQ"20"ANDjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 36 if ( java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 if = 1 ) then END-IF
M 0 cnt1 " COUNT(*) :java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 DISPLAY" FROM CORRECT_AND_LOSSY" DISPLAY" WHERE PORTVAL = 4;" EXECSQLSELECTCOUNT(*) INTO :cnt1 cnt1 FROM CORRECT_AND_LOSSY
WHERE PORTVAL = 4 END-EXEC MOVE SQLCODE errcnt errcnt PERFORM CHCKOK DISPLAYcnt1 be value",cnt1 if (cnt1 NOT = 1) then MOVE 0 FROMCORRECT_AND_LOSSY END-IF
DISPLAY"COMMIT WORK;" EXECSQL COMMIT RUN MOVE SQLCODE TO SQL-COD
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" "
DISPLAY SQLCODE EXECSQLDISPLAYcnt1value MOVE SQLCODE TO SQL-COD PERFORM CHCKOK
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
EXECNOT = 1) then MOVE SQLCODE TO SQL-COD PERFORMMOVETO flag ""
DISPLAY" DISPLAY "DROP n EXECSQL DROP 1flag S9)DISPLAYSIGNSEPARATE
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 PERFORMMOVE FLATERRFORM ""USING" java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY"COMMIT WORK;"
WORK ifNOTEXEC VIEW ((norm1ALPNUM then
HCKOK DISPLAY""
if flag = 1 DISPLAY" 5-byteIDjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 EXECINSERT
VALUES('0869','pass','PCO') END-EXEC MOVE SQLCODE TO SQL-COD else
========================= " EXEC
( CHAR, ******************** END TEST0869 ******************** **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 STOPRUN.
* **** Procedures for PERFORM statements
*Test SQLCODE and SQLSTATE for normal completion.
CHCKOK DISPLAYSQLCODE;its " SQL-COD DISPLAY"PERFORMCHCKOK PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASSMOVE indic1
SQLCODE OR =" MOVE 0DISPLAY"WHERETABLE_SCHEM = FLATER"
if (NORMSQ :H:
DISPLAY"Valid implementation-defined SQLSTATE accepted NDCOLUMN_DEF='' END-EXEC DISPLAY" should be 0; value is ", indic1 EXECSQL WORK END-EXEC
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
NOSUBCLASSxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
*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.
" be 'USER' (with ); its value is ",
MOVE norm1 *subclass begins in position 3 of char array NORMSQ *valid subclass begins with 5-9, I-Z, end of ALPNUM table PERFORM
((norm1 =ALPNUM " MOVE"0"TO NORMSQX(norm1)
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 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 = SQLSTATEPERFORM GOTO EXIT-NOSUBCLASS " hould be 'Hello World' itsvalueis" H
java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 17
MOVE 4 TO norm1 *examining position 4 of char array NORMSQ *valid characters are 0-9, A-Z
norm21BY1UNTIL > 3java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
NORMSQX () hen MOVE"0"TO NORMSQX(norm1) END-IF END-PERFORM
MOVE 5 TO norm1 *valid characters are 0-9, A-Z *examining position 5 of char array NORMSQ PERFORMVARYING norm2 FROM 1 BY 1 UNTIL norm2 > 36 if (NORMSQX(norm1) ('0869','','PCO') END-EXEC 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 MOVE"0"TO java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 26
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
EXIT-NOSUBCLASS"ANDjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXIT.
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.26Angebot
¤
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 ist noch experimentell.