**************************************************************** * * 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 * ****************************************************************
EXECSQL BEGIN DECLARE * This program was written by employees of NIST to test SQL 01* DML106.PCO 01 SQLSTATE * This routine tests several FIPS features in Transitional 01 uid PIC* REFERENCES 01 uidx PIC**************************************************************** 01 ch15 PIC X(15). 01 ch3 PIC X(3). 01 int1 PIC S9(9) DISPLAYSIGNLEADINGSEPARATE. 01 int2 PIC S9(9) DISPLAYSIGNLEADINGSEPARATE. EXECSQLEND DECLARE SECTION java.lang.StringIndexOutOfBoundsException: Range [0, 50) out of bounds for length 34 01S99 java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 57 019 java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 56 01 ALPNUM-TABLE VALUE S9 java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 57 "01234 05 ALPNUM ALPNUM 36. PIC X . 5java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 019) *date_time declaration 01 9)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 01 01flag9 java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 56
01 SQL-COD PIC S9(9) DISPLAY EXEC SQL SELECT USER INTO :FROM.END-EXEC
PROCEDUREDIVISION. java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36
.
"" CALL MOVE"not java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 SQLCODE EXECSQLROLLBACK*date_time print TO if ( ""at 1TO
-" connected" STOPRUNDISPLAY" in views feature 8)()" END-IF MOVE0TO errcnt
DISPLAY1272. feature " Suite ., java.lang.StringIndexOutOfBoundsException: Range [57, 56) out of bounds for length 61 DISPLAY "-java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 23 DISPLAY"TEd Version *date_time print ACCEPT TO-DAY FROMDATE ACCEPTjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 36
: " "
******************** BEGIN TEST0599 ******************* 1TO flag
MOVE
DISPLAY"" 127214.1 Transitional
- " 8" DISPLAY" WORKEND-EXEC MOVEjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36
COMPUTE MOVE""
DISPLAY )java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 61 DISPLAYFROMUSIG C_1 USIG; EXECSQL CREATE VIEW UUSIG (U1) AS SELECT C1 FROM USIG UNION SELECT C_1 SQLCODE SQL-COD MOVE
PERFORM CHCKOK "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 EXECSQL DISPLAY "SELECT ; MOVESQLCODETO SQL-COD
PERFORM java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 21 DISPLAY"
COMPUTE java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0 DISPLAY0flag EXECSQLSELECTCOUNT(* MOVE java.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
EXEC SQLSQLjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 72
if (int1 NOT = 4) then MOVE0TO flag END-IF
COMPUTE int1 = -1 DISPLAY"SELECT COUNT(DISTINCT U1) INTO :int1 FROM UUSIG;"
(U1 :FROM END-EXEC MOVESQLCODETO SQL-COD
DISPLAYTO
" be ; " MOVE0 END-IF
COMPUTE int1 = flag
Y"java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 70
- " " DISPLAY" SQL WORK EXEC * INTO: java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 3U1 NULL MOVESQLCODETO SQL-COD
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY"-"java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 26
( NOT= )then MOVE">(Bjava.lang.StringIndexOutOfBoundsException: Range [65, 64) out of bounds for length 70
DISPLA"WHERE.ITY =
DISPLAY"- " INNER_REF.CITYjava.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 29 EXECjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 42 MOVEjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
PERFORM CHCKOK DISPLAY" "
DISPLAY"CREATE VIEW ABOVE_AVERAGE ( java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 35
>(AVG HUjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
PNUM java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 54 DISPLAY" MAX,(,(CITYjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 DISPLAY"WHERE =AVGFROM
- " HU.PROJ INNER_REF DISPLAY" WHERE DISPLAY ""
- " INNER_REF.CITY)"
UNION DISPLAY DISPLAY"FROMHU.java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44 " Deale;java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 EXECjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 58
,
SELECT
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 35 WHERE=S AVG PROJ
INNER_REF WHERECITY
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 SELECT'MAX', MAX(BUDGET), MIN(CITY)
PROJjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 WHERE CITY > 'Deale' java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 0 MOVE java.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
PERFORM CHCKOK DISPLAY" "
DISPLAY"COMMIT WORK;"
MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY"DECLARE UNION1 CURSOR FOR" DISPLAYSELECT*java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 71
DECLAREjava.lang.StringIndexOutOfBoundsException: Range [47, 48) out of bounds for length 47 SELECT*java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 69
"java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 35
SQL MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
" java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 61 COMPUTE int1 MOVE Ach3java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 62
UNION1 java.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 61 EXEC UNION1java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 67
( =P NOT java.lang.StringIndexOutOfBoundsException: Range [70, 69) out of bounds for length 70 PERFORM CHCKOK
c java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 62 DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0 DISPLAY"ch15 java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 43 EXECc,int1:END-EXEC "Tampa ) MOVE0TO flag
""ch3 COMPUTE int1should Tjava.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 66 MOVE"java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 43 DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 EXECSQL : int1 MOVESQLCODETO SQL-COD
DISPLAYFjava.lang.StringIndexOutOfBoundsException: Range [28, 27) out of bounds for length 61
int130000itsis DISPLAY"ch15 should be 'Vienna'; its value is ", java.lang.StringIndexOutOfBoundsException: Range [0, 67) out of bounds for length 36
(h3NOT"2"ORint1 =30000OR ch15java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
=" ") then MOVE0TO DISPLAY "ch15 sh '; java.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66 END-IF
MOVE"xxx"TO ch3 COMPUTE MOVE 0 TO
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0 DISPLAY"FETCH EXEC SQL FETCH UNION1 ,
NTO ch3 int1 MOVESQLCODETO SQL-COD
CHCKOK DISPLAY"ch3 should be ' if(SQLCODE NOT=100 then DISPLAY"int1 should be 30000; its value is ",MOVE0 flag
Y "h15 '';its is" if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 NOT="ampa ) MOVE0TO flag END-IF
" ch3 COMPUTE int1 = -1 MOVE"java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 61 EXECSQL FETCH java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 64 DISPLAY java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 37 PERFORM CHCKOK
ch3' ;its " DISPLAY"int1 should be 50000; java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 50 " be '' is , if (ch3 NOT = " java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 47 NOT=" )then MOVE0TO flag END-IF
DISPLAY" DISPLAY "COMMIT;"
:h3,i,: MOVESQLCODETO SQL-COD DISPLAY"SQLCODE should be java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if ( MOVE END-IF
DISPLAY"-" EXECSQLWORK MOVESQLCODETO SQL-COD
PERFORM CHCKOK
java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 25
DISPLAY" java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 50 DISPLAY" java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 25 DISPLAY" FROM "java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 43 DISPLAY"UNION " DISPLAY" SQLCODE EXEC DISPLAY ' ;its ,
UM FROM HU.STAFF ALL SELECT * FROM HU.java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 20
xxx MOVEjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 43
DISPLAY"COMMIT WORK; ch3,: EXECSQLCOMMIT java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 25 MOVESQLCODETO SQL-COD
( "ORch15NOT java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 DISPLAY" "
Y DUNION2java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 48 ", ORDER java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
- " CITY;" EXECSQLjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 47 ORDER
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 25
SPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
MOVE"xxx"TO ch3 MOVE"xxxxxxxxxxxxxxx" java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
SQL :,:END-EXEC MOVE"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 PERFORM CHCKOK DISPLAY"CREATE VIEW (, ,C3 ASjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
ch3beE value ,ch3 DISPLAY" java.lang.StringIndexOutOfBoundsException: Range [44, 42) out of bounds for length 52 if(NOT =A
- " ") then MOVEDISPLAY" >''
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 33
MOVE"xxx"TO ch3
ch15 DISPLAY"FETCH UNION2 INTO :ch3, :ch15;" SQL :, : MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"ch3 should be 'E5 '; its value is "," java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 DISPLAY"ch15 DISPLAY " WHERE Vienna;
ch15 ="java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
- " ") then MOVE0TO flag END-IF
COMPUTE int1 = -WHERE >30000 DISPLAY"SELECT SELECT', ,777 EXECSQL HUjava.lang.StringIndexOutOfBoundsException: Range [28, 29) out of bounds for length 28 MOVE T ,-java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 PERFORM CHCKOK DISPLAYSELECTX ,-
if =
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 29 END-IF
C java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 35 EXECSQL java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 MOVESQLCODE MOVE SQLCODE TO
DISPLAY" "
DISPLAY"CREATE VIEW FOUR_CITIES (C1, C2, C3) AS" DISPLAY" SELECT 'P', CITY, 666" DISPLAY" FROM HU.PROJ" DISPLAY" WHERE BUDGET <> 30000" DISPLAY" UNION" DISPLAY" SELECT 'S', CITY, 777" " STAFF DISPLAY" END-EXEC DISPLAY" UNION" DISPLAY" SELECT 'T', CITY, -999" DISPLAY" FROM HU.EXEC END-EXEC " NOT '" DISPLAY" UNION" DISPLAY" SELECT 'X', CITY, -1" DISPLAY" FROM "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY" WHERE CITY = 'Vienna';" EXECSQL CREATE VIEW FOUR_CITIES (C1, C2, C3) AS
java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 60 FROMPROJ WHERE BUDGET <>
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 SELECT'S', java.lang.StringIndexOutOfBoundsException: Range [13, 1) out of bounds for length 66 FROM HU" java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 67
>java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
UNION-""OR999 SELECT'T', CITY, -999 FROM HU.
LIKE'%'
UNION MOVE""TO java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
HU. WHERE CITY = 'Vienna'END-EXEC MOVESQLCODETO SQL-COD
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK END-EXEC SQLCODE SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY"DECLARE DISPLAY "ch15 should beDeale' itsvalue" DISPLAY" C2 C1,C3 FROM ORDER BY C3,
- " C2;"
DECLAREUNION3CURSORFOR SELECT C2if(h15 Deale" OR ch3 ="java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 END-EXEC
MOVE"xxx"TO ch3 MOVE ch15java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
:,:h3,:;java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 EXEC FETCHUNION3INTO: c,:nt1END-EXEC MOVESQLCODETO SQL-COD "should be '' is , DISPLAY"ch15 should be 'Akron'; its value is ", ch15 DISPLAY"ch3 should be 'T'; its value ",ch3 DISPLAY"int1 should DISPLAY "nt1shouldbe1valueis" if (ch15 NOT = "Akron "OR ch3 NOT = "T
- " "OR int1 NOT = -999) then MOVE0TO flag END-IF
MOVE"xxx"TO ch3 MOVE"xxxxxxxxxxxxxxx"TO ch15 DISPLAY"FETCH UNION3 INTO :ch15, :ch3, :int1;" SQL FETCHUNION3 ch15 :,:nt1 MOVESQLCODEEXEC java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 67
CHCKOK DISPLAY"ch15 PERFORMCHCKOK
ch3 beT;itsvalueis"ch3 DISPLAY"int1 should be -999; its value is ", int1 if(h15NOT =" "ORch3 NOT="
- " DISPLAY i be 666;its " MOVE ch15 NOT" OR NOT P END-IF
MOVE"xxx"TO ch3 ""TOch15 DISPLAY"FETCH UNION3 INTO :java.lang.StringIndexOutOfBoundsException: Range [0, 45) out of bounds for length 0
MOVE xxxxxxxxxxxxxxxTOjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"ch15 should be 'Vienna'; its value is ", ch15 DISPLAY"ch3 should be 'X'; its value is ", ch3 DISPLAY"int1 should be -1; its value is ", int1 if (ch15 NOTPERFORMCHCKOK
- ""ORint1 = -)then MOVE0TO flag
MOVE"xxx"TODISPLAY"nt1 be 666; value is " MOVE xxxxxxxxxxxxxxx DISPLAY"FETCH UNION3 EXECSQL FETCH UNION3 INTO FUNION3INTO ch15 c,i" MOVESQLCODETO EXEC SQL FETCH UNION3 I ch3,:nt1END-EXEC
CHCKOK DISPLAY"ch15 should be ' ch15 should be Deale'its "ch15 ''valueis ,ch3 DISPLAY"nt1 be 777 its value is " if(ch15 NOT = "eale NOT P
- " "OR int1 NOT""NOT=777) MOVE0TO flag END-IF
MOVE"xxx"TO ch3 MOVE"xxxxxxxxxxxxxxx"TO ch15
, :ch3, :nt1" EXECSQL FETCH UNION3 INTO : EXEC SQL FETCH UNION3 INTO :ch15 int1END-EXEC MOVESQLCODETO SQL-COD PERFORM DISPLAY"ch15 DISPLAY "ch3 should '' valueis" DISPLAY" DISPLAY "int 777; its " DISPLAY"int1 should be 666; its value is ", int1 if(NOT=" NOT = Pjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
- " "OR int1
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0 END-IF
MOVExxxTOjava.lang.StringIndexOutOfBoundsException: Range [30, 31) out of bounds for length 30 MOVE"xxxxxxxxxxxxxxx"TO ch15 " INTO: :ch3 i" EXECSQL FETCH UNION3 INTO :ch15, :ch3, :int1 END-EXEC MOVETO PERFORM CHCKOK DISPLAY"ch15 should be 'Deale'; java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 19
be' its valueis ,ch3 DISPLAY"int1 should "ELECTCOUNT():FROMFOUR_CITIES if (ch15 NOT = "Deale EXEC SELECT ()INTO int1
- " "OR int1 NOT = 777SQLCODE SQL-COD MOVE0TO DISPLAY "int1 shbe;itsvalueis" END-IF
MOVE"xxx"TO ch3 MOVE"xxxxxxxxxxxxxxx" int1 =1 DISPLAY"FETCH INTO :h15,:h3,:;" EXECSQL FETCH UNION3 INTO :ch15, >;java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
>
MOVE SQLCODETO SQL-COD "ch15should be 'Vienna'; its value is ", ch15 DISPLAY"ch3 should be 'S'; its value is ", ch3
s valueis" int1 if (ch15 NOT = "Vienna "OR ch3
- " "OR int1 NOT = 777) then MOVE0TO flag END-IF
DISPLAY"FETCH UNION3 INTO : SELECT()INTO:nt1java.lang.StringIndexOutOfBoundsException: Range [66, 65) out of bounds for length 71 SQL ch15 ch3, : END-EXEC MOVESQLCODETO SQL-COD
d be 100;its valueis" SQL-COD if (SQLCODENOTMOVETOSQL-COD MOVE0TO flag END-IF
if (int1 =3 DISPLAY"SELECT COUNT (*) INTO :int1 FROM FOUR_CITIES java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
( : END-EXEC MOVESQLCODETO SQL-COD PERFORM CHCKOK
java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 25
if (int1 NOT = 7) then
0 java.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29 END-IF
COMPUTE int1 = - java.lang.StringIndexOutOfBoundsException: Range [23, 20) out of bounds for length 25 DISPLAY"SELECT COUNT(*) INTO
- " C3 EXECSQLSELECTCOUNT(*) INTO : "
C3 > 0END-EXEC MOVESQLCODETOSQL DROP VIEW STAFF_DUP CASCADE END-EXEC
DISPLAY java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if (int1 NOT = 4 java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 35 MOVE java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36 END-IF
COMPUTE int1 = -1 DISPLAY"SELECT COUNT(
- " C2 = 'Vienna'java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECSQLSELECTCOUNT(*) INTO :int1 FROM FOUR_CITIES WHERE
C2 = 'Vienna'END-EXEC MOVEjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36 PERFORM CHCKOK DISPLAY"int1 should be 3; its"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
if (int1 NOT = 3) then MOVE0TO flag END-IF
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY"DROP VIEW STAFF_DUP DISPLAY " *** pass EXECSQL DROP (''',) MOVESQLCODE java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 17
PERFORM CHCKOK DISPLAY" "
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK END-EXEC MOVESQLCODE VALUES('0599','fail','PCO') END-EXEC
PERFORM CHCKOK DISPLAY" "
DISPLAY"DROP VIEW FOUR_CITIES CASCADE;" EXECSQL DROP VIEW FOUR_CITIES CASCADE END-EXEC ******************** END TEST0599 ********************
PERFORM 1 DISPLAY" "
DISPLAY"COMMIT WORK;DISPLAY data(java.lang.StringIndexOutOfBoundsException: Range [55, 54) out of bounds for length 67
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 42 MOVE"5
PERFORM CHCKOK
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 63
COMPUTE =1 SQLDROP UUSIG MOVESQLCODETO SQL-COD
PERFORM CHCKOK-"" DISPLAY" "
DISPLAY"COMMIT WORK;"
SQL MOVE java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
PERFORM MOVE SQLCODEjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36 DISPLAY" "
if ( flag java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 DISPLAY" *** pass EXECSQLjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 43 MOVESQLCODETO SQL-COD else '0300, EXECSQLINSERTINTO HU.TESTREPORT
java.lang.StringIndexOutOfBoundsException: Range [0, 23) out of bounds for length 21 MOVE java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36 COMPUTE errcnt = java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 25
COMPUT =1
DISPLAY===================java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
EXEC EXEC SQL
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36 ******************** END TEST0599 ******************** ******************** BEGIN TEST0601 *******************
ishould ;itsis,
DISPLAY" TEST0601 " 1 DISPLAY"References:" DISPLAY" FIPS PUB ::'java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
- java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
ANSI 61data> DISPLAY" - - - -
COMPUTESQLCODE = -1
xxxxx TO
DISPLAY"CREATE TABLE TEMPUS DISPLAY" TTIMESTAMP TIMESTAMP, TINT1 java.lang.StringIndexOutOfBoundsException: Range [0, 60) out of bounds for length 0
- " MONTH,java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 61 DISPLAY" TINT2 INTERVAL DAY TO SECOND);" EXECSQL java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 46 TIME,
,
TINT2 DATE) END-EXEC MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK (NOT )java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 MOVESQLCODETO SQL-COD
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 25 DISPLAY" "
DISPLAY"INSERT INTO TEMPUS VALUES (" DISPLAY" DATE '1993-08-24'," DISPLAY" TIME '16:03:00'," DISPLAY" TIMESTAMP '1993-08-24 16:03 DISPLAY" INTERVAL -'1-6' YEAR TO MONTH," DISPLAY" INTERVAL '13 0:10' DAY TO SECOND);" EXECSQLINSERTINTO TEMPUS java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 42 '1993-08-24', '16:03:00',
TIMESTAMP '1993- '1-6', 13010 MOVESQLCODE .
PERFORM CHCKOK " "
COMPUTE int1 =
java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 DISPLAY" INTO ''') EXECSQLSELECT EXTRACT INTO :int1 FROM TEMPUS MOVESQLCODETO SQL-COD=================java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
PERFORM CHCKOK DISPLAY"int1 should ******************** END TEST0601 ******************** if (int1 NOT = 24) java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 27 MOVE0TO flag END-IF
COMPUTE1
S ( java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
-'--java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
-"160300) DISPLAY101<java.lang.StringIndexOutOfBoundsException: Range [64, 63) out of bounds for length 72 EXEC)java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 60 WHERE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 31 MOVESQLCODE*6.1 LR.1.a denies us the right to use <time precision> or
PERFORM CHCKOK DISPLAY"int1 should be 1; its value is ", int1
Cjava.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 44 MOVE0TO flag END-IF
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 30 DISPLAYIDENTIFICATIONDIVISION. DISPLAY" WHERE (TTIMESTAMP, TINT1) , DISPLAY"(IMESTAMP '1995-02-24
- " INTERVAL '1-6' ENVIRONMENT DIVISION. SELECTCOUNT""
( java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 35
MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY"int1 should be 0; its I java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 50
*java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 MOVE0TO flag END-IF
DISPLAY"ROLLBACK WORK * REFERENCES EXECSQLROLLBACK WORK END-EXEC MOVETOjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 26
9901uidX). DISPLAY"
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
PERFORM CHCKOK
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
01 NORMSQ EXECSQLCOMMIT WORK END-EXEC
PERFORM CHCKOK DISPLAY" "
ifDISPLAY java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 60
ISPLAY **java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 54
HUTESTREPORT
VALUESMOVE"java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 19
MOVE else DISPLAY"( EXECSQLINSERTINTO HU.TESTREPORT java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 ''fail''
java.lang.StringIndexOutOfBoundsException: Range [27, 19) out of bounds for length 38
errcnt 1 Date ,int2
DISPLAY"==== "inviews(DISPLAY "int1 should be -99; its value
EXECSQLCOMMIT WORK END-EXEC
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36 ******************** END TEST0601 ******************** ******************** BEGIN TEST0611 *******************
java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 27
DISPLAY" DISPLAYMOVESQLCODE java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 30
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
DISPLAYINTOjava.lang.StringIndexOutOfBoundsException: Range [53, 37) out of bounds for length 53
- " 5" " 6.1 < java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 1a 1 > &" PERFORM
if (int1=4) MOVE
*6.1 LR.1.a denies us the right to use <time precision> or DISPLAY " OR U1 > 3 OR U1 IS NULL;" *<time precision> defaults to 0 and <timestamp precision> *defaults to 6.
DISPLAYCREATE TSFIPSjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" FIPS1 TIME," DISPLAY" java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 54 DISPLAYMOVE java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36 TIME
TIMESTAMP,
FIPS3
FIPS4 DATE) DISPLAY " FROM MOVESQLCODETO java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 25 DISPLAY * HUPROJ
EXECSQL java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 0 MOVESQLCODETO SQL-COD
java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 25 DISPLAYSQLFOR
"TSFIPS java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0 '-08- 0300999999,java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 64 ' java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
AL99java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
-DISPLAY"ETCHUNION1 *******BEGIN*****java.lang.StringIndexOutOfBoundsException: Range [0, 50) out of bounds for length 27 " java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 16:3:'java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 1996082416::.'java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 99- 68GR3java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 '99 0:10:00.999999')
SQLCODE
PERFORM CHCKOK
java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 25
1 MOVETO DISPLAY" java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 30
EXTRACT 999990INTOi java.lang.StringIndexOutOfBoundsException: Range [50, 49) out of bounds for length 65 MOVESQLCODETOSMALLTS -
PERFORMDISPLAYshouldjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 60 if (int1 NOT = 9) then 0TO MOVE0TOflag
MOVESQL-COD COMPUTEjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 43
S " " MONTH " DISPLAY" java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 42 EXECSQLSELECTthen "java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
TSFIPS MOVESQLCODETO SQL-COD
PERFORM java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 "" Y SMALLD=java.lang.StringIndexOutOfBoundsException: Range [59, 58) out of bounds for length 69 DISPLAY" java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 61 DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0
.3XECSELECT): DISPLAY" in FROM NOT - NOT= 6 java.lang.StringIndexOutOfBoundsException: Range [60, 61) out of bounds for length 60
EXEC SMOVE END-IF
int1=java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
DISPLAY"SELECT EXTRACT (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 0 DISPLAY" EXEC"java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 48
EXTRACT -999990 INTO" ;" MOVESQLCODE
PERFORM CHCKOK OPENjava.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 42 "should java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 60 if (MOVEjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36
"java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 60
"ROLLBACK PERFORM
MOVE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
PERFORM CHCKOK DISPLAY" ch3java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
DISPLAY"COMMIT WORK;" EXECSQL java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 MOVETOSQL-COD
PERFORM CHCKOK DISPLAY""
if ( flag SQLSELECT ()java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
*pass* EXECSQLINSERTINTO HU.TESTREPORTDISPLAY"TSSMALL "
VALUES'0611,pass','PCO) END-EXEC =EXTRACT (HOURFROM MOVESQLCODETO SQL-COD else
dml106. * fail*** EXECSQLINSERTINTO HU.TESTREPORT
VALUESDISPLAYCOMMIT WORK; MOVESQLCODETO SQL-COD COMPUTE errcnt = errcnt + 1 END-IF
EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD ******************** END TEST0611 ******************** ******************** BEGIN TEST0613 ******************* MOVEEND-IF
DISPLAYSELECT ):int1" DISPLAY" <datetime value function> (static)" DISPLAY"References:" DISPLAY" DISPLAY"WHERE EMPNAME > ''"
-"5 20java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 DISPLAY68d " DISPLAY DISPLAY"MINUTE=
COMPUTESQLCODE = -1
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 37
*Support for timezones is not included in Transitional SQL
and SECOND- DISPLAY"FTSSMALL" DISPLAY"EXTRACT (YEAR FROM SMALLD) = EXTRACT (YEAR FROM
- " SMALLTS);"
COMPUTE int1 = -1 EXECSELECT* i FROM TSSMALL WHERE
EXTRACT = YEAR END-EXEC MOVESQLCODETO SQL-COD
PERFORM CHCKOK " 1; value MOVE 0TO flag if (int1 NOTMOVE MOVE0TO flag END-IF
"SELECTCOUNT(*) i" DISPLAYFROMWHEREjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 DISPLAY"EXTRACT (MONTH FROM SMALLD) = EXTRACT (MONTH FROM PERFORMjava.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
COMPUTE int1 = -1
SQL COUNT*DISPLAY"should-itsvalue is "
TSSMALL
- " " OR NOTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 END-EXEC MOVEjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
PERFORM CHCKOK
be 1; its value ,java.lang.StringIndexOutOfBoundsException: Range [60, 61) out of bounds for length 60 if (int1 NOT"nt1 666 its isjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVE0TO flag END-IF
DISPLAY"SELECT COUNT(*) INTO :int1" DISPLAY DISPLAY"EXTRACT (DAY FROM SMALLD java.lang.StringIndexOutOfBoundsException: Range [36, 34) out of bounds for length 43
- " SMALLTS
COMPUTEjava.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 67 EXECSQLSELECTCOUNT (0613''DISPLAY nt1should 666;itsvalue, FROM TSSMALLCOMPUTEerrcnt errcnt + 1
RACT=DAY END-EXEC MOVESQLCODEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
PERFORM CHCKOK DISPLAY" 1 its java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 36 if int1 MOVE MOVE0TO flag END-IF
DISPLAY"SELECT COUNT(*) INTO :int1" DISPLAY"FROM TSSMALL WHERE" DISPLAY"EXTRACT (HOUR FROM SMALLT) = EXTRACT (HOUR FROM
SMALLTS;"
MOVETO flag EXECSQLSELECTCOUNT FROM DISPLAY " TEST0615 "
HOUR= END-EXEC DISPLAY":"
DISPLAY"int1 should be 1; "nt1should be777 - "," if( ANSISQL-1992 22.SQLSTATE MOVEDISPLAY-NOT=777)then
java.lang.StringIndexOutOfBoundsException: Range [19, 1) out of bounds for length 19
" COUNT* INTO :nt1" DISPLAY"MOVE SQLCODE SQL-COD DISPLAYDISPLAY" be ;its
- FROMSMALLTS);"
COMPUTE int1 = -1 EXECSQLSELECT FROM TSSMALL WHERE
MINUTE =
SMALLTS END-EXEC MOVESQLCODETO SQL-COD
*Interval field overflow = 22015: insert interval with too MOVE0TO flag
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVE flag
ND-IF
*Time and timestamp have different fractional seconds precision *and we can't assume truncation or rounding.
COMPUTE int1 = -1 DISPLAY"SELECT COUNT(*) INTO :int1" DISPLAY"FROM TSSMALL WHERE" DISPLAY"EXTRACT (SECOND FROM SMALLT) -" DISPLAY"EXTRACT (SECOND FROM SMALLTS) > -1" DISPLAY"AND DISPLAY"EXTRACT ( PERFORM CHCKOK EXECSQLSELECTCOUNT(*) INTO :int1 COMPUTE =-1
SECOND -
SQLCOMMITWORKjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 28 and SECOND -
SECOND < MOVEMOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"should1 valueis ,int1 if (int1 NOT = 1) then MOVE0TO flag END-IF
can accept values below 1orabove 9999 EXECSQLROLLBACK WORK END-EXEC*However, since it seems to us that a reasonable *small integer and permit the larger range to be used,
PERFORMCHCKOK DISPLAY" "
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECSQL DROP TABLE TSSMALL CASCADE END-EXEC MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY"COMMIT WORK DISPLAY "DISPLAY" '011 YEARTOMONTH"
MOVESQLCODE" DATE 9999-01-01' INTERVAL'-00 TO
PERFORM CHCKOK DISPLAY" SQL INSERT TSERR (
DISPLAY" " DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECSQLINSERTINTOMOVE SQL-COD
VALUES MOVESQLCODETO java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0 else
pco** EXECSQLINSERTINTO HU.TESTREPORT
VALUES(' MOVESQLCODE SQL-COD MOVE java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 25 COMPUTE errcnt
DISPLAY"======== MOVE SQLCODE TO SQL-COD
EXECSQLCOMMITPERFORMjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0 ******************** END TEST0613 ******************** ******************** BEGIN TEST0615 ******************* MOVESQLCODETO
DISPLAY" TEST0615 " "java.lang.StringIndexOutOfBoundsException: Range [0, 43) out of bounds for length 35 "eferences:"
1984-01-01java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
- " 5, 20" DISPLAYANSI DISPLAY"6.14 GR.3.c" DISPLAY" *** pass*** " for6. GR9.iGR... ...ii" DISPLAYVALUES'','pass''')java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 29
COMPUTESQLCODE = -1 MOVE"TO
*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)
SPLAY"CREATETSERR" DISPLAY" BADINT INTERVAL DISPLAY EXEC SQL COMMIT WORK
SQLCREATE TABLE TSERR (
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 27
BADDATE DATE) ******************** BEGIN TEST0601 ******************* MOVESQLCODETO <0 its valueis"
PERFORM CHCKOK DISPLAY" TEST0601 "
java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 35 EXECSQLDISPLAY"= 22007)
L-COD
PERFORM CHCKOK DISPLAY" "
* 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
DISPLAY"INSERT INTO TSERR VALUES ("
java.lang.StringIndexOutOfBoundsException: Range [0, 53) out of bounds for length 35 DISPLAY"DATE '999-101 +INTERVAL '-'YEAR TO
- " MONTH);"
EXECSQL java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 0-'java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 '9999-01-01' + '1-00') END-EXEC MOVESQLCODE java.lang.StringIndexOutOfBoundsException: Range [0, 28) out of bounds for length 0
*DML106 TEd Hook #2
" be<0;its ,SQL-COD if (SQLCODENOT < 0 LAY"TIMESTAMP'199308-24 160300',java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 MOVE0TO flag END-IF
DISPLAY" PERFORM CHCKOK if ( DISPLAY "
flag END-IF
DISPLAY"INSERT INTO TSERR VALUES (" DISPLAYEXECSQLDROPTABLE java.lang.StringIndexOutOfBoundsException: Range [0, 46) out of bounds for length 0 '0101)"
EXEC" INTO :nt1FROM ;" '9999-11', '1984101) MOVE MOVE SQLCODE SQL-COD
*DML106 TEd Hook #3
"java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
0 java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 END-IF
DISPLAY"SQLSTATE should be if (SQLSTATE NOT = "22015")
flag END-IF
DISPLAY"INSERT INTO TSERR VALUES (" DISPLAY" INTERVAL '1-11' YEAR TO MONTH," "CAST(DATE '199302-0' AS DATE);java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
DISPLAY"SQLCODE java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 19 if (SQLCODENOT < 0) then MOVETOflag END-IF
DISPLAY"SQLSTATE should be 22007; its value is MOVE SQLCODE TO SQL-COD if (SQLSTATE java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0 MOVE0TO flag END-IF
*The above could be passed for the wrong reason if the uglified *syntax is not supported. Repeat with shorter syntax.
DISPLAY"ROLLBACK WORK;" EXECSQLROLLBACK WORK END-EXEC EXECSQL WORKjava.lang.StringIndexOutOfBoundsException: Range [42, 43) out of bounds for length 42
PERFORMjava.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25 DISPLAY" "
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK END-EXEC
SQL-COD
PERFORM CHCKOK DISPLAY" "
if ( flag = 1 ) then DISPLAY" *** pass *** " EXECSQLINSERTINTO HU.TESTREPORT
VALUES('0615','pass','PCO') END-EXEC MOVESQLCODETO SQL-COD else DISPLAY" dml106.pco *** fail *** " EXECSQLINSERTINTO
VALUES('0615','fail','PCO') END-EXEC MOVESQLCODETO
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 END-IF
*valid characters are 0-9, A-Z
EXECSQLCOMMIT WORK END-EXEC
java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 36 ******************** END TEST0615 ******************** **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 STOPRUN.
* **** Procedures for PERFORM statements
*Test SQLCODE and SQLSTATE for normal completion. 99'
ldbe0valueis"QL-COD DISPLAYMOVE""TO(O
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 if (SQLCODENOT = 0OR NORMSQ NOT = "00000") then MOVE0TO flag END-IF if (NORMSQ = "00000"AND NORMSQ NOT = SQLSTATE) then DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF PERFORM
( NOT9
*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. DISPLAY " EXTRACT (MONTH FROM FIPS3) INTO :int1, :int2" * SQLSTATE will be printed.
MOVE SQLSTATE TO NORMSQ
MOVE *subclass begins in position 3 of char array NORMSQ *valid subclass begins with 5-9, I-Z, end of ALPNUM table PERFORM- .3i if (NORMSQX(norm1) = ALPNUM(norm2)) then 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( = )then GOTO EXIT-NOSUBCLASS END-IF
MOVE norm1 *examining position 4 of char array NORMSQ *valid characters are 0-9, A-Z PERFORMVARYING norm2 FROM1BY1UNTIL norm2 > 36
m2) ""TONORMSQX()
ifint1NOT= 99 int2 = 9)then END-PERFORM
MOVE5TO norm1 *valid characters are 0-9, A-Z DISPLAY " "
1 36 if SQL TABLECASCADE 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(1) = "0"AND (flag= 1then MOVE"0"TO NORMSQX(2) END-IF
.
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.