**************************************************************** * * 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 * ****************************************************************
* TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLEnorm2 S9 SIGNSEPARATE*
"" USING uid MOVE"not logged in, not"TO uidx EXECSELECT uidx END-EXEC MOVE EXECSQL ROLLBACK WORK END-EXEC* ANSI SQL-1992 PROCEDURE
(NOT=uidx "ERROR User"uid
- connected STOPRUN END-IF MOVE 0 TO errcnt not"TOuidx
DISPLAY "SQL Test Suite, V6.0, Embedded COBOL, dml164.pco" DISPLAY
9 ID DISPLAY"TEd Version #" *date_time print ACCEPTjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 ACCEPTEND-IF
1uid
******************** BEGIN TEST0867 ******************* MOVEPICjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
*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
MOVE"Key"TO DISPLAY*correct length.
*to do keyword searches. DISPLAY"SELECT COUNT(*) java.lang.StringIndexOutOfBoundsException: Range [0, 42) out of bounds for length 0 DISPLAY 0 norm2 PIC(9) DISPLAYSIGNjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0 " | |%"
D " OR LOC_NAME LIKE %1NORMSQ DISPLAY kywd3 SELECT) :cnt1
. date_time
WHERELIKESELECT):java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
0 THE-TIME '% |: |%java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 OR: MOVE SQLCODE kywd3 PERFORM DISPLAY"
1)then
END-IF
MOVE". DISPLAYEND-IF
"UTHID"SING DISPLAY LOC_ID :" DISPLAY" FROM TIDES.LOCATIONS" SQL USER :uidxFROM.ECCO DISPLAY" ORjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 "ORLOC_NAME kywd9java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 EXECSQL WORK
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 35 ' | : ||' uid ) then
| %java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
TIDES ' |% PERFORM DISPLAY"cnt1 should be 10; its valueOR LOC_NAME = :kywd9 END-EXEC ifE errcnt MOVE 0 TOPERFORM ,V6 COBOL,dml164"
Y"cnt1 b 0i is ",java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
MOVE"London"TO kywd6
java.lang.StringIndexOutOfBoundsException: Range [39, 20) out of bounds for length 39 MOVE"England"TO wrd7 DISPLAY" = 'England'"
M ""TO 'SELECT LOC_ID FROM TIDES.LOCATIONS MOVE"England" TO ' java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 'LOC_NAME LIKE'%'| ||' %'' ' OR LOC_NAME = ?)' 'AND(LOC_NAMELIKE ''% '' || ? | ''%''' ' OR LOC_NAME LIKE ''%'' |java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 ' LOC_NAME = )' INTO" TEST0867"
. END-EXEC'' |?DISPLAY References MOVE
DISPLAY" DISPLAY " - - FROMFROM HU java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
DISPLAY"PREPARE S0867 FROM :longst;" EXECSQL*correct length. MOVE SQLCODE TOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 PERFORM DISPLAY" "
DISPLAY"DECLARE C0867 CURSOR FOR S0867;" EXECSQL C0867 FOREND-EXEC
"ALLOCATEDESCRIPTOR'D0867';" EXECSQL ALLOCATE"FROMTIDESLOCATIONS" MOVE SQLCODE TO SQL-COD
CHCKOK DISPLAY" "
DISPLAY XEC DECLARE CURSOR S0867 DISPLAY" DESCRIPTOR '';" EXEC ALLOCATE 'D0867' java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58 PERFORM CHCKOK DISPLAY" java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
OUNT) cnt1
TIDES DISPLAYMS TOSQL-COD DISPLAY" TYPE = 1," DISPLAY" LENGTH = 6," DISPLAY" DATA = :kywd6;"
TYPE, LENGTH = 6,
= :kywd6java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 DISPLAY"DESCRIPTOR D0867 :java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 PERFORM CHCKOK "DATA 0TOflag
DISPLAY SET 'D0867 cnt1 TO DISPLAYLENGTH ,
=1" DISPLAY" LENGTH = 6," "DATA= :kywd6;" EXECSQLSETDISPLAY"FROMTIDES CHCKOK
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
DATA java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
D" TYPE 1" PERFORM CHCKOK DISPLAY" "
D DATAkywd6
3java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 DISPLAY"SET DESCRIPTOR WHERELOC_NAME '% ' | :kywd9 || '%' DISPLAY"TYPE =1 R LOC_NAME kywd9 java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 "LENGTH= SQL-COD DISPLAY" DATA = :kywd6;" EXECSETjava.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 LENGTH java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
kywd6
D " LENGTH " PERFORM" java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
D"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
"cnt1 java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 26
WHERE ''| |''' SETVALUE DISPLAY" DISPLAY" = ;"' ORLOC_NAME = ? 4 nt1
, DISPLAY" DATA =:wrd7;" SQL' cnt1
TYPE = 1, LENGTHFROM.ECCO
SQLCODE
SQL-COD PERFORM CHCKOK
7
cnt1" MOVE 5 TO cnt1 DISPLAY"SET DESCRIPTOR 'D0867' VALUE :cnt1 java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 " TYPE = 1," DISPLAY" LENGTH = 7," DISPLAY" DATA = :wrd7;" EXECSQLSET DESCRIPTOR 'D0867'VALUE :cnt1
TYPE = 1,
= 7 DATA = :wrd7"ETDESCRIPTOR'' cnt1" MOVETO
CHCKOK DISPLAY" "
DISPLAYEXECSET D0867:cnt1 MOVETO DISPLAYSETVALUE
, DISPLAY" LENGTH = 7," DISPLAY" DATA = :wrd7;" EXECSQLDISPLAY""
TYPE = 1, LENGTHDISPLAY ;
=:rd7 MOVE SQLCODE TO" DESCRIPTORD0867VALUEcnt1java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 PERFORMDECLARE SQL S0867
TYPE EXEC ALLOCATE MOVETO
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 DISPLAY" "
DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 "C0867INTOcnt1java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
CHCKOK EXEC "" DISPLAY; PERFORM CHCKOKDISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
v iscnt1
(cnt1=22 then MOVE 0 TODISPLAY"EXEC C0867 INTO: END-EXEC END-IF
DISPLAYSQL'D0867'VALUE END-EXEC MOVE = 6 DISPLAY"SQLCODE SQLCODE SQL-COD DISPLAY"SQLSTATE should be 02000; its END-IF
EXIT-NOSUBCLASS SQL cnt1
0TO END-IF
NORMSQ0NORMSQ) then
SQLSTATE"DESCRIPTOR''nt1 END-IFDISPLAY , DISPLAY" "
"OMMITWORK; SQL , MOVE SQLCODE TO kywd6
CHCKOK DISPLAYEND-IF
if" =java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 17 DISPLAY" *** pass DISPLAY "" EXECINSERT.
VALUESDISPLAY" WORK;" MOVESQL''VALUE else = 6 DISPLAYdml164 * *java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 SQL HU "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
SQL-COD COMPUTE **pass END-IF
DISPLAYDISPLAYTYPE
SQLEND-EXEC
EXEC SQL SET DESCRIPTOR 'D0867' VALUE :cnt1 ******************** BEGIN TEST0868 ******************* MOVE 1 TOINSERT .TESTREPORT1
MOVE******************** END TEST0867 ********************
D wrd7
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY"WHERENOTUNIQUE ("PERFORM
D "References" DISPLAYDISPLAYF# " = ADEG_LONGITUDE;java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 EXECSQLSELECT java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 "LENGTH=7"
WHERE *Find how many data sets are redundant SQL DESCRIPTOR:cnt1 SELECT
WHERE = A.DEG_LATITUDEFROM"
UDE)ERFORM MOVE SQLCODE FROM PERFORM CHCKOKDISPLAYEXEC''java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 DISPLAY"DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 if"ETCHC0867INTO cnt1" TO END-IF
*True on zero rows.
DISPLAY"SELECT COUNT(*) INTO DISPLAY" should value
WORKS DISPLAY MOVE DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY"QLSTATE 000; " DISPLAY =')"
D WHEREBjava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 51 END-IF
(SELECT EMPNUMEXEC (INTO
M =BEMPNUM AND GRADE = 13
( 0"NOT java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 END-IF PERFORM CHCKOK DISPLAYcnt1itscnt1 MOVE SQL-COD TO MOVE 0 TO flag " END-IF
DISPLAY"END-IF EXECSQL WORK
SQLCODE
CHCKOK TO
if ( flag = 1 MOVETO SQL-COD
* *** " EXECSQLINSERTINTO HU SQLDISPLAY*pass
VALUES(08,pass8,failjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 MOVE SQLCODE
else DISPLAY" dml164.co* ** java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 EXECSQLINSERTINTO HU '08,',' END-EXEC MOVE SQLCODE TO SQL-COD COMPUTE errcnt = errcnt + 1 END-IF
EXECSQL COMMIT WORK END-EXEC MOVE SQLCODE TO SQL-COD "TEST0868" ******************** END TEST0868 ******************** ******************** BEGIN TEST0869 ******************* MOVE 1 TO flag
COMPUTE = -1 " java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
"TABLEBILLS_SENT ( DISPLAY" BILLID INT PRIMARY KEY," EXECCOUNT) : "FROMTIDESLOCATIONSA
BILLID INT PRIMARY KEYDISPLAY BILLIDPRIMARY
BILLAMOUNT DECIMAL(7,SELECTFROM.LOCATIONS MOVETOSQL-COD ANDDEG_LONGITUDE DEG_LONGITUDEEND-EXEC DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
"WORK" EXECSQLMOVETO flag MOVE
PERFORM DISPLAY" "
DISPLAY"CREATE TABLE PAYMENTS (" DISPLAY INT DISPLAY" PAYID INT PRIMARY KEY," DISPLAY DECIMAL(,2);java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 EXEC CREATE AND 3
BILLID"
PAYIDjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
PAYAMOUNT,)) java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 MOVE EMPNUM B
AEMPNUM "
= 'Deale') END-EXEC INT EXECSQL SQLCODE SQL-COD MOVETOISPLAY should ;ts" java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 PERFORM CHCKOK DISPLAY"PERFORM CHCKOK
D "COMMIT WORK;"
CORRESPONDING PAYMENTS EXECEXECEND-EXECTO
EXCEPTDISPLAY"
DISPLAY NSERT HCKOK DISPLAY ,100; EXEC
00.0END-EXEC MOVE SQLCODE TO errcnt SQL COMMIT PERFORM CHCKOK DISPLAY"=========================java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
DISPLAY
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
INTO
,00)END-EXECDISPLAY table MOVE SQLCODE TO SQL-COD CHCKOK
CHCKOK DISPLAY" " - -- -- " INTOILLS_SENTVALUES ("
DISPLAY"INSERT INTO BILLS_SENT VALUES (" DISPLAY" ,50.0;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 EXECSQLINSERTINTO BILLS_SENT SQLCODE SQL-COD
2, 50.00) END-EXEC MOVE SQLCODE TO SQL-CODDISPLAY"CREATE TABLE BILLS_SENT (" PERFORM CHCKOK DISPLAY BILLAMOUNT) "INSERTINTOBILLS_SENT(java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
DISPLAY"INSERT INTO PAYMENTS VALUES (" "1,2, 000;" EXECSQLDISPLAY PAYID ,
1, 2, 40.00) END-EXEC MOVE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 PERFORM CHCKOK
1 0)
COMMIT SQL WORKjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 MOVE SQLCODE TO SQL-COD
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
0 java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0 DISPLAY"SELECT BILLID INTO :cnt1"
ISPLAY ; SQL BILLID:java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 FROM NO_PAY END-EXEC MOVE SQLCODE java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
hould 2 its is,cnt1 if(nt1 = 2) java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 MOVE 0 TO flagEXECSQL VIEW NO_PAY SELECT *FROMjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 END-IF
DISPLAYCOMMIT EXECSQL COMMITPERFORM MOVE SQLCODE TO SQL-COD PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAYDISPLAY"SELECT :"
DISPLAY NO_PAY DISPLAY" PORTVAL INT);" EXEC SQLCODE TO
PORTVAL) java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 MOVE SQLCODE SQL-COD DISPLAY" DISPLAY" "
DISPLAY"COMMIT WORK;" SQL WORK MOVETO PERFORM CHCKOK DISPLAY" "
DISPLAY" CORRECT_AND_LOSSY PORTVAL" DISPLAY" AS SELECT * FROM CORRECT_OUTPUT INTERSECT ALL"
DISPALYPORTVALLOSSY_OUTPUT EXECSQL CREATE VIEW CORRECT_AND_LOSSY (PORTVAL)
AS SELECT * FROM CORRECT_OUTPUT INTERSECT SELECT PORTVAL FROMjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 36 MOVE SQLCODE PERFORM CHCKOK DISPLAY" "
" "0 0 0.0;" EXECSQL COMMIT WORK END-EXEC MOVE SQLCODE TO SQL-COD PERFORMCHCKOK 0100END-EXEC DISPLAY" "
DISPLAY" INTO LOSSY_OUTPUT CHCKOK EXECSQLINSERTINTO LOSSY_OUTPUT VALUES java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
PERFORM" WORK;" EXEC COMMIT END-EXEC
DISPLAY"INSERT INTO LOSSY_OUTPUT VALUES (2);" EXECSQLINSERTINTO LOSSY_OUTPUT VALUES (2) END-EXEC MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"INSERT INTO LOSSY_OUTPUT VALUES (1);" EXECSQLINSERTINTO LOSSY_OUTPUT VALUES (1) END-EXEC MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"INSERT INTO LOSSY_OUTPUT VALUES (1);" EXECSQLINSERTINTO LOSSY_OUTPUT VALUES (1) END-EXEC MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"INSERT INTO LOSSY_OUTPUT VALUES (3);" EXECSQLINSERTINTO LOSSY_OUTPUT VALUES (3) END-EXEC MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"INSERT INTO LOSSY_OUTPUT VALUES (4);" EXECSQL,,4.0 END-EXEC
SQLCODE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 PERFORM CHCKOK ""
DISPLAY"INSERT INTO LOSSY_OUTPUT VALUES (1);" EXECSQLINSERTINTO LOSSY_OUTPUT VALUESP CHCKOK MOVE SQLCODE TO SQL-COD
CHCKOK DISPLAY" "
DISPLAY"INSERT INTO LOSSY_OUTPUT VALUES (3);" SQL" MOVE SQLCODE TO SQL-COD PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY" java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY"INSERT INTO LOSSY_OUTPUT VALUES (2);" EXECSQLINSERTINTO LOSSY_OUTPUT MOVEEXECSQLINTO VALUES END-EXEC
0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 PERFORM CHCKOK DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
*Changes: two more 1s; a 3 changed to a 4
DISPLAY"INSERTINTO CORRECT_OUTPUTVALUES(1)" SQL CORRECT_OUTPUT () MOVE SQLCODE "cnt1should bejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 PERFORM CHCKOK DISPLAY" "
DISPLAY"INSERT INTO CORRECT_OUTPUTDISPALY ROMLOSSY_OUTPUT" EXECSQLINSERTINTO CORRECT_OUTPUT
java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 36
CHCKOK DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAYINSERT (;java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 EXECSQLINSERTDISPLAY" " MOVE SQLCODE TO SQL-COD
"NSERTINTOC 2;java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 EXECINSERT CORRECT_OUTPUT (2) END-EXEC MOVE SQLCODE TO"" PERFORM CHCKOK DISPLAY" "
DISPLAY" EXECSQL INSERT INTO CORRECT_OUTPUT VALUES (1) END-EXEC MOVETO " CORRECT_OUTPUT EXCEPTPERFORMCHCKOK DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 SQL C0869 SELECTFROM
CORRECT_OUTPUT ALLSELECT LOSSY_OUTPUT
MOVE TOSQL-COD
N C0869 EXECSQLOPEN C0869 END-EXEC MOVE SQLCODE TO PERFORMDISPLAYINSERTINTOLOSSY_OUTPUT (;
java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 25
MOVE 0 TO cnt1 DISPLAY"FETCH C0869 INTO :cnt1;" SQL C0869: "NSERT 1; MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY"cnt1 should be 1; its value is ""INSERTINTOCORRECT_OUTPUT (1);" if"INSERT INTO LOSSY_OUTPUT VALUES (4);" MOVE 0 TO flag END-IF
MOVETO DISPLAY"FETCH C0869 INTO : PERFORMCHCKOK EXECFETCH java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 TO PERFORM CHCKOK DISPLAY"cnt1 should be 1; its value is ", cnt1
(cnt1 = 1) then MOVE 0 TO flag END-IF
OVE nt1 DISPLAY"FETCH C0869 INTO :cnt1;" SQLEXEC 3)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 MOVE SQLCODE SQL-COD PERFORM CHCKOK DISPLAY"cnt1 should be 4; its value is ", cnt1 if (cnt1 NOT = " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 TOflag END-IF
DISPLAY"FETCH C0869 INTO :cnt1;" EXEC FETCH INTO cnt1 MOVE SQLCODE TOPERFORM " should be 10; itsvalueis" SQL-COD DISPLAY"SQLSTATE DISPLAY"INTOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 PERFORM THRUjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 if (SQLCODE NOT = 10 SQLCODE SQL-COD MOVE 0 TO flag END-IF ifNORMSQ 0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 then DISPLAYINTO VALUES
SQLCODE DISPLAYPERFORM
DISPLAY"CLOSE C0869;" EXEC DISPLAY" INTO java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 PERFORM CHCKOK DISPLAY" java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
MOVE 0PERFORM DISPLAYSELECT* cnt1 DISPLAY" FROM CORRECT_AND_LOSSY" DISPLAY" WHERE PORTVAL = 1;" EXECSQLSELECTCOUNT(*) INTO :cnt1 EXECINSERTINTO CORRECT_OUTPUT VALUES1)END-EXECSQLINTOCORRECT_OUTPUT (2) END-EXEC FROM CORRECT_AND_LOSSY
PORTVAL 1 MOVE SQLCODE TO
ERFORM DISPLAY"cnt1 should be 5; its value "ORDER;"
(cnt1=5 then SQLCODE SQL-COD MOVEPERFORM BY PORTVAL
0TO cnt1 " COUNT(*INTO:nt1java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 DISPLAY"FROM "
AY ;java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 EXECSQLDISPLAY"" FROM CORRECT_AND_LOSSY INSERTCORRECT_OUTPUT O cnt1
WHERE PORTVAL = 2 END-EXEC MOVESQLCODE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
M CHCKOK DISPLAY"cnt1 should PERFORM CHCKOK " should " CORRECT_OUTPUT(1java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 MOVEXEC INSERT ORRECT_OUTPUT ()END-EXEC END-IF
MOVEPERFORM DISPLAY"SELECT COUNT(*) INTO DISPLAY CORRECT_AND_LOSSY DISPLAY" WHERE PORTVAL = 3;" EXECSELECT()INTO java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 FROM CORRECT_AND_LOSSY
PORTVAL 3END-EXEC MOVE SQLCODE CHCKOK
RFORM " ORRECT_OUTPUTVALUES(1) SQLINTO VALUES1)END-EXEC if (cnt1 NOT = 1) then CHCKOK MOVE 0 TO flag END-IF
MOVE 0 TO " CORRECT_OUTPUTVALUES4;java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 DISPLAY" FROM CORRECT_AND_LOSSY" DISPLAY" WHERE PORTVAL = 4;" SQLCOUNT)INTO VALUES(4 java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 FROM CORRECT_AND_LOSSY
WHERE = 4 END-EXEC MOVE SQLCODE TO SQL-COD
KOK DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (cnt1 NOT = 1) then MOVE 0 TO flag END-IF
DISPLAY"COMMIT WORK" EXECSQL COMMIT WORK END-EXEC MOVE SQLCODE TO SQL-COD
CHCKOK DISPLAY" "
DISPLAY"DROP VIEW CORRECT_AND_LOSSY if SQLCODE NOT=10ORNORMSQNOT= 0000)then SQL VIEWCORRECT_AND_LOSSY END-EXEC MOVE SQLCODE PERFORMif(NORMSQ 020" NORMSQNOT java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
ORRECT_OUTPUT "ValidSQLSTATE "
DISPLAYDROPLOSSY_OUTPUT DISPLAY ()INTOjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 EXECSQLDISPLAY =3" MOVE SQL-COD
CHCKOK DISPLAY" "
DISPLAYCOMMIT EXECSQL COMMIT java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 36 PERFORM CHCKOK DISPLAY" "
( flagthen DISPLAYDISPLAY EXECSQLINSERTDISPLAY"
VALUES OVE TO DISPLAYSELECTINTO" else "dml164. *** *** " EXECSQLINSERTINTO
VALUES('0869','fail','PCO') END-EXEC MOVE SQLCODE TO SQL-COD CORRECT_AND_LOSSY COMPUTE = + 1 END-IF
DISPLAY" " should 1;its is java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
MOVE WHERE PORTVAL = 1END-EXEC ******************** END TEST0869 ******************** **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 STOP.
* **** Procedures for PERFORM statements
*Test SQLCODE and SQLSTATE for normal completion.
CHCKOK.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAYSQLSTATE000; valuejava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 PERFORM NOSUBCLASSDISPLAY" SQLCODET java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 DISPLAY MOVE 0 TO flag " ;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 END-IF if (NORMSQ = "00000"AND NORMSQ NOT = SQLSTATE) then DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF
.
" should be 2 itsvalueis",
*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 CHCKOK SQL ( INTO
MOVE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 *subclass begins in position 3 of char array NORMSQ *valid subclass begins with 5-9, I-Z, end of ALPNUM table PERFORM* DML185.PCO if (NORMSQX(norm1) = ALPNUM * This routine tests Transitional SQL. 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 = ) thenDROP ;" GOTO EXIT-NOSUBCLASS TO
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
DISPLAYcnt11 java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 35 *examining position 4 of char array NORMSQ *valid characters are 0-9, A-Z
norm2 1 BYE DISPLA if DROP
1 PIC) SIGN END-IF END-PERFORM
MOVEMOVE ," uidx *valid characters are 0-9, A-Z *examining position 5 of char array NORMSQ PERFORMVARYING SQLCODETO SQL-COD
(ORMSQX)= ) MOVE"0"TO NORMSQX(norm1) END-IF"
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
*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) = " DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 MOVETO2 END-IF
.
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.