IDENTIFICATIONDIVISION. PROGRAM-ID. DML160. ENVIRONMENTDIVISION* WRITTEN BY: David Flater CONFIGURATIONSECTION.
* This routine tests joined tables * OBJECT-COMPUTER* DATADIVISION. WORKING-STORAGE.
* EMBEDDED COBOL (file "DML160.PCO")
**************************************************************** * * COMMENT SECTION * * DATE 1995/12/11 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. * * DML160.PCO * WRITTEN BY: David Flater * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE * * This routine tests joined tables. * * REFERENCES * FIPS PUB 127-2 14.2 Intermediate SQL * ANSI SQL-1992 * ****************************************************************
******************** BEGIN TEST0859 *******************
-table F4-S subquery
DISPLAY" TEST0859" DISPLAY< table in <select >" DISPLAY DISPLAY75.. - join
condition DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 0 DISPLAY#7-Scalar" DISPLAY" 6.11 LR.2.e"-" ." DISPLAY" - WORKSPNUM=.."
. .)
-".STAFF AS OSTAFFjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
*<join condition> ::= ON <search condition>
*Count the number of projects that each employee is working on *that meet certain budgetary criteria
-AND > SELECT( .
- " java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
HUHU" DISPLAY" AND BUDGET > AVG (OSTAFF.GRADE) * 1000" DISPLAY" WHERE MOVESQLCODE SQL-COD
- . " DISPLAY" ORDER BY 2, 1;" EXECSQL DECLARE C16011 java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 SELECT EMPNUM, (SELECT(*) HU JOIN
HUCOMPUTE = -1
DI "FETCH C16011 INTO:, :cnth;"
-AND > AVG.GRADE100 MOVETOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 ORDERDISPLAY"nthshouldbe ;itsvalueis" java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
DISPLAY"OPEN C16011;" EXECSQLMOVETO java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
SQLCODE SQL-COD PERFORM CHCKOK DISPLAY" "
MOVE"xxx"COMPUTE = -1 COMPUTE cnth = -1 DISPLAY" C16011 INTO :emnum cnth" EXECSQL FETCH C16011 INTO SQLCODE SQL-COD
SQLCODE PERFORM CHCKOKshould, ifNOT" OR NOT = then
bejava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 if ( = -1 MOVE flag END-IF
MOVE" SQLCODE TOSQL-COD
cnth - DISPLAY"DISPLAY" should 'E3 ; is',emnum EXEC :,: java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62 MOVESQLCODE TO PERFORM CHCKOK DISPLAY"emnum 0 TO flag DISPLAY if (emnum NOT = "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVE 0 TO flag " C16011 INTO emnum cnth"
MOVE SQLCODE
cnth=1 DISPLAY"FETCH C16011 INTO :emnum, :cnth;" " should be '4'is'", emnum, '", emnum, "'" MOVETO PERFORM CHCKOK DISPLAYemnumE3 ' ,"" DISPLAY"cnth should be MOVE TO flag ifjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 MOVE 0 TO flag = -1 END-IF
SQL C16011:, :cnth COMPUTE = -1 DISPLAYFETCHemnum EXEC emnum' ;its is '", emnum 'java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 MOVE SQLCODE TO emnum E1 cnth ) PERFORM CHCKOK DISPLAY" should be E4 ' itsvalue'" emnum,"'" DISPLAY"cnth should be 2; its value is ", cnth if ENDIF MOVE 0 TO flag END-IF
MOVE" WORK;" COMPUTEEXEC COMMIT END-EXEC DISPLAY FETCHemnum EXECPERFORM MOVE PERFORM CHCKOK " should be' ; value is ',,"" DISPLAY"cnth should be 4; its value is ", cnth if (emnum"* * java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 MOVE 0 TO flag('05''','PCO)END-EXEC END-IF
DISPLAY"COMMIT WORK;" EXEC COMMIT java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 MOVEEjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 PERFORM DISPLAY SQLCODE
if ( flag = 1 ) then******************** BEGIN TEST0860 *******************
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECSQLDISPLAY 5- definition
MOVE SQLCODE #5--data" else DISPLAY ml160 * java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
.TESTREPORT
VALUES('0859','fail','PCO') END-EXEC MOVESQL-COD COMPUTE errcnt = errcnt + 1 END-IF
DISPLAY"=COMPUTESQLCODE=-java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
EXECSQL COMMIT WORK MOVE SQLCODE TO SQL-COD ******************** END TEST0859 ******************** ******************** BEGIN TEST0860 ******************* * EXEC SQL CREATE DOMAIN EPOCH_NOT_NORM AS DECIMAL (5, 2)
DISPLAY DISPLAY" Domains over various data types" DISPLAY"References: "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY"M SQLCODE TO SQL-COD " F#4 -Timezonespecification" DISPLAY"DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY ISPLAY "CREATE DOMAIN RAD_EPOCH_TYPE FLOAT (20)" DISPLAY" F# 8 -- Union in views" DISPLAY" F# 17 -- Multiple schemas per user" DISPLAY" F 20 --CASTfunctionsjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 DISPLAY" - - - - - - - - - - - - - - - - - - -"
COMPUTE SQLCODE = -1 MOVEPERFORM
*Some people insist on using epochs outside of the traditional *0 to 360 range, so may as well use implementation-defined *precision too. "CREATE DOMAIN EPOCH_NOT_NORM AS DECIMAL (5, 2);" * EXEC SQL CREATE DOMAIN EPOCH_NOT_NORM AS DECIMAL (5, 2) * END-EXEC MOVE SQLCODE TO SQL-COD PERFORM DISPLAY" "
DISPLAY"COMMITjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECSQL* EXEC SQL CREATE DOMAIN RAD_EPOCH_NOT_NORM REAL END-EXEC MOVE SQLCODE TO PERFORM CHCKOK
DISPLAY
*Similar, for people who think in radians DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAYEXEC COMMIT END-EXEC * EXEC SQL CREATE DOMAIN RAD_EPOCH_TYPE FLOAT (20) * CHECK (VALUE BETWEEN 0E0 AND 2E0 * 3.1416E0) END-EXEC MOVETOSQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"COMMIT WORK;"
XEC WORK
PERFORM CHCKOK DISPLAY" DOMAIN TIDEDATE DATE"
DISPLAY"CREATE DOMAIN RAD_EPOCH_NOT_NORM REAL;" * EXEC SQL CREATE DOMAIN RAD_EPOCH_NOT_NORM REAL END-EXEC MOVE SQLCODE TO SQL-COD * EXEC SQL CREATE DOMAIN TIDEDATE AS DATE PERFORM CHCKOK * '2025-12-31') END-EXEC " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
" " EXECSQL COMMIT WORK MOVE SQLCODE TO SQL-COD SQL WORKEND-EXEC PERFORM CHCKOK DISPLAY""
*We only have data for 1994 through 2025 DISPLAY"CREATE PERFORMCHCKOK DISPLAY" CHECK (VALUE BETWEEN
-"'02-12-1);java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 * EXEC SQL CREATE DOMAIN TIDEDATE AS DATE * CHECK (VALUE BETWEEN DATE '1994-01-01' AND DATE * '2025-12-31') END-EXEC DISPLAY"AND TIMESTAMP 202-2135:9000)" PERFORM DISPLAY" "
(VALUE TIMESTAMP10java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 SQL WORK MOVE SQLCODE SQLCODE SQL-COD PERFORM DISPLAY" "
java.lang.StringIndexOutOfBoundsException: Range [0, 20) out of bounds for length 0
-"ZONEjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 DISPLAYDISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
- " 00:00:00+00:00'" '2025-2-1 359:90:00)" EXECSQL (VALUETIME:00'ANDTIME
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
CHECK BETWEEN '9940-1
00:00:00+00:00'
(VALUETIME7300'ANDTIME 10:0) MOVE SQLCODE TO SQL-COD PERFORMjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 DISPLAY"
DISPLAY" ; EXECSQL WORK MOVE SQLCODE COMMIT PERFORM DISPLAY" "
*...and furthermore, we have very specific notions about dinner. DISPLAYCREATEAS DISPLAY" CHECK (VALUE BETWEEN
- " '19:00:00');" EXECSQL CREATE DOMAIN *normalized data will be normalized and moved into the main *schema (we hope). VALUE0 '00
MOVE,)java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 PERFORM DISPLAY" "
*Re-invent the wheel in our default schema because we have non- *normalized data and think in radians. Eventually the non- *normalized data will be normalized and moved into the main *schema (we hope).
DISPLAY java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" LOC_ID DEC (7) NOT NULL, EXECSQL WORK END-EXEC " CONST_IDTIDESCONST_ID_TYPE NOTNULL," DISPLAY" UNIQUE (LOC_ID, CONST_ID)," DISPLAY" AMPLITUDE TIDES.AMPLITUDE_TYPE," DISPLAY EPOCH " "
LOC_IDSELECTAMPLITUDE
CONST_IDNULL
UNIQUE "
AMPLITUDE.AMPLITUDE_TYPE EXECSQL VIEW (LOC_ID, MOVESQLCODE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 PERFORM CHCKOK DISPLAY" "
DISPLAY"COMMIT WORK;" EXECSQL (EPOCH * 314596387E010 AS MOVE SQLCODE TO SQL-CODFROM.CONSTITUENTS PERFORM CHCKOK SQLCODE SQL-COD DISPLAYPERFORM
DISPLAY"CREATE VIEW CONST_RADjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY ,)AS DISPLAY" SQL-COD DISPLAY"CAST(EPOCH * 3.41525599 / 18E0AS
- " RAD_EPOCH_TYPE)" DISPLAY" FROM TIDES.CONSTITUENTS;" EXECSQL CREATE
,EPOCH SELECT )java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
)
RAD_EPOCH_TYPEjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 FROM.CONSTITUENTS MOVE SQLCODE TO SQL-COD PERFORM DISPLAY" "
DISPLAY"CREATE VIEW CONST_RAD_NOT_NORM (LOC_ID, CONST_ID," DISPLAY" AMPLITUDE, EPOCH) AS" DISPLAY" SELECT LOC_ID, CONST_ID, AMPLITUDE," DISPLAY" CAST ( SQL COMMIT WORK END-EXEC
- " RAD_EPOCH_NOT_NORM)" DISPLAY" FROM CONST_NOT_NORM;" EXECSQL CREATE VIEW CONST_RAD_NOT_NORM (LOC_ID, SQLCODE SQL-COD
AMPLITUDE, EPOCH SELECT LOC_ID, CONST_ID, AMPLITUDE,
CAST (EPOCH * 3.14159265358979E0 / 180E0 AS
RAD_EPOCH_NOT_NORM *List of tide predictions that are pending FROM CONST_NOT_NORM" DEC () NOT NULL,
SQLCODESjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 PERFORMDISPLAY"JOB_ID INT PRIMARY );java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 DISPLAY" "
DISPLAY"COMMIT WORK;" EXECSQL COMMIT WORKFROMTIME NOT, MOVESQLCODE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 PERFORM DISPLAY" "
*List of tide predictions that are pending
DISPLAY"CREATE TABLE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY 7 ,java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49 DISPLAY" FROMTIME TIDETIMESTAMP NOT NULL," DISPLAY" TOTIME TIDETIMESTAMP NOT NULL," DISPLAY" CHECK (FROMTIME <= TOTIME)," DISPLAY" JOB_ID INT PRIMARY KEY);" EXECSQL CREATE TABLE *6.10 GR.9.c Casting timestamp to date throws out the time
LOC_ID DEC (7) NOTNULL,
FROMTIME TIDETIMESTAMP NOTNULLjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
TOTIME TIDETIMESTAMPAS
FROMTIME
JOB_ID0" MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"COMMIT WORK;" EXEC COMMIT END-EXEC MOVE SQLCODE java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
(0AS) PENDING
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
*The data for the starting and ending days are hand-verified
*6.10 GR.9.c Casting timestamp to date throws out the time *part. Which is good, considering that you can't *EXTRACT (DATE FROM TIDEDATE).
DISPLAYVIEW ,)
- " AS" DISPLAY" SELECT CAST (FROMTIME AS TIDEDATE), JOB_ID," DISPLAY" CAST (0 AS INT) FROM PENDING" DISPLAY" UNION" DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" CAST EXEC SQL COMMITWORKEjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 EXECSQL CREATE VIEW CHECK_PTS CHCKOK
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 SELECT CAST DISPLAY" TABLE DINNER_CLUB ("
CAST0AS)FROMjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
UNION SELECT CAST (TOTIME AS TIDEDATE), JOB_ID,
CAST (1 AS INT) FROMEXEC CREATETABLE ( MOVE SQLCODELOC_ID (7) NOTNULL PERFORM CHCKOK DISPLAY" "
DISPLAYCREATE " DISPLAY" LOC_ID DEC (7) NOT NULL," DISPLAY" DINNER DINNERTIME);" EXECMOVE SQLCODE SQL-COD
LOC_ID DEC ""
DINNER DINNERTIME) END-EXEC MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" OVE50 TOxhour
DISPLAY"COMMIT WORKjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 31 EXECEND-EXEC MOVE SQLCODE"MINUTEFROMMERIDIAN INTO :xhour :xminit" PERFORM CHCKOK
DISPLAY
*First try out the DOUBLE PRECISION and INTERVAL domains that ar *already in TIDES.
MOVE 50 FROM) INTO, :xminit
5xminit DISPLAY"SELECT EXTRACT java.lang.StringIndexOutOfBoundsException: Range [37, 38) out of bounds for length 21 DISPLAY ( FROM MERIDIAN) INTO :xhour,xminit DISPLAY" FROM TIDES.LOCATIONS WHERE LOC_NAME LIKE '", ,
ewfound" EXECSQLSELECT EXTRACTDISPLAYxminit 30 value xminit
(MINUTE FROM MERIDIAN) INTO :xhour, :xminit FROM.LOCATIONS LOC_NAME 'Newfound' END-EXEC
0 TOjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 PERFORM CHCKOK *Sign of results specified by 6.6 GR.3.a.i
xhourbe is, DISPLAY be ,xminit if (xhour NOT" -'30 TO MINUTE,GMT-13)"
0TO
*There is no GMT-13. Violation of domain constraint 9.2 GR.4 *Integrity constraint violation
DISPLAY . " DISPLAY" 300, ' DISPLAY "SQLCODE should be ;its value ", DISPLAYINTERVAL ,GMT-13 EXECSQL 0 flag
300,DISPLAY 30 "SQLSTATE
INTERVAL TO,'' java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67 MOVE DISPLAY ;value if (SQLCODE " implementation-defined accepted.java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 " ." DISPLAY"SQLSTATE should be 230 "SET = " PERFORM NOSUBCLASS CONST_ID
LOC_ID MOVE 0 TOMOVE SQL-COD END-IF if =20 NOTSQLSTATE then DISPLAY"Valid implementation-defined MOVE 0TOflag END-IF DISPLAY" should be 300 value is ,SQLSTATE
*Negative amplitudes also illegal
DISPLAY"UPDATE TIDES.CONSTITUENTS" " AMPLITUDE= "
0java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 DISPLAY" AND CONST_ID = 0;"then EXEC .java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 SET
WHEREDISPLAY'Maine 6.3 313" AND= MOVE SQLCODE INSERT.LOCATIONS0 DISPLAY ,'-.13 31, if (SQLCODE342, INTERVAL TO, MOVE 0 TO SQLCODE END-IF DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 PERFORM .3,8.) ifNOT2"then MOVE 0 .4, 350 java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 END-IF if ="0" =java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 then DISPLAY SQLSTATEvalue
DISPLAY" "
DISPLAY"INSERT INTO TIDES 0 TO flag DISPLAY" 'Bath, Maine', -NORMSQ="300 ANDNOTSQLSTATE DISPLAY" 1, 3.422E0, DISPLAY Validimplementation-defined accepted.
- " ':US/Eastern');" EXECSQLINSERT 'Bath, Maine', -69.8133, 43.9183,
1, 3.42 " INTO VALUES (300, , 'USE' java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
SQLCODE PERFORM CHCKOK DISPLAY" "
*Check constraint on normalized table
DISPLAY"INSERT INTO TIDES.CONSTITUENTS VALUES (300, 2,
- " 0.134E0, 385.0 EXEC INSERT VALUES (30 1 SQL TIDES VALUES2
SQLCODE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 MOVE SQLCODE VALUES
should ; value if (SQLCODE INTO VALUES MOVE 0 TO flag END-IF DISPLAY"SQLSTATE should be 23000; its value is ", SQLSTATE014, 38. PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 if ( .1 0)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 MOVE
java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 0
=20 NOT) then DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF DISPLAY" "
*Load up some non-normalized data
PERFORM
-" .021E0, 151.)" EXECjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
0.021E0, 151.6) END-EXEC MOVETOSQL-COD PERFORM CHCKOK
DISPLAY ""
DISPLAY"INSERT INTO CONST_NOT_NORM VALUES MOVE SQLCODE TO SQL-COD
- " 0.324E0, 144.5);" EXEC""
0.324E0, 144.5) java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0 MOVE SQLCODE TO SQL-COD".0E0 00)" PERFORM CHCKOK DISPLAY"
DISPLAY"INSERTINTO VALUES(0,1,
- " 0.744E0, 322.0);" EXECINSERTINTO VALUES30 0java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
0.744E0
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
0, 4)
DISPLAY 3 ,
- " 0.087E0, 307.4)P CHCKOK EXECSQLINSERTINTO
0.087E0, 307 "007, 116.)" MOVE SQLCODE TO SQL-COD SQLINTOCONST_NOT_NORM (300 1java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
30 2
- " 0.260E0, .0E0, 3832 java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 EXEC DISPL java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
0.260E0 .0E0 MOVETO PERFORM CHCKOK DISPLAY" "
DISPLAY"INSERT INTO CHCKOK
-"001,187; EXEC java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
0.011E0, 158 EXECINSERTCONST_NOT_NORM30 9 MOVETO PERFORM DISPLAY CHCKOK
DISPLAY"INSERT INTO CONST_NOT_NORMjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
00 60; SQL VALUES 4
E,108 MOVE SQLCODE
P CHCKOK DISPLAY" "
DISPLAY"INSERT INTO CONST_NOT_NORM VALUES (300, 15,
01.; EXECSQLE0)
SQLCODEjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 MOVE SQLCODE PERFORM DISPLAY" .3,68;java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
DISPLAY"INSERT INTO CONST_NOT_NORM VALUES (300, 16,
- " 0.007E0, 116. PERFORM CHCKOK INTO (300, 1java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
. .;java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 MOVE 03, 3. java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 PERFORM CHCKOK DISPLAY" "
DISPLAY .3,2.)"
- " 0.004E0, 383.2);" EXECSQLINSERTINTO CONST_NOT_NORMEXECINSERT CONST_NOT_NORM (30,2,
0.004E0, 383.2) END-EXEC
SQLCODE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 PERFORM CHCKOK DISPLAY" "
DISPLAY"INSERT INTO CONST_NOT_NORM VALUES(00 5
- "000E0, 17.3);java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 EXECINSERT CONST_NOT_NORM (30, 1,
0.000E0, 17.3) END-EXEC MOVE SQLCODE TO SQL-COD SQLCODE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 PERFORM CHCKOK DISPLAY
DISPLAY"INSERT INTO CONST_NOT_NORM VALUES (300, 20,
-"000,6.)" EXECSQLINSERTINTO CONST_NOT_NORM VALUES (300, 20,
0.000E0, 69.0) END-EXEC MOVETOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 PERFORM CHCKOK
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAYDISPLAY"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
- " 0.000E0, 103.5);" EXECINSERT 30 1java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
0.00E0)END-EXEC MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY"
DISPLAY" INTO CONST_NOT_NORMVALUES(00 22java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65 " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 EXECINSERTVALUES,
0.053E0, 365.8) END-EXEC MOVE"000E0 60;java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 PERFORM DISPLAY" "
TO
- " 0.053E0, 37PERFORM java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 EXECSQLINSERTINTO CONST_NOT_NORM VALUES (300, 23,
0.053E0, 37.3) END-EXEC MOVE SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAYINSERT NTO3java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65 SQL CONST_NOT_NORM (300 3, EXECSQLINSERTINTO CONST_NOT_NORM VALUES IDENTIFICATIONDIVISION
.1E044 .3E0,2. MOVETO PERFORM DISPLAY" java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 25
DISPLAY"INSERT INTO CONST_NOT_NORM EXEC SQL INSERT INTO CONST_NOT_NORM VALUES(0,3,
-"000E0, 50.)" EXECSQLINSERTINTO CONST_NOT_NORM VALUES ( * DISCLAIMER: * MOVE SQLCODE TO
HCKOK DISPLAY" "
DISPLAY"INSERT INTO CONST_NOT_NORM SQL INSERT * ANSI SQL-1992
- " 0.000E0, 49.4);" EXEC
.00, 4.) MOVE SQLCODE TO SQL-COD CHCKOK PERFORM java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
EXECSQL 1TO-DAY ()java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
1SQL-CODPIC(9) SIGN. MOVETOSQL-COD PERFORM CHCKOK DISPLAY" "
CONST_NOT_NORM (30java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
0,3.)" EXECDISPLAY 0"
0.000E0 SQLCODE SQL-COD MOVE SQLCODE SQLCODE PERFORM DISPLAY"
DISPLAY"INSERT INTO CONST_NOT_NORM VALUES (300,AND
- EXEC CHCKOK
5byte
SQLCODE FROM
M 0 MOVE flag DISPLAY":"
DISPLAYCOUNT cnth"61LR2ejava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
-"00330 273)" SQL 0,3,
0.033E0, 257 MOVE SQLCODE *that meet certain budgetary criteria PERFORM DISPLAY" "
DISPLAYINSERT CONST_NOT_NORM (300 3,
- "00 " BUDGET (OSTAFF) * 100java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 EXEC" WHERE HUWORKSEMPNUM= OSTAFF.EMPNUM) FROM
0.00, 0.6)END-EXEC MOVE SQLCODE SQL-COD PERFORM " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY" INTO CONST_NOT_NORM ALUES30 6
- SQLCODE SQL-COD EXECSQLINSERTINTO CONST_NOT_NORM VALUES (300, 36,
0.038E0, 97.7) END-EXEC MOVE SQLCODE java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0 PERFORM java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" "
lt1
D INTO java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 DISPLAY WHERE=10java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 "ANDCONST_ID=0;java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 EXECSQL EPOCH :flt1CONST_RAD
=10 ANDCONST_ID MOVE SQL-COD PERFORM "" emnum if ( SQL C16011:, :cnthMOVE 0 flag MOVE 0 TO flag SQLCODE SQLSTATE0;its"SQLSTATE END-IF
COMPUTE cnth = cnth;its ,cnth DISPLAY"SELECT COUNT*)INTO :" MOVETO DISPLAY" WHERE EPOCH > 6.2Ejava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 COMPUTE = -1 FROM CONST_RAD_NOT_NORM
WHERE EPOCH > 6.2831 "" MOVETO PERFORM CHCKOK DISPLAY"cnth should be 4; its value isifemnum NOT = "" OR cnth NOT = "TIMESTAMP1:9900,1" SQLEND-IF MOVE 0 TO flagTIMESTAMP-3 1:5-50 )END-EXEC
FETCH" DISPLAY" 300 TIMESTAMP 1 DISPLAYTIMESTAMP-700-:')" EXECINSERT java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 DISPLAY 1400 000-500', 2);" INTOVALUES
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 "
*Check that constraint. *7PM EST is 12AM GMT, which is outside the constraint
DISPLAY"INSERT INTO PENDING VALUES (" DISPLAY" DISPLAY"pco *" DISPLAY" TIMESTAMP '2025-12-EXEC "FROM JOB_ID=; EXECINSERT VALUES
101, TIMESTAMP = errcnt
TIMESTAMP 'MOVE TO java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(SQLCODE )then SQLCODEjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 " should be<0 its value is " ifNOT )then SQLSTATE;its,java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 60 MOVE": END-IF DISPLAYSQLSTATE be0;its is,SQLSTATE PERFORM NOSUBCLASS THRU ifDISPLAY#- " "F 0- functions" END-IF
( 0 N ) then DISPLAY*Some people insist on using epochs outside of the traditional
DISPLAY"INSERT INTO MOVE SQLCODE TOSQL-COD DISPLAY" 101, TIMESTAMP '2025-12-30 1 PERFORM CHCKOK DISPLAY" TIMESTAMP '2025-12-31 18:59:59-05EXECSQL EXTRACT ( FROM CHECK_DATESjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 EXECINSERT PENDING(
101, TIMESTAMP '2 MOVESQLCODETOSQL-COD
TIMESTAMP SQLCODE SQL-COD" MOVE" 2) PERFORM "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY"INSERT INTO PENDING VALUES (" DISPLAY" 102, TIMESTAMP '1993-12-31 19:00:00-05:00',"
SQLCODE SQL-COD
(
102, TIMESTAMP '1993-12-31 19:00:00-05:00',
TIMESTAMP '1994-01-02 00:00:00-05:0 DISPLAY "" MOVE SQLCODE SQL-COD
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY" "
*1993-12-31 19:00:00-05:00 is within the constraint because it's *midnight GMT. Unfortunately, when we cast it to TIDEDATE, *it ends up being just 1993-12-31, which does not meet the *constraint. 6.10 GR.9.c
DISPLAY"SELECT EXTRACT (YEAR FROM CHECK_DATES)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" INTO :cnth" DISPLAY ( CAST'8::'AS)); EXECSELECTYEARFROM) * EXEC SQL CREATE DOMAIN TIDEDATE AS DATE FROM * '2025-12-31') END-EXEC MOVE SQL-COD DISPLAYPERFORM CHCKOK if (SQLCODE NOT MOVE 0 TO CHCKOK END-IF
CHCKOK PERFORM NOSUBCLASSDISPLAY"CREATE DOMAIN TIDETIMESTAMP TIMESTAMP "INTO VALUES ifNOT3"then MOVE 0 TO flag END-IF if (NORMSQ = "23000 DISPLAY"ANDTIMESTAMP2-23 3595+0:0);java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 then (VALUE TIMESTAMP-1
Valid END-IF PERFORM( < 0
DISPLAY"SELECT EXTRACT (YEAR EXECSQL WORK END-EXEC DISPLAY" INTO :cnth" DISPLAY" FROM " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 EXECSQLSELECT" (VALUE BETWEEN TIME ' ( NOT = "20 java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 INTO :cnth FROMEXEC CREATEDOMAINNORMSQ0"ANDNORMSQNOT=SQLSTATEjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAYcnth9;itsis,cjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 DISPLAY"
COMMIT END-IF
DISPLAYPERFORM "(, '17:30:00);" EXECSQLINSERTINTO DINNER_CLUB Eventually the non- *normalized data will be normalized and moved into the main
(0, TIMEDISPLAY" DECjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
DISPLAY"INSERT java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" (2, TIME '19:30:00');" EXECSQLINSERT" "CHCKOK
2':000)END-EXEC MOVE SQLCODE TODISPLAY , SQLDOMAIN java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65 DISPLAY"SQLCODE should be < EXECSQL PERFORMCHCKOK ifSQLCODE <0)then MOVE 0 TO flag END-IF DISPLAY"SQLSTATE should be 23000; its value is ", SQLSTATE PERFORM EXIT-NOSUBCLASS if ( SQLCODE PERFORMCHCKOK MOVE 0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 END-IF if (NORMSQ CHCKOK then DISPLAYSQLSTATE END-IFDISPLAY ,)AS
DISPLAY EPOCH1196387E08E0
DISPLAY"WORK" SQL WORK
(EPOCH6387 COMMIT PERFORM DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
*Clean up the mess
DISPLAY SQLCODETODISPLAY" SQL MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY""
"COMMITWORK;" EXECSQL WORKEND-EXEC MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY""
DISPLAYMOVETO SQL-COD EXEC"" MOVE SQLCODE TO PERFORM CHCKOK
D "COMMIT WORK;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
DISPLAY" CAST(FROMTIME ASTIDEDATE,JOB_ID" EXECPERFORM MOVEDISPLAYSELECT( ) JOB_ID PERFORM CREATE CHECK_PTS, java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 0 "
( ) FROM EXECSQL DROP DOMAINSELECT (TOTIME TIDEDATE, , MOVE ERFORM PERFORM DISPLAY" "
DISPLAY COMMIT EXECSQL COMMIT WORK PERFORM CHCKOK MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" "
DROP EXECSQL DINNER) END-EXEC MOVE SQLCODE TO SQL-COD PERFORMCHCKOK DISPLAY" "
DISPLAY"COMMIT WORK;" EXEC COMMIT MOVETOCONST_RAD PERFORMTO DISPLAY*Sign of results specified by 6.6 GR.3.a.i CHCKOK
DISPLAY"if( NOT = 3 ORxminit NOT =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 MOVE SQLCODEDISPLAY 30Atlantis.00 .00 ,12,java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69 PERFORMCHCKOK DISPLAY" "
DISPLAY COMMIT EXECSQL WORKjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 MOVE SQLCODE TO SQL-COD CASCADE END-EXEC PERFORM DISPLAY"
DISPLAYDROP EXECSQL DROP TABLE MOVE SQLCODE TO SQL-COD PERFORMjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 PERFORM DISPLAY" "
DISPLAY"DELETE FROM TIDES.LOCATIONS" DISPLAY"WHERE LOC_ID =30;" SQL.java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
DI " flag
DISP EXECEND-EXEC
CHCKOK PERFORMflag
DISPLAY"DISPLAY" implementation-defined
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
,.)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
CHCKOK
(8,pass
"*java.lang.StringIndexOutOfBoundsException: Range [54, 55) out of bounds for length 54 EXECSQLV('80','fail','PCO') END-EXEC
VALUES)java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 MOVE
DISPLAY" - EXECSQLINSERTINTO HU.TESTREPORTSQLCODE SQL-COD
UES,'*java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58 MOVE SQLCODEjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 COMPUTE errcnt1,
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
DISPLAY
EXECSQL"0, 10)"
SQL-COD ******************** END TEST0860 ******************** **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 STOP ( = "
* **** Procedures for PERFORM statements
*Test SQLCODE and SQLSTATE for normal completion.
CHCKOKD " " DISPLAY"SQLCODE should be 0; its value- .0,0)" DISPLAY*This routine replaces valid implementation-defined PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODE *After calling NOSUBCLASS, NORMSQ will be tested MOVE 0 TO flag END-IF if (NORMSQ " then *subclass begins in position 3 of char array NORMSQ -"001E0, 5.)" END-IF
.
NOSUBCLASS
END-IF *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.
P CHCKOK
MOVEEND-IF *subclass begins in position 3 of char array NORMSQ *valid subclass begins with 5-9, I-Z, end of ALPNUM table PERFORM., MOVETOnorm1 if (NORMSQX(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 25 MOVE"0 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( = CHCKOK
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 END-IF
MOVETOnorm1 *examining position 4 of char array NORMSQ *valid characters are 0-9, A-Z VARYINGFROMBY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
( java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 MOVE"0"TO NORMSQX(norm1) END-IF END-PERFORM
MOVE 5 TO norm1 *valid characters are 0-9, A-Z *examining position 5 of char array NORMSQ PERFORMFROM*java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 if(norm1 MOVE"0"TO NORMSQX(norm1 "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 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 NORMSQX(2) = "1") then "NSERT (30 7 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 und die Messung sind noch experimentell.