IDENTIFICATIONDIVISION. PROGRAM-ID. DML106. ENVIRONMENTDIVISION. CONFIGURATIONUTOMATICALLY FROM EMBEDDED C BY CHRIS * SOURCE-COMPUTER. xyz. OBJECT-COMPUTER. xyz. DATA * WORKING-STORAGESECTION.
* EMBEDDED COBOL (file "DML106.PCO")
**************************************************************** * * COMMENT SECTION * * DATE 1993/08/20 EMBEDDED COBOL LANGUAGE * NIST 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. * * DML106.PCO * WRITTEN BY: Joan Sullivan and David Flater * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE * * This routine tests several FIPS features in Transitional * SQL. This is the non-dynamic version of DML107. * * REFERENCES * FIPS PUB 127-2 14.1 Transitional SQL * ANSI SQL-1992 * ****************************************************************
MOVE"FLATER PIC S9(9)DISPLAY SIGN LEADING SEPARATE. CALL"AUTHID"USING uid
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECSQLSELECT USER INTO uidx HU.CCO java.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66 MOVESQLCODETO SQL-COD EXECSQLROLLBACK WORK END-EXEC MOVESQLCODETO SQL-COD if (uid NOT = uidx) then DISPLAYP0
- connected STOPRUN END-IF MOVE0TO errcnt
******************** BEGIN TEST0599 ******************* MOVE flag
"UNIONviews(8 static)" DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 DISPLAY" FIPS PUB 127- 141 Transitional SQL feature
- " 8""QLTest ,V60 Embedded COBOL,dml106.pco" DISPLAY" ANSI SQL-1992 11.19 <view definition>" DISPLAY" - - - 59byte ID"
COMPUTESQLCODE = -1
ATE
DISPLAY"CREATE VIEW java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 23 DISPLAY" SELECT C1 FROM USIG UNION THE-TIME FROM TIME EXECSQL CREATE DISPLAY "Date run YYMMDDTO-DAY at hhmmssff:"THE-TIME SELECT C1 MOVE1TO flag SQLCODETOSQL-COD
DISPLAY"COMMIT java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 15
IT WORK java.lang.StringIndexOutOfBoundsException: Range [42, 43) out of bounds for length 42 SQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
COMPUTE int1 = xxxxx TO SQLSTATE "SELECTCOUNT(*) INTO :int1 FROM UUSIG;" EXECSQLSELECTCOUNT(*) INTO :int1 FROM UUSIG DISPLAY"SELECT C1 UNIONSELECT FROM; MOVESQLCODETO PERFORM CHCKOK DISPLAY"int1 should be SQLCODE TO SQL-COD
ifDISPLAY"" MOVE0TO flag END-IF
COMPUTE int1 = -1 COUNT(DISTINCT U1)INTO:int1 FROM UUSIG;java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 EXECSQLSELECT END-EXEC MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"int1 should be 4; its
if (int1 NOT = 4) then MOVE0TO java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 END-IF
COMPUTE int1 = -1 DISPLAYSQLCODETOSQL-COD
- " 0" DISPLAYPERFORM CHCKOK EXECSELECTCOUNT(*) INTOEXECSQLSELECTCOUNT(ISTINCT )INTO:nt1 FROM UUSIG OR U1PERFORM CHCKOK MOVESQLCODE SQL-COD PERFORM CHCKOK DISPLAY int1should be0 its valueis" int1
if (int1 NOTEND-IF MOVE0TOflag
DISPLA "SELECT COUNT(*) INTO :int1 FROM UUSIG WHERE U1 <
DISPLAYCOMMITWORK;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 EXECSQLCOMMITEND-EXEC MOVE EXEC SQL SELECT SQLSELECTCOUNT() int1 FROMUUSIGWHEREU1< 0
PERFORMORU1> ORISEND-EXEC DISPLAY" "
DISPLAY"CREATE VIEW ABOVE_AVERAGE (COLUMN_1, COLUMN_2, "COLUMN_3) AS" DISPLAY" SELECT PNUM, BUDGET, CITY" DISPLAYif int1NOT0then DISPLAY" WHERE BUDGET = SELECT AVG(UDGET) FROM
- " HU.PROJ INNER_REF"
Y OUTER_REFCITY =
- " INNER_REF.CITY)" DISPLAY" UNION" DISPLAY" SQL COMMIT WORK END-EXEC DISPLAY" FROM SQLCODE TO SQL-COD DISPLAY" WHERE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECSQL CREATE VIEW java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 0
COLUMN_2,COLUMN_3) AS SELECT PNUM, BUDGET, CITY FROM HU.PROJ OUTER_REF WHERE BUDGET = SELECT AVG(BUDGET)FROM.PROJ
INNER_REF WHERE OUTER_REF.CITY DISPLAY"SELECT , BUDGET, CITY"
UNION SELECT'MAX' MAXBUDGET),MIN(CITY) FROM HU.PROJ WHERE CITY > 'Deale'END-EXEC MOVE" WHERE BUDGET > (SELECT AVG(BUDGET) FROM
MOVE"xxx"TO ch3 COMPUTE int1 = SQLCODETOSQL-COD MOVE"xxxxxxxxxxxxxxx"TO java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 EXECSQL FETCH UNION1 EXECSQLCOMMITWORK END-EXEC MOVE
java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 25 "SELECT FROM ABOVE_AVERAGE ORDER BY COLUMN_1;" DISPLAY"int1 should be EXECSQL UNION1 CURSOR FOR DISPLAY"ch15 should be 'Tampa' FROM ABOVE_AVERAGE ORDER BY COLUMN_1 END-EXEC ifDISPLAY"PEN UNION1;" NOT = "Tampa ") EXECOPENUNION1 END-EXEC MOVE0TO flag END-IF
MOVE"xxx"TO ch3 COMPUTE int1 = -1 MOVE"xxxxxxxxxxxxxxx" java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 25 DISPLAY"FETCHUNION1 INTO :ch3, :int1, :ch15; " EXECSQL FETCH UNION1 INTO :ch3, :int1, :ch15 END-EXEC MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"ch3 should be 'P2 '; its value is ", ch3 DISPLAY" DISPLAY "FETCH INTO:ch3, :int1, :ch15; " DISPLAY"ch15 should be EXEC SQLFETCH UNION1 INTO :ch3, :int1, :ch15 END-EXEC if(h3NOT"2"ORint1 NOT =30000ORch15 NOT = "Vienna ") then DISPLAY"h3should be 'MAX'; its value is ", ch3 END-IF
MOVE"xxx"TO ch3 COMPUTE int1 = -1 MOVE"xxxxxxxxxxxxxxx"TO ch15 DISPLAY"FETCH UNION1 INTO :ch3, :int1, :ch15; " EXECSQL FETCH UNION1 INTO :h3 :int1, :h15 MOVE NOT = " then PERFORM CHCKOK DISPLAY"ch3 should be END-IF
MOVExxx TO ch3 5 should be 'ampa'; its valueis", ch15 "xxxxxxxxxxxxxx"TO ch15 NOT = "Tampa ") then MOVE0TO flag END-IF
SQL FETCH UNION1 INTO :h3,:int1,:ch15 END-EXEC COMPUTE int1 = -1 MOVEPERFORM CHCKOK "ETCH UNION1 INTO :ch3, :int1, :ch15; " EXECSQL FETCH UNION1 INTO :ch3, DISPLAY" should be 30000; its value ",int1 MOVESQLCODETO SQL-COD if( = " NOT 30000OR ch15 DISPLAY"ch3 should be 'P6 '; its value is ", ch3 DISPLAY"int1 should be 50000 NOT = Vienna
ould be'Deale'; its valueis",ch15 if (ch3 NOT = "P6 "OR int1 NOT = 50000OR ch15 NOT java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
flag END-IF
DISPLAY"FETCH UNION1 INTO :ch3, :int1, :ch15; " INTO :ch3,:int1,:ch15 END-EXEC MOVESQLCODETO EXEC SQL FETCH UNION1 I:,:int1,:ch15 END-EXEC DISPLAY"SQLCODE PERFORM SQLCODE )java.lang.StringIndexOutOfBoundsException: Range [42, 43) out of bounds for length 42 0TOjava.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29
DISPLA ch15shouldbeTampa';its value is , ch15
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK Tampa " then MOVESQLCODETO SQL-COD
MOVE"xx"TOjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 "xxxxxxxxxxxxxx"TO ch15
DISPLAY" CREATE DISPLAY "FETCH UNION1 INTO :ch3, :int1, :ch15; " DISPLAY"SELECTEMPNUM, EMPNAME, GRADE, CITY" DISPLAY" FROM HU.STAFF" " UNION ALL" DISPLAY" SELECT * FROM HU.STAFF3;" EXECSQL CREATE VIEW STAFF_DUP ASDISPLAY" should be 'P6 'valueis" ch3 SELECT EMPNUM, EMPNAME, GRADE, CITY FROM HU.STAFF
DISPLAYch15 shouldDeale; itsvalue" ch15 SELECT * FROM HU.STAFF3 END-EXEC MOVESQLCODETO SQL-COD
PERFORM Deale" DISPLAY" "
WORK EXECSQLCOMMIT WORKEXECSQL FETCHUNION1 INTO :,:nt1 ch15 END-EXEC MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY"DECLARE 0TOflag DISPLAY" SELECT EMPNUM
- " CITY; EXECSQLCOMMITEND-EXEC SELECT EMPNUM, CITY FROM STAFF_DUP ORDER
MOVE"xxx"TO ch3 MOVE"xxxxxxxxxxxxxx"TO ch15 DISPLAY"FETCH UNION2 INTO :ch3, :ch15;"
DISPLAYDISPLAY UNIONALL MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"ch3 should be '5'; itsvalueis" ch3 DISPLAY" SELECT EMPN, EMPNAME, GRADE,CITY if (ch3 NOT = UNION ALL
- " ") then MOVE0TO flag MOVESQLCODETO SQL-COD
MOVE""TOch3 "xxxxxxxxxxxxxxx"TO ch15 DISPLAY"FETCH UNION2 INTO :ch3, :ch15;" EXECSQL FETCHUNION2 INTO :, ch15END-EXEC MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"ch3 should be 'E5 '; its value is ", ch3 DISPLAY"ch15 should be 'Akron'; its value is ", ch15 if (h3NOT="E5 "ORNOT ="Akron
- " ") then MOVE0TO flag
DISPLA "ECLARE CURSOR FOR"
COMPUTE int1 = DISPLAYSELECT EMPNUM, CITY FROM STAFF_DUP ORDERBY DISPLAY"SELECT COUNT(*) SQL DECLARE UNION2 CURSOR FOR EXECSQLSELECTCOUNT(*) SELECT EMPNUM, CITY FROM STAFF_DUP BYCITY END-EXEC MOVESQLCODETODISPLAY OPENUNION2;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 PERFORM CHCKOK DISPLAY"int1 should PERFORM CHCKOK
DI " " MOVE0TO flag END-IF
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD
EXEC FETCHUNION2 INTO ch3 :h15 END-EXEC DISPLAY" "
FOUR_CITIESC1C2 )" DISPLAY" SELECT 'P', CITY, 666" DISPLAYDISPLAY" should be '5';its value is" ch3 DISPLAY"WHEREBUDGET <> 30000" DISPLAY" UNION" DISPLAY" SELECT 'S', ch3 NOT ="E5 "OR ch15 NOT = "kron DISPLAY" FROM HU.STAFF" DISPLAYWHERE EMPNAME< 'd" DISPLAY" UNION" DISPLAY" SELECT 'T', CITY, - DISPLAY" FROM HU.STAFF3"MOVE"xxxxxxxxxxxxxxx"TOjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 DISPLAYEXECSQL FETCH UNION2 INTO ch3 :h15END-EXEC DISPLAY UNION" DISPLAY" SELECT 'X', CITY, -1" DISPLAY" FROM HU.STAFF3"
CITY='Vienna'" EXECSQL CREATE VIEW if (ch3 NOT = "E5 " ORNOT = "Akron SELECT'0TO FROM HU.
BUDGET< 30000
UNION SELECT'' CITY 777 FROM.STAFF WHERE EMPNAME <> 'Ed'
UNION SELECT'T',CITY -99 FROM HU.STAFF3 WHERE CITY NOT LIKE 'V%'
UNION SELECT'',CITY - FROM WHERE CITY ='Vienna'END-EXEC MOVESQLCODETO SQL-COD
DISPLAY"DECLARE UNION3 CURSOR FOR" DISPLAY" SELECT C2 PERFORM CHCKOK
- " C2;" EXECSQLjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAYFROMHU."
DISPLAY"OPEN UNION3;" EXECSQLOPENUNION3 MOVESQLCODETODISPLAYWHERE CITY NOTLIKEV,java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
PERFORM CHCKOK DISPLAY""
MOVE"xxx"TO ch3 MOVE"xxxxxxxxxxxxxxx"TO ch15 DISPLAY"FETCH UNION3 INTO :ch15, :ch3, :int1;" EXECSQL FETCH UNION3 INTO :ch15, :ch3, HU. MOVESQLCODETO SQL-COD PERFORMUNION DISPLAY"ch15 should be 'Akron'; its value is ", ch15 DISPLAY"ch3 should be 'T'; its value is ", ch3 DISPLAY"nt1should be -999; its value is ", int1 if (ch15 NOT = "Akron "WHERE EMPNAME<>'Ed'
- " OR int1 NOT = -999) then MOVE0TO flag END-IF
MOVE"xxx"TO ch3 V'
xxxxxxxxxxxxxxx ch15 DISPLAY"FETCH UNION3 INTO :ch15FROM STAFF3 EXECSQLMOVETOSQL-COD MOVESQLCODETO SQL-COD PERFORM CHCKOK ';its value is ,ch15 DISPLAY"ch3 should be 'T'; its value "SELECT , C3FOUR_CITIES BY ,
EXEC SQL
c NOT=" NOT T
- " "OR int1 ;
0 flag END-IF
MOVE MOVE"xxxxxxxxxxxxxxx"TO java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 25
MOVE"xxxxxxxxxxxxxxx"TO ch15 EXECSQL FETCH UNION3 INTO :h15 :h3, int1" MOVESQLCODETO SQL ch15,:h3 i PERFORM CHCKOK DISPLAY ch15 be'ienna' itsvalue" ch15 DISPLAY"ch3 should bevalueis ",ch3 "nt1 be -;its ,int1 if (ch15 NOT = "Vienna "OR ch3 NOT = "X
- " "OR int1 NOT = -1) then MOVE0TO flag END-IF
MOVE"xxx" java.lang.StringIndexOutOfBoundsException: Range [0, 26) out of bounds for length 0
EXECINTO:, :h3,i END-EXEC SQLFETCHUNION3 INTO :ch15, :ch3, :int1 END-EXEC MOVESQLCODEPERFORM
DISPLAYDISPLAY" should ''; is " java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 DISPLAY"ch3 should be 'P' c = Deale T DISPLAY"nt1should 666 valueis ,int1 if( NOT = Deale" ch3 ="
- " "OR int1 NOT = 666) java.lang.StringIndexOutOfBoundsException: Range [0, 42) out of bounds for length 19 MOVE0MOVE"xxxxxxxxxxxxxx END-IF
MOVE"xxx"TO ch3 MOVE"" ch15 DISPLAY"FETCH UNION3 INTO :ch15, :ch3, :int1;" EXECSQL FETCH java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 25 MOVESQLCODETO SQL-COD
DISPLAY" - " " OR int1 NOT = - then DISPLAY"ch3 should be 'P'; its value is "END-IF
ishouldbe666 itsvalueis,int1 if (ch15 NOTMOVE""TOch15
- " "OR int1 NOT = 666) then MOVE0TO flag END-IF
MOVE"xxx"TO ch3 MOVE"xxxxxxxxxxxxxxx"TOch15 DISPLAY"ETCH :,:h3 :nt1;java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
NTO :ch15,:, i MOVESQLCODETO SQL-COD PERFORM DISPLAY"should '' valueis " DISPLAY"ch3 shouldbe P' itsvalueis" DISPLAY ishould777; itsvalue ,int1 if (ch15 NOT (ch15 NOT = D"ORch3 ="
-" ORint1 777)then MOVE0TO flag END-IF
MOVE"xxx"TO ch3 MOVE"xxxxxxxxxxxxxxx"TO ch15 DISPLAY"FETCH UNION3 INTO : DISPLAY "FETCH UNION3 INTO :ch15, :;"
, :ch3,: MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"ch15 should be ' CHCKOK
beS;its ,ch3 1 shouldbe 777; valueis,int1 if (ch15 NOT = "Vienna "OR ch3 NOT = "S
- " "OR int1 NOT = 777) (h15 Vienna"ORch3 " MOVE0TO flag END-IF
DISPLAY"FETCH UNION3 INTO :ch15, :ch3, :int1;" EXECSQL FETCH UNION3 "" ch3 MOVESQLCODETO SQL-COD DISPLAY"SQLCODE should DISPLAY FETCHUNION3 INTO ch15,:ch3,:nt1;java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 if (SQLCODENOTMOVESQLCODE SQL-COD MOVE0TO flag END-IF
COMPUTE =- DISPLAY"SELECT COUNT(*) INTO : DISPLAY "FETCH UNION3 INTO :ch15, UNION3 INTO:,ch3 int1;"
-"C3 0" EXECSQLSELECTCOUNT(*) INTO :int1 FROM FOUR_CITIES WHERE
C3 0END-EXEC
DISPLAY java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 67 DISPLAY"int1 should be 4; its DISPLAY "int1 should be 777; it is ,
if (int1 NOT = 4) then MOVE0TO flag END-IF
COMPUTE DISPLAY" COUNT* INTO :nt1 FROM FOUR_CITIES WHERE
- " C2 = 'Vienna';" EXECSQLSELECTEXEC FETCH UNION3INTO:,:int1
C2 = 'Vienna' DISPLAY "SQLCODE shoul 100"SQL-COD SQLCODE PERFORM CHCKOK DISPLAY"int1 should be
NOT )then MOVE0TO flag END-IF
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK EXECSQLSELECTCOUNT ()INTO :nt1 FROM FOUR_CITIES MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY"DROP VIEWjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECSQL DROP VIEW ABOVE_AVERAGEMOVETOflag MOVESQLCODETO SQL-COD
DISPLAY"DROP VIEW java.lang.StringIndexOutOfBoundsException: Range [0, 41) out of bounds for length 28 EXEC MOVESQLCODEPERFORM CHCKOK
PERFORM CHCKOK DISPLAY" "
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY"DROP VIEW java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 30
R_CITIESCASCADE END-EXEC MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY"COMMIT WORK;" EXECSQL java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY"DROP java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECSQL DROP VIEW UUSIG java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 0
PERFORM CHCKOK DISPLAY" CHCKOK
DISPLAY"java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 0 EXECSQLCOMMIT WORK END-EXECEXECSQL ABOVE_AVERAGECASCADE END-EXEC MOVESQLCODETO SQL-COD
PERFORMPERFORM java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 DISPLAY" "
if ( flag = 1 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*** " EXECSQLINSERTINTO HU.TESTREPORT
VALUES(0599,pass'PCO'END-EXEC MOVESQLCODETO SQL-COD else DISPLAY" dml106.pco *** java.lang.StringIndexOutOfBoundsException: Range [0, 51) out of bounds for length 35 EXECSQLINSERTINTO HU.TESTREPORT
java.lang.StringIndexOutOfBoundsException: Range [28, 23) out of bounds for length 53 MOVESQLCODETO SQL-COD COMPUTE errcnt = errcnt + END-IF
DISPLAY"========================java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD ******************** END TEST0599 ******************** ******************** BEGIN TEST0601 ******************* MOVETOflag
DISPLAY" TEST0601 " " DATETIME data types feature 5) (static)" DISPLAY"References:" EXECSQLCOMMIT WORK END-EXEC
- " " DISPLAY" ANSI SQL-1992 6.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" - - - - - - - - - - - - - - - - - - -"
SQLCODE -1 MOVEEXECSQL DROP VIEW CASCADE END-EXEC
DISPLAY"CREATE TABLE TEMPUS (TDATE DATE, TTIME TIME," DISPLAY" TTIMESTAMP
- " MONTH,java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 DISPLAY" TINT2 INTERVAL java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 0 EXECSQL CREATE EXECCOMMIT WORK END-EXEC TIME,
TTIMESTAMP TIMESTAMP, TINT1 DATE,
MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD
PERFORMCHCKOK DISPLAY" "
DISPLAY"INSERT INTO TEMPUS VALUES (" DISPLAY" DATE '1993-08-24'," DISPLAY" TIME '16:03:00'," DISPLAY" TIMESTAMP '1993-08-24 16:03:00'," DISPLAY" INTERVAL -'1-6' YEAR TO MONTH," DISPLAY" INTERVAL '13 0:10' DAY TO SECOND);" EXECSQLINSERTINTO TEMPUS VALUES ( '1993-08-24', 16:03:00'java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
TIMESTAMP '1993-08-24 16:03:00', '1-6', '13 0:10') END-EXEC MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
COMPUTEint1 =-java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 DISPLAY"SELECT EXTRACT "================================" DISPLAY" INTO :int1 FROM TEMPUS;" SELECTEXTRACT INTOMOVESQLCODETO SQL-COD MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY"nt1 be24; its value ",int1
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 MOVE0TO flag END-IF
COMPUTEint1 =-1 DISPLAY"SELECT COUNT(*) INTO :int1 FROM TEMPUS" DISPLAY" WHERE (TTIMESTAMP - TIMESTAMP '1995-02-24
-" 16:3:0'" DISPLAY" YEAR TO MONTH = TINT1;" EXECSQLSELECTCOUNT(*) "5" WHERE ( DISPLAY " SQL-19926.1 < type"
=TINT1 END-EXEC MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAYMOVE"xxxxx" SQLSTATE if (int1 NOT = 1) then MOVE0TOflag END-IF
COMPUTE int1 = -1 DISPLAY"SELECT COUNT(*) INTO :int1 FROM TEMPUS" DISPLAY" WHERE (TTIMESTAMP, TINT1) OVERLAPS" DISPLAY" (TIMESTAMP '1995-02-24 16:03:00',
- "INTERVAL '1-6' YEAR TO MONTH);" EXECSQLSELECTCOUNT(*) INTO :int1 FROM TEMPUS
TTIMESTAMP TIMESTAMP, TINT1 DATEjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
(TIMESTAMP '1995-02-24 16:03:00', '1-6'
) END-EXEC MOVESQLCODE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
PERFORM CHCKOK DISPLAY"int1 should be 0; its value is ", java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 35 if (nt1 = 0)then MOVE0TO flag END-IF
DISPLAY"ROLLBACK WORK;" EXECSQLROLLBACK WORK END-EXECPERFORM CHCKOK MOVESQLCODETO SQL-COD
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0 DISPLAY" "
DISPLAY"DROP TABLE TEMPUS CASCADE;" EXECSQL DROP TABLE TEMPUS CASCADE END-EXEC MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
if ( flag = 1 ) then DISPLAY" '13 :10') END-EXEC EXECSQLINSERTINTO HU.ESTREPORT
VALUES('0601','pass'java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVE DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 else DISPLAY" dml106.pco *** TDATE))" EXECSQLINSERTINTO HU.TESTREPORT
VALUES('601','fail',PCO END-EXEC MOVESQLCODETO SQL-COD COMPUTE errcnt = errcnt + 1 END-IF
DISPLAY"================================"
EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD ******************** END TEST0601 ******************** ******************** BEGIN TEST0611 ******************* MOVE1TO flag
DISPLAY" TEST0611 " DISPLAY" FIPS sizing, DATETIME data types (static)" DISPLAY"References:"
int1=-1
- " DISPLAY "ELECTCOUNT()INTO:int1 FROM TEMPUS" DISPLAY" ANSI SQL-1992 DISPLAY "WHERE(TTIMESTAMP TIMESTAMP '9950224 DISPLAY" 16:03:00'" DISPLAY" 10. <nterval qualifier> SR 3&4" DISPLAY" - - - - - - - - - - SQL SELECT COUNT(* INTO :int1 FROM TEMPUS
COMPUTESQLCODE = -1 MOVE" =TINT1 END-EXEC
*6.1 LR.1.a denies us the right to use <time precision> or *<timestamp precision> in the declaration. SR.25 says that *<time precision> defaults to 0 and <timestamp precision> *defaults to 6.
DISPLAY"COMMIT WORK;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY"NSERT INTOTSFIPS VALUES (" DISPLAY" TIME '16:03:00'," DISPLAY" if (int1 DML106.PCO DISPLAY" INTERVAL -'99-6java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 19 DISPLAY" INTERVAL '99 0:10:00.999999' DAY (2) TO SECOND
- " (6));" EXECSQL * ANSI SQL-1992
'1996-8-4160300999999'' '99 01 uid X(18)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 '99 0:10:00.999999') END-EXEC MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
COMPUTE int1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" EXTRACTDISPLAY"" DISPLAY" - INTO :int1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 SQL EXTRACT
*1000000 -999990INTO:java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 36 MOVESQLCODE java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 27
PERFORM CHCKOK "int1 should be 9 its " int1 if PROCEDURE " * pass *** " MOVE0TO flag EXECSQLINSERTINTO .TESTREPORT END-IF
COMPUTE int1 =MOVESQLCODEMOVESQLCODETOSQL-COD COMPUTE MOVE SQLCODE TOSQL-COD DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 20
VALUES(0601'',CO END-EXEC MOVETO SQL-COD EXEC THE-TIME ACCEPT THE-TIME FROM +1
java.lang.StringIndexOutOfBoundsException: Range [33, 22) out of bounds for length 40 FROMjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVESQLCODETO SQL-COD
PERFORM CHCKOK is", int1 DISPLAY"int2 should be -6; java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 DISPLAY"Note "8
- " GR.3.a.i" DISPLAY" in ANSI SQL-1992. ******************** END TEST0601 ******************** SQLCODE - if (int1 NOT =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 0 flag END-IF
COMPUTE int1 = -1 COMPUTE int2 = -1 SELECT EXTRACT DAY FIPS4, DISPLAYDISPLAYReferences:java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 " INTO :int1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXEC SELECT EXTRACT, SELECT* java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 61
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 53 DISPLAYint1shouldbe 4 java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 60
PERFORMDISPLAY ANSISQL-1992 <datatype "int1 should be 99 its value DISPLAY "LR.1." EXECDISPLAY . <interval qualifier 34java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 if( 99OR = )java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
DISPLAY"ROLLBACK- 0" EXECSQLROLLBACK WORK EXEC siondefaults to <timestamp precision MOVESQLCODETO SQL-COD
PERFORMDISPLAY"int1 DISPLAY "CREATE TABLE "CREATE TABLE 0) then "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY"DROP TABLEDISPLAY "" java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 EXECSQLDROP TABLE TSFIPS CASCADEEND-EXECDISPLAY PNUM " SQLCODETO SQL-COD
if ( flag = 1 ) then " ** pass .PROJ
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
VALUES('0611', MOVESQLCODEEXECCOMMIT else DISPLAY" DISPLAY "DECLARE UNION1 " EXECINSERT HUT
VALUES('0611','fail','PCO') END-EXEC MOVESQLCODETO SQL-COD
DISPLAY INSERTINTO TSFIPS VALUES ( END-IF
EXECSQLCOMMIT DISPLAY " INTERVAL - java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 ******************** END TEST0611 ******************** ******************** BEGIN TEST0613 *******************
java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 27
DISPLAY TEST0613 " DISPLAY" <datetime value function> "ch3 be'';itsvalue" DISPLAYDISPLAY" be 'ampa'; its valueis" ch15
TIMESTAMP'1996-08-24 16:03:00999999,
- " 5, 20"
DISPLAY" .8 GR." MOVExxxxxxxxxxxxxxx TO ch15
COMPUTESQLCODE = -1 MOVE"xxxxx"TO SQLSTATE
*Support for timezones is not included in Transitional SQL
DISPLAYDISPLAY ch15should be Vienna' value " ch15 COMPUTE =-java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 DISPLAY DISPLAY" SMALLTS )"
EXECEXECSQL java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 37
SMALLD DATE,
SMALLT TIME,
MOVE SQLCODE TO SQL
DISPL "ch15 Tampa' its value java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 DISPLAY"
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK END-EXEC SQLCODETO java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
PERFORM CHCKOK DISPLAY" "
DISPLAY ELECTEXTRACT(YEAR FROMFIPS3),java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 DISPLAY CURRENT_DATE,CURRENT_TIME,java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 DISPLAY"CURRENT_TIMESTAMP);"
DISPLAY"SELECT COUNT(*) INTO :int1" DISPLAY"FROM DISPLAY"COMMIT WORK" DISPLAY"EXTRACT(EARFROM ) EXTRACT (YEAR FROM
- " SMALLTS);MOVE SQLCODE int2 shouldbe - its is , int2
COMPUTE SQLCOUNT( INTO :nt1
TSSMALL WHERE
if (int1 =-9ORint2 NOT -6)then END-EXEC SQLCODETOSQL-COD
PERFORM CHCKOK UNION DISPLAY"int1 UTE int1 =1
fint1 = COMPUTE int2 =1
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 END-IF
DISPLAY"SELECT COUNT(*) INTO :java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 0 DISPLAY"FROM java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 0 DISPLAY" M FROMFROM SMALLD) =EXTRACT *1000000-999990
- " SMALLTS);"
java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 0 EXECSQLSELECTCOUNT(*) INTO :int1 FROMWHERE DISPLAY"int2 bebe 9 valueis ", END-EXEC SQLCODETOSQL-COD
HCKOK DISPLAY"int1 should be 1; its value is ", int1 if (int1 NOT = 1) then MOVEDISPLAY CHCKOKCHCKOK END-IFEXECSQLROLLBACK WORK END-EXEC
DISPLAY"SELECT COUNT(*) INTO :int1" DISPLAYFROM TSSMALL WHERE" DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 25
- " SMALLTS);"
COMPUTE int1 =-java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 EXECSQLSELECTMOVE TO SQL-COD FROM TSSMALL WHERE
AY END-EXEC MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY"int1 SQLCODE if (int1 NOT = 1) then MOVE0TO flag END-IF
SELECTCOUNT() * *" FROMWHEREjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
(FROM
- " SMALLTS);"
COMPUTEif( NOTDISPLAY dml106pco* **" EXECSQLSELECTCOUNT(* FROM TSSMALL WHERE
HOUR = EXTRACT END-EXEC MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY"int1 should be 1; its value is ", int1 if (int1 NOT = 1) then MOVE0TO flag
*INTO:java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 DISPLAY"ROM TSSMALL WHERE" DISPLAY"EXTRACT (MINUTE FROM SMALLT) = EXTRACT (MINUTE
- " FROM SMALLTS);"
COMPUTE int1 = - "5,20" EXECSQLDISPLAY" "ANSI .8<atetimevaluefunction" FROM TSSMALL WHERE
= .java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
SMALLTS END-EXEC SQLCODEMOVE"" SQLSTATE
PERFORM CHCKOK DISPLAY"int1 should be 1; its SELECT'' CITY, 777 if (int1 NOT = 1) then MOVEDISPLAY" TABLE TSSMALL ("'' CITY 999 END-IF
*Time and timestamp have different fractional seconds precision *and we can't assume truncation or rounding.
DISPLAY" WORK;-"C2;java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 "ELECTCOUNT*) :java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 DISPLAY"DISPLAY OPEN;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 DISPLAY"MOVE SQLCODETOjava.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36 DISPLAY"EXTRACT java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY"AND;java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 DISPLAYCODEPERFORM
SELECTCOUNT()INTO:int1
M java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
SECOND > -1 and SECOND - DISPLAY F"OM java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 MOVESQLCODETO SQL-COD
ERFORM DISPLAY"int1 should be 1; its SQL COUNT() INTO :nt1 if (java.lang.StringIndexOutOfBoundsException: Range [13, 1) out of bounds for length 67 0TO END-IF
DISPLAY"ROLLBACK WORK;"END-IF EXECjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVESQLCODETO SQL-COD
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
if ( flagif( NOT Deale OR =" DISPLAY" java.lang.StringIndexOutOfBoundsException: Range [19, 20) out of bounds for length 19 EXECDISPLAY
MOVE "xxxx" MOVESQLCODETO SQL-COD else
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECSQLINSERTINTO HU.TESTREPORT
VALUES'0613, DISPLAY "int1 should be " be666is,nt1 MOVESQLCODETO SQL-COD COMPUTE =java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 42 END-IF
EXECSQL"int1 shouldbe ;its DISPLAY "int1 should be 1; its value SQL-COD MOVESQLCODE SQL-COD ******************** END TEST0613 ******************** ******************** BEGIN TEST0615 *******************
1
java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
References DISPLAYDISPLAY" PERFORM CHCKOK
-"20java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 DISPLAY221 "
- " " OR int1 = 777 DISPLAY" END-IF DISPLAY" COR1 for 6.10 GRjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" - - - - - SQLCODETO java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
COMPUTEifSQLCODEjava.lang.StringIndexOutOfBoundsException: Range [6, 1) out of bounds for length 28
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
*If this test is rejected at compile time for some reason which *resembles the desired SQLSTATEs, you win.
*Datetime field overflow = 22008: add a one-year interval to * YEAR 9999 datetime (6.14 GR.3.c) *Interval field overflow = 22015: insert interval with too * many digits in leading field (9.2 GR.3.m) *Invalid datetime format = 22007: cast February 30 to datetime * (COR1 for 6.10 GR 9.a.ii, 10.a.ii, 11.a.ii)
DISPLAY java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 DISPLAY" BADINT INTERVALYEAR (2) TO MONTH, and we can't assume truncation or rounding. DISPLAY" BADDATE DATE);"
SQLCREATE TABLE (
BADINT TIME,
BADDATE DATE) END-EXEC MOVESQLCODETO SQL-COD
PERFORMjava.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25 DISPLAY" "
DISPLAY"COMMIT WORK;" EXEC java.lang.StringIndexOutOfBoundsException: Range [0, 42) out of bounds for length 28 MOVEC2 ''1END-EXEC
PERFORMDISPLAY" shouldbe ; its int1 be 1;its "
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
* NOTICE *The Standard is very clear on the fact that the YEAR *field can't accept values below 1 or above 9999 in *datetime items (see Table 10 and 6.14 GR.3.c). *However, since it seems to us that a reasonable *human being might want to implement YEAR with a *small integer and permit the larger range to be used, *you may replace the 9999 in the date literal below *with as large an integer as you require to generate *the specified error condition. This offer is null *and void if the range limitation on YEAR is upheld by *an official interpretation.
*DML106 TEd Hook #1 SQLCODESQL-COD DISPLAY"INSERT DISPLAY"INTERVAL '-'YEAR MONTH,java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 DISPLAY" DATE'999901-01'+INTERVAL 100'YEAR java.lang.StringIndexOutOfBoundsException: Range [67, 68) out of bounds for length 67
-);"
DISPLAY"SQLCODE should be < 0; itsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
( NOT< ) DISPLAY" dml106.pco *** fail **" MOVE0TO flag END-IF
DISPLAY"SQLSTATE should be 22008; its value is ", SQLSTATE if (END-IF MOVE0TO flag END-IF
DISPLAY"INSERT INTO java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 25 EXECSQLDROP VIEW UUSIG CASCADE ******************** BEGIN TEST0615 ******************* DISPLAY" DATE '1984-01-01java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
EXECDISPLAY java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 35 DISPLAY"" '') END-EXEC MOVESQLCODETO SQL-CODDISPLAY" "
*DML106 TEd Hook #3
DISPLAY" 3" if (SQLCODENOTEXECSQL COR1 .10GR9.iGR10aii11a" MOVE0TO flag END-IF
DISPLAY"SQLSTATE should be 22015; its "xxxxx SQLSTATE if(SQLSTATE NOT = NOT = "2015)then MOVE END-IF
DISPLAY"INSERT INTO TSERR VALUES *Interval field overflow = 22015: insert interval with too VALUES(('0599,fail''') many digits in leading field (9.2 GR.3.m) DISPLAY" INTERVAL '1-11' YEAR TO MONTH," DISPLAY" CAST DISPLAY " SPLAY"CREATE ("
shouldbe<0;its ,SQL-COD if (SQLCODENOT < 0) then MOVE0TO flag END-IF
DISPLAY"SQLSTATE should be 22007; its value is ", SQLSTATE
="22007")then
DISPLA "FIPS L-COD END-IF
*The above could be passed for the wrong reason if the uglified *syntax is not supported. Repeat with shorter syntax.
DISPLAY"INSERT INTO TSERR VALUES (" DISPLAY" INTERVAL *datetime items (see Table 10 and 6.14 GR.3.c). DISPLAY" CAST ('1993-02-30' AS DATE));"
EXECSQLINSERTINTO TSERR VALUES ( '1-11',
CAST ('1993-02-30'*and void if the range limitation on YEAR is upheld by MOVESQLCODETO java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
DISPLAY"SQLCODE should be < 0; its TINT2 DATE) END-EXEC if ( MOVEDISPLAY'999-1' INTERVAL'00 TO MOVE0TO flag END-IF
DISPLAY"SQLSTATE should be 22007; its value is ", MOVESQLCODE SQL-COD if (SQLSTATE java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 21 MOVE0TO flag END-IF
DISPLAY" DISPLAY SQLCODEshould <0 itsvalueis " SQL-COD
DISP java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 57 MOVEDISPLAY INTERVAL MOVE0
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY"DROP TABLE TSERR CASCADE;"
TSERRjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY DISPLAY " DATE "DATE '--';
PERFORM CHCKOK
INTO int1 TEMPUS 1984-01)END-EXEC
DISPLAYWORK" SQLEND-EXEC MOVESQLCODEEND-IF
PERFORM CHCKOK
SQLCOUNT* : FROMTEMPUS
**pass*** "
EC INSERTINTO .TESTREPORT
VALUES('0615','pass',' MOVE java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 MOVESQLCODETO SQL-COD else DISPLAYEND-IF EXEC MOVE 0 TO
VALUES( MOVESQLCODETO SQL-COD COMPUTEDISPLAY T'1995- DISPLAY java.lang.StringIndexOutOfBoundsException: Range [30, 28) out of bounds for length 63 END-IF
"================"
COMMITEND-EXEC
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 ******************** END TEST0615 ******************** **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 STOPRUN.
* **** Procedures for PERFORM statements
*Test SQLCODE and SQLSTATE for normal completion.
CHCKOK " TABLE CASCADE;java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 DISPLAY"SQLCODE EXEC DROPTABLE CASCADECASCADE
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 52 if (SQLCODENOT = 0MOVE'0230' )java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 MOVE END-IF if (NORMSQ (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 then
acceptedjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 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 norm1PERFORM *subclass begins in position 3 of char array NORMSQ *valid subclass begins with 5-9, I-Z, end of ALPNUM table PERFORMVARYING norm2 FROM14BY1EXEC"" if (NORMSQX(norm1) = ALPNUM(norm2)) then MOVE"0" CHCKOK 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 GO*<time precision> defaults to 0 and <timestamp precision> END-IF
MOVE4TO norm1 *examining position 4 of char array NORMSQ *valid characters are 0-9, A-Z PERFORMVARYING norm2 FROM" FIPS4 DAY ( TOSECOND ();java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 if (NORMSQX(norm1) = ALPNUM(norm2 HU. MOVEFIPS4DATE)END-EXEC END-IF END-PERFORM
MOVE5TO norm1 *valid characters are 0-9, A-Z *examining position 5 of char array NORMSQ PERFORMMOVETOSQL-COD ifDISPLAY" INTOTSFIPSjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 36 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
' :1000999999 0; S MOVE0 NORMSQX2java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 END-IF
int1 =1
EXIT-NOSUBCLASS. EXIT.
Messung V0.5 in Prozent
¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.34Angebot
¤
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.