IDENTIFICATIONDIVISION. PROGRAM-ID. DML164. ENVIRONMENTDIVISION. CONFIGURATIONSECTION* REFERENCES * SQL VALIDATION TEST SUITE V6.0 * FIPS PUB 127-2 14.2 Intermediate SQL * REFERENCES OBJECT-COMPUTERPIC
* X.
* 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 * ****************************************************************
uid
01DISPLAY: , , " java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
()java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
0 PIC
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
1 *date_time print
0 PIC
0kywrd
01 wrd7 java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
ISPLAY java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
01 java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 ""TO
1 (9)DISPLAYLEADING.
1norm2 S9 SIGN
0 VALUE "01234ABCDEFGH56789IJKLMNOPQRSTUVWXYZ".DISPLAY" ()INTO:"
05 ALPNUMDISPLAY"WHERELOC_NAME LIKE'% |: |''"
0 .
05 NORMSQX " OR LOC_NAME= :;"
01 errcnt 01 errcnt PIC COUNT(* INTO *date_time declaration
01 TO-DAY LOC_NAME EXECSQLCOUNT()INTOcnt1
1 THE-TIMEWHERELIKE '| kywd3 | '%'
01 flag PIC S9(9) DISPLAYOR LIKE LOC_NAME java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
0 PIC(9) 3 then
PROCEDUREif( NOT=
P0 0 TO
MOVE CALL"UTHID"uid MOVE"not logged "SELECTINTOcnt1 EXECSELECTFROMjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 MOVE SQLCODE% |:| %" EXEC ROLLBACK END-EXEC
D " OR LOC_NAMELIKEjava.lang.StringIndexOutOfBoundsException: Range [42, 15) out of bounds for length 35
(uid ) then DISPLAY"ERROR: User EXEC LOC_NAMELIKE %| kywd9 |''
- FROMLOCATIONS
WHERELIKE kywd9 ''
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
0
DISPLAY
st .,Embedded .pco DISPLAY "59-byte ID" DISPLAY"TEd DISPLA cnt1shoulde1 ts is ,java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 *date_time print ACCEPTDISPLAY"kywd6 = 'London'" ACCEPTMOVE flag wrd7java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 DISPLAYWHERE%'
******************** BEGIN TEST0867 *******************
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
*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.
*Find how many records for Florida Keys
CHCKOK " java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
MOVE 0 DECLARE CURSOR S0867 "ALLOCATE " DISPLAY ."
java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 " DISPLAY" OR LOC_NAME =
OUNT
OM
WHEREOVE SQL-COD
CHCKOK DISPLAY" MOVE SQLCODE TOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 PERFORM CHCKOK '':cnt1 "cnt1 houldbe 3 tsvalue ,cnt1 if (cnt1 NOT = 13)DISPLAY"LENGTH = ," MOVE flag END-IF
MOVEEXEC DESCRIPTOR VALUE DISPLAYkywd9 java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
MOVE 0 TO :kywd6" DISPLAYDISPLAY kywd6
java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 25
M java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 DISPLAY" =1java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 DISPLAYISPLAY
M 3 cnt1 FROM TIDES.LOCATIONS
LIKE | '' OR LOC_NAME LIKE '%' | = 1,
R ND-EXEC MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" LENGTH = MOVE SQLCODETO SQL-COD DISPLAY"cnt1 PERFORMCHCKOK if(cnt1 =0 MOVE 0 TO flag END-IF
MOVE"DISPLAY "SETDESCRIPTOR 'D0867' :cnt1"
ISPLAY 'java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
d"TOjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 DISPLAYSQL"
DISPLAY 'SELECT DATA=: END-EXEC
(LOC_NAME ?|%java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 DISPLAY" DESCRIPTOR 'D0867' DISPLAY""
LOC_NAME? MOVETO 'AND( "LENGTH=7"
wrd7 ' S SET D0867Vjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 INTO :longst
HUECCO END-EXEC
OVETO
DISPLAY"longst = ", longstEXECSQLCODE
DISPLAY"LENGTH , "cnt1 = 5;java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32 MOVE SQLCODE TO SQL-COD
CHCKOK DISPLAY" "
DISPLAY" C0867 CURSOR FOR S0867;" EXEC C0867FOR java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
DISPLAY"SET DESCRIPTOR 'D0867' COUNT = 6;" EXECMOVEDISPLAY"" MOVE SQLCODEDISPLAYOPENUSING FETCH :;" PERFORM
AY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
"cnt1 = 1; MOVE java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 " DESCRIPTOR D0867'salue, ifNOT 0)then EXECFETCH END-EXEC DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 EXECSET DESCRIPTOR :cnt1
TYPE DISPLAYcnt122;t1 LENGTH,
: END-EXEC MOVETO PERFORMRFORMTHRU DISPLAY"EXEC ETCH INTO:cnt1 java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
DISPLAY"cnt1 = 2;" MOVE" should be10;if( 00 AND NOT = SQLSTATEjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 SETD0867 :" DISPLAY" TYPE= 1" DISPLAY" LENGTH = 6,"
DISPLAY :kywd6 EXECSQLSETDISPLAY" WORK;
TYPE1, LENGTH = 6, DATA =:kywd6 END-EXEC PERFORM PERFORM"
ISPLAY
DISPLAYcnt1 TO DISPLAY"SET DESCRIPTOR 'D0867' VALUE :java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 19 DISPLAY" TYPE = 1," DISPLAYSQLINTO HU DISPLAY" DATA = :kywd6;"
EXECSET D0867:cnt1
TYPE = 1, LENGTH, DATA=: " pco * ** " MOVE SQLCODE TOEXECSQLINSERTINTO.TESTREPORTPERFORM
DISPLAY" "MOVETO
DISPLAY"cnt1 = 4;" MOVE DISPLAY"SET DESCRIPTOR 'D0867' VALUE " =1" TO WORK DISPLAY"MOVESQLCODETOSQL-COD EXECSQLSET DESCRIPTOR 'D0867'" dml164. ** fail** "
TYPE = 1 LENGTH = 7,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVE SQLCODE TOMOVETO PERFORM DISPLAY""
"cnt1 =5;" MOVE 5 TO cnt1-- ------ - -- -- java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 DISPLAY"SET DESCRIPTOR 'D0867' VALUE :cnt1" DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
= ,java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 DISPLAY" DATA = : MOVE" MOVE "xxxxxWORKEND-EXEC EXECSQLSET DESCRIPTOR 'D0867'VALUE
TYPE = 1, LENGTH = 7,
TA:wrd7 MOVE SQLCODE TO SQL-COD PERFORM DISPLAY" "
" DISPLAY "cnt12 -UNIQUEredicate" ANDDEG_LONGITUDE.);" DISPLAY"SET DESCRIPTOR 'D0867' VALUE :cnt1" DISPLAY"TYPEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY =7, DISPLAY" DATA = :wrd7;" EXEC SET 'D0867'VALUE :cnt1
TYPE , LENGTH = 7, DATA = :wrd7 DEG_LATITUDE = MOVE SQLCODE TO SQL-COD
ERFORM DISPLAY" "
MOVE 0 TO cnt1 DISPLAY"ETCH :cnt1; EXECSQL FETCH C0867 INTO :cnt1 END-EXEC MOVE SQLCODE TO SQL-COD PERFORM DISPLAY"cnt1 should *True on zero rows. if (cnt1 NOT CHCKOKMOVETOjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 MOVEif( NOT 2 END-IF
DISPLAY"FETCH C0867 INTO :cnt1;"
MOVE*True on zero rows. DISPLAY 0 TO "shouldbe200 itsvalue is ,SQLSTATE PERFORM NOSUBCLASS THRU CITY''; ifDISPLAY" A.EMPNUM= .EMPNUM" MOVE 0 TO flag SELECT
(= 000 =SQLSTATE then DISPLAY"Valid implementation-defined SQLSTATE accepted."
DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY"COMMIT WORK;" EXECSQL COMMIT WORK END-EXEC MOVE SQLCODE SQL-COD PERFORM CHCKOK DISPLAY" java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
if ( flag DISPLAY" *** pass *** java.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 42 EXECSQLINSERTPERFORM
('87,'pass
SQLCODE else DISPLAY" dml164.pco *** fail *** DISPLAY"** passjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 EXECINSERTINTO * passjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
VALUES7','') END-EXEC MOVE SQLCODE TO SQL-COD COMPUTE errcnt = errcnt + 1 END-IF
EXECSQL COMMIT WORK('88,fail, ('06,,'') END-EXEC MOVETO ******************** END TEST0867 ******************** ******************** BEGIN TEST0868 ******************* MOVE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
DISPLAY DISPLAY" More " DISPLAY"References:" DISPLAY" F#29 -- UNIQUE predicate"
java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
COMPUTE SQLCODE = -1 MOVE"xxxxx"TO SQLSTATE
*Find how many data sets are redundant
MOVE 0 SQLCODE DISPLAY"SELECT COUNT(*) INTO :cnt1" DISPLAY" FROM TIDES.LOCATIONS A" DISPLAY" WHERE NOT MOVE"xxxxx DISPLAY" SELECT * FROM TIDES.LOCATIONS" DISPLAY" WHERE DEG_LATITUDE DISPLAYCREATE TABLE BILLS_SENT " DISPLAY" AND DEG_LONGITUDE = A.DEG_LONGITUDE);" SQLSELECT(*)INTOcnt1
. java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
WHERE NOT UNIQUE (
* TIDES
WHERE DEG_LATITUDE SQLCODE
= ADEG_LONGITUDE MOVE SQLCODE TO SQL-COD
CHCKOK DISPLAY"cnt1 should be 12; its value is ", cnt1 ifMOVE ;
0TO END-IF
*True on zero rows.
MOVE 0 TO cnt1 DISPLAY"BILLID," DISPLAY" FROM HU.WORKS A WHERE UNIQUE" DISPLAY" "PAYAMOUNT7)" DISPLAY" WHERE A.EMPNUM = B.EMPNUM" DISPLAY GRADE 13java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 DISPLAY" AND CITY = 'Deale');" EXECSQLSELECTCOUNT( " TABLE PAYMENTS (" FROM HU.WORKS A WHERE UNIQUE
(SELECTFROM HU.STAFF
WHERE. = B.EMPNUM DISPLAY"" ANDCITYDealejava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 MOVETO PERFORM CHCKOK
D cnt1 1;ts " cnt1 if (cnt1 NOT = 12) then MOVE 0 TO flag END-IF
ISPLAYWORK EXECSQL COMMIT WORK " DISPLAY"EXCEPT SELECTFROM" MOVE SQLCODE SQL-COD PERFORM CHCKOK " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
if ( flag = 1 ) thenPERFORM CHCKOK DISPLAY" ** CREATE NO_PAYAS SELECT* BILLS_SENT" EXECSQLINSERTINTO HU.TESTREPORT "COMMIT WORK;" MOVE SQLCODE TO SQL-CODSQLCODE SQL-COD else DISPLAY .* ** EXECSQL '06',fail " 0, 100.0;java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
SQLCODE , 10.0)END-EXEC COMPUTE =EXECSQL COMMITEND-EXEC END-IF
DISPLAY ========================"
EXECSQL COMMIT WORK END-EXEC MOVE SQLCODE TODISPLAY" ******************** END TEST0868 ******************** ******************** BEGIN TEST0869 ******************* MOVE 1 TO flag
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVE
CREATE DISPLAY" BILLID INT PRIMARY KEY," DISPLAY"BILLAMOUNT DECIMAL(7,2) DISPLAY VALUES " EXECSQLDISPLAY" 2, 5.00)"
BILLID " INTO VALUES ("
BILLAMOUNT2 50.0 java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
0 , PERFORM DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY ,4.0)" " INT PRIMARYKEY" DISPLAY" PAYAMOUNT DECIMAL(7,2));" EXECSQL SQLCODESQL-COD
BILLID,
PAYID INT PRIMARY KEY1 1 0 java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
PAYAMOUNT DECIMAL( EXEC COMMIT END-EXEC MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY" "
CHCKOK EXECSQLSELECTjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 MOVE SQL-COD PERFORM NO_PAY ) java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 "
DISPLAY"INSERT DISPLAY" should 2; java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 "0 0.0; EXECMOVETOMOVETO
0, 100.00) END-EXEC
DISPLAY" "
DISPLAYSQLMOVETO DISPLAY" OVE TO SQL-COD EXECSQLINSERTINTO BILLS_SENT VALUES (
1, 80.00) END-EXEC MOVE SQLCODE TOEXEC COMMIT END-EXEC PERFORM CHCKOK
"NSERT CREATE ()java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62 DISPLAY ,500) FROMLOSSY_OUTPUT "
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVESQLEND-EXEC PERFORM CHCKOK DISPLAY" "
DISPLAY"INSERT INTO PAYMENTS VALUES
, 0 1000);java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 EXECSQLINSERTINTO PAYMENTS VALUESDISPLAYPORTVAL
0,0 0.0) java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 MOVE SQLCODE TO SQL-COD PERFORM DISPLAY" "
DISPLAY"INSERT INTO PAYMENTS VALUES (" DISPLAY" 1, 1 0.0;" EXECSQLINSERTINTO PAYMENTS VALUES (
1 1 00) MOVE SQLCODE TOMOVETOSQL-COD PERFORM CHCKOK DISPLAY DISPLAY" DISPLAY"INSERT INTO PAYMENTS VALUES (" DISPLAY" 1, 2, 40.00);" EXECSQLINSERTINTO PAYMENTS VALUES (
1, 2java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVETOSQL-COD PERFORM CHCKOK "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAYPERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 EXECSQL COMMIT " MOVEINSERTLOSSY_OUTPUT) PERFORM CHCKOK TOSQL-COD DISPLAY" "
MOVE0 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY"SELECT BILLID INTO :cnt1" DISPLAY" FROM NO_PAY;" EXECSQLSELECT BILLID INTO :cnt1 Changes: two more 1s; a 3 changed to a 4 MOVE SQLCODE TO SQL-CODPERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 PERFORM CHCKOK DISPLAY"cnt1 if (cnt1 NOT = 2) then
0 TO END-IF
DISPLAY"COMMIT WORKjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECSQL COMMIT WORK END-EXEC
SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"CREATE TABLE CORRECT_OUTPUT (" DISPLAY EXECCREATE CORRECT_OUTPUT " MOVE SQLCODE TOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY""
DISPLAY"COMMIT WORK;" EXEC COMMIT
SQLCODE PERFORM CHCKOK
D " "
ISPLAY CREATECORRECT_AND_LOSSY DISPLAY" AS SELECT * FROM CORRECT_OUTPUT INTERSECT ALL" "SELECTPORTVALF ;java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
AS SELECT * FROM CORRECT_OUTPUT PERFORM SELECT PORTVAL FROM LOSSY_OUTPUT END-EXEC MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"COMMIT WORK;" EXECSQL COMMIT WORK END-EXEC MOVE java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 59
CHCKOK SQL VALUES
DISPLAY"INSERT INTO VALUES (1);java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 EXECSQLINSERTINTO LOSSY_OUTPUT VALUES MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY"
DISPLAY"INSERT INTO LOSSY_OUTPUT java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 25 DISPLAY"NSERT ORRECT_OUTPUTVALUES()" MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY
DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 EXECSQLINSERTINTO LOSSY_OUTPUT VALUES CHCKOK MOVETO
DISPLAY" "
DISPLAY"INSERT INTO LOSSY_OUTPUT VALUES (1);" EXEC MOVE SQLCODE SQL-COD MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"M 0cjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
3 java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 MOVE SQLCODE EXEC INSERT CORRECT_OUTPUT (3 END-EXECTO PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY"INSERT INTO LOSSY_OUTPUT VALUES (2);" EXECINTO (0 flag MOVE SQLCODE SQLINTO VALUES(1 PERFORM CHCKOK DISPLAY" "
*Changes: two more 1s; a 3 changed to a 4
INSERT java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECSQLINSERT NOSUBCLASS EXIT-NOSUBCLASS MOVETO
( = "2java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" "
DISPLAY"INSERT INTO CORRECT_OUTPUT VALUES (1);" SQL CORRECT_OUTPUT () java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"INSERT INTO CORRECT_OUTPUT VALUES (1);" EXECSQLINSERTINTO CORRECT_OUTPUT VALUES EXCEPTSELECT java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 MOVETO
CHCKOK DISPLAY" "
DISPLAY" INTO VALUES 0T
NTO(3) MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" "
"INSERT ()java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 SQLCjava.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 68 MOVE SQLCODE TO SQL-COD
CHCKOK DISPLAY" "
DISPLAY"INSERT INTO CORRECT_OUTPUT VALUES (4);" EXECSQLINSERTINTO CORRECT_OUTPUT VALUES (4) END-EXEC SQLCOUNT* INTO:cnt1 PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY" "
INSERTjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
VALUES MOVE SQLCODE TO SQL-COD
PORTVALEND-EXEC DISPLAY" "
DISPLAY"INSERT INTO CORRECT_OUTPUT VALUES (2);" EXECSQL MOVE SQLCODE TO PERFORM ; DISPLAY" "
DISPLAY"DECLARE C0869 CURSOR FOR SELECT * FROM" DISPLAY " CORRECT_OUTPUT EXCEPT ALL SELECT * FROM LOSSY_OUTPUT" DISPLAY" ORDER BY PORTVAL;" EXECSQL( = 20AND =SQLSTATE
CORRECT_OUTPUTD"implementation-definedaccepted" ORDERBY PORTVAL
DISPLAY"OPEN C0869;" SQL C0869
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 36
CHCKOK DISPLAY" "
MOVE 0 TO cnt1 DISPLAY"FETCH C0869 INTO :cnt1;" EXECSELECT MOVE SQLCODE "FROMCORRECT_AND_LOSSY" PERFORM CHCKOK DISPLAYEXEC COMMIT END-EXEC if( NOT 1)then
0 TO END-IF
MOVEDISPLAY DROPjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 DISPLAYFETCH INTO:;" EXECSQL FETCH C0869( NOT ) then MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY"cnt1 should be 1; its value is ", cnt1 ifcnt1 = MOVE 0 TO flag END-IF
MOVE 0 TO cnt1 DISPLAY"FETCH "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 EXECDISPLAYDROPCORRECT_OUTPUT MOVETOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 PERFORM DISPLAY"cnt1 should PERFORM java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 if ( DISPLAY"cnt1should ;its isjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVESQL COMMITWORK END-IF
DISPLAY"FETCH C0869 INTO :cnt1;" EXEC FETCH INTO: END-EXEC MOVE" TABLE CASCADE;" DISPLAY" should be 100; its value ", DISPLAY"SQLSTATE should be 02000; its value is ", SQLSTATE PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODE NOT = 100 OR NORMSQ NOT = "02000") thenPERFORMCHCKOK MOVE 0 TO flag END-IF
( = "000 java.lang.StringIndexOutOfBoundsException: Range [0, 44) out of bounds for length 36 then DISPLAY"Validjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 END-IF ""
MOVE0TO DISPLAY"SELECT COUNT(*) INTO :cnt1" DISPLAY" FROM CORRECT_AND_LOSSY"" DISPLAY" WHERE PORTVAL = 1;" EXECSQLSELECTCOUNT(*) INTO
MOVE SQLCODE **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 DISPLAY"cnt1 should be 5; its value is ", cnt1 if (cnt1 NOT = 5) then MOVE 0 TO flag END-IF
" should be 000 itsvalue is ", SQLSTATE " java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 DISPLAY" FROM CORRECT_AND_LOSSY" DISPLAY"WHEREPORTVAL = 2;java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 EXECSQLSELECTCOUNT(*) INTO :cnt1 FROM CORRECT_AND_LOSSY
WHERE PORTVAL = 2 END-EXEC MOVETO SQL-COD PERFORM CHCKOK
cnt1 2 cnt1 if (cnt1 NOT = 2) then MOVE 0 TO flag END-IF
MOVETO DISPLAYENVIRONMENT. DISPLAY*After calling NOSUBCLASS, NORMSQ will be tested
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 EXECSELECT*INTO FROM *
WHERELAIMER MOVE SQLCODE TO* NIST assumes no responsibility for any party's use of PERFORM CHCKOK DISPLAY"cnt1 should be 1; its value is ", cnt1 if (cnt1 NOT* MOVE 0 TO CHCKOK END-IF
MOVE 0 TO cnt1 DISPLAY"SELECT COUNT(*) INTO :cnt1" DISPLAY" FROM CORRECT_AND_LOSSY" " PORTVAL = 4" SQLCOUNT)INTOjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
CORRECT_OUTPUTjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
1norm1(9) SIGNPERFORM
DISPLAYcnt1 ;its
java.lang.StringIndexOutOfBoundsException: Range [21, 13) out of bounds for length 37
0TO
ND-IF
DISPLAY"COMMIT 01 PIC 9(6). EXECSQL MOVE SQL-COD
DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAYEXECEXEC COMMIT
DROP CORRECT_AND_LOSSY ifORMSQXnorm2 DISPLAY:java.lang.StringIndexOutOfBoundsException: Range [18, 12) out of bounds for length 25 PERFORM0 errcnt (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" "
DISPLAY"COMMIT WORK;" EXECSQL MOVE SQLCODE TO SQL-CODMOVETO flag
OK DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY"DROP TABLE CORRECT_OUTPUT CASCADE;" EXECSQL DROP TABLE. WHERE = 'USER'''java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 bytest the fail
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 25
DISPLAY"COMMIT WORK;" EXECSQL COMMIT WORK *subclass begins in position 3 of char array NORMSQ MOVE SQLCODE 0TO PERFORM CHCKOK DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY EXEC DROP END-EXEC
indic1is PERFORM CHCKOK DISPLAY" "
DISPLAY"COMMIT WORK;"
COMMITPERFORMFROM1 norm2 MOVE SQLCODE ifnorm1norm2 PERFORM CHCKOK
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
= then
**pass EXECINSERT .TESTREPORT
VALUESpass MOVETO END-PERFORM DISPLAYSELECT" EXECSQLINSERTINTODISPLAY java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 67
" XX(4C5 COMPUTE errcnt (, ) END-IF
DISPLAY"===========DISPLAY XX 'Timestamp "
SQLEND-EXEC
=' ******************** END TEST0869 ******************** **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
ERFORM
* **** Procedures for PERFORM statements
*Test SQLCODE and SQLSTATE for normal completion.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY"SQLCODE should DISPLAY fltvalindic1java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 DISPLAY"SQLSTATE should be 00000; its value is ", SQLSTATE PERFORM NOSUBCLASS if (SQLCODE NOT = FLATER XX MOVE 0 TO flag END-IF if ( fltval; alue 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 SQLCODE
MOVE 3 TO norm1if( NOT 1then *subclass begins in position 3 of char array NORMSQ *valid subclass begins with 5-9, I-Z, end of ALPNUM table PERFORMnorm2 1 BY norm2java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62 if CHCKOK MOVE 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)
( = ) then GOTO EXIT-NOSUBCLASS "
MOVE 4 TO norm1 *examining position 4 of char array NORMSQ *valid characters are 0-9, A-Z PERFORM norm2 FROM1BY1 norm2 > 36 if (NORMSQX(norm1) = ALPNUM(norm2)) then MOVE"0"TO NORMSQX(norm1)
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 END-IF
MOVE 5 TO norm1 *valid characters are 0-9, A-Z *examining position 5 of char array NORMSQ PERFORM**** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 if (NORMSQX(norm1 * **** Procedures for PERFORM statements MOVECHCKOK 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"0"ANDNORMSQX "1)
END-IF.
.
EXIT-NOSUBCLASS. EXIT.
¤ Dauer der Verarbeitung: 0.28 Sekunden
(vorverarbeitet)
¤
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.