**************************************************************** * * COMMENT SECTION * * DATE 1996-05-15 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. * * DML179.PCO * WRITTEN BY: David Flater * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE * * This routine tests Intermediate SQL. * * REFERENCES * FIPS PUB 127-2 14.2 Intermediate SQL * ANSI SQL-1992 * ****************************************************************
01 longst-value. 02fillerpic x(71) value"INSERT INTO T0892 (INTKEY, NAAM,
- " ADDRESS, KEYWORDS, DESCRIPT3) VALUES (". 02fillerpic x(71) value"0, 'John". 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespaces. 02fillerpic x(52) value"
- " Smith', ". 02fillerpic x(68) value"'1313 Osprey Alley". 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespaces. 02fillerpic x(68) value"Box 35B Sector 28 Quadrant 3". ". 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespaces. 02fillerpic x(68) value"Rural Route 29837-39234234324-XR
- "Z". 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespaces. 02fillerpic x(68) value"Beverly Hills, CA". 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespaces. 02fillerpic x(52) value"
- " 90210', ". 02fillerpic x(68) value"'aardvark osprey metrol
- "gy".
lerpic x) spacesjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 02fillerpic x(68) valuespaces. 02fillerpic x(68) value"synthetic
- "P". 02filler* COMMENT SECTION 02fillerpic* DATE 1996-05-15 EMBEDDED COBOL LANGUAGE
- " quadruped cattle". 02fillerpic x( * This program was written by employees of NIST to test SQL 02fillerpic* FIPS PUB 127-2 14.2 Intermediate SQL
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 02filler01PIC()COMP. fillerpic (68 spacesjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 02fillerpic x( uidx X18. 02fillerpic x(68) value"java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 31 02fillerpic x(68) valuespaces. 02fillerpic x(68) valuespacesjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 fillerpic() value"java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
- " gravity',". 02pic x()value"filler filler blah
- " x() value ",'ohn. 02fillerpic x(68) valuespaces02 x68valuespaces. spaces. 02fillerpicx) spaces. fillerpic x()value . 02fillerpic (68value . 02fillerpic x(68) valuespaces. 02fillerpic x(68) 02filler )valuespaces. filler x68valuespaces. pic x68)spacesjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 02fillerpicx()valuespaces.
x68) . 02fillerpic x02filler x()value 02 02 fillerfillerpic() "1313 Alley"java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
).
01 norm1 PIC S90268" .
norm2S9 SIGNSEPARATE 01 ALPNUM-TABLE 02 filler pic xspaces 789" 05 -""java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 01 . 05 NORMSQXX OCCURSTIMES. 01errcnt S99DISPLAYSEPARATE *date_time declaration 01 TO-DAY 02 filler x52)value java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 01 THE-TIME 02 filler (68)value"aardvark osprey java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 01 flag 02 fillerpic()valuespaces
01 SQL-COD PIC S9(9) DISPLAYSIGN"
PROCEDUREfillerx68) gnuyak
java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
MOVE"FLATER02picx) value"CORBAIDLAmste CALL" - "rdam""rdam". MOVE"not logged in, not"TO uidx
USER :idx FROM HU.CCOEND-EXEC MOVESQLCODETO SQL-COD SQLROLLBACK WORK END-EXEC 02picx68) java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 if (uid NOT = uidx) then DISPLAY"ERROR: User ", uid, " java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 46
- " connected 02 filler pic x(68) value spaces. STOPRUN END-IF 0TO errcnt
DISPLAY "SQL Test Suite, V6.0, Embedded COBOL, dml179.pco - "lah. DISPLAY "59-byte ID" DISPLAY"TEd Version #" *date_time print ACCEPT 02 filler filler x()valuespacesjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 ACCEPT THE-TIME FROMTIMEspacesjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 fillerpicx( valuespaces.
******************** BEGIN TEST0892 ******************* MOVE1TO02fillerpic (65 valuespaces.
DISPLAY" FIPS " sizing = 8000,statement >java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67 4000" DISPLAY"References:" DISPLAY" FIPS 16.6 -- Sizing #27, Length of a row" DISPLAY" "ABCDEFGH56789IJKLMNOPQRSTUVWXYZ "statement >java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 DISPLAY" FIPS 166-- #,CHARACTER
- " length" DISPLAY" - ----------- --- -- "
*date_time declaration
xx SQLSTATE
*twice the number of columns 18 *length of char strings 7978 *decimal precision plus 1 of each exact numeric column 4
DISPLAY"CREATE TABLE T0892 (" DISPLAY" INTKEY NUMERIC 3 PRIMARY KEY,
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0 DISPLAY" ADDRESS VARCHAR (1000)," DISPLAY" KEYWORDS VARCHAR (1000)," DISPLAY" FUNCTION1 VARCHAR (1000)," DISPLAY" FUNCTION2 VARCHAR (1000)," DISPLAY" DESCRIPT1 VARCHAR (1000)," DISPLAY" DESCRIPT2 VARCHAR (1000)," DISPLAY" DESCRIPT3 VARCHAR (978));" EXECSQL CREATE TABLE MOVESQLCODETO
INTKEY NUMERIC (3) SQLCODE SQL-COD
NAAM (1000), ADDRESS VARCHAR "RROR:User" , expected.User" uidx,java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
()java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
FUNCTION1 VARCHAR (1000
FUNCTION2 "SQL Test Suite, V6EmbeddedCOBOL,dml179.co 59byteID
DESCRIPT2 VARCHAR (1000),
DESCRIPT3 VARCHAR (978)) END-EXECACCEPT TO-DAY FROM
TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 PERFORM"FIPS " DISPLAY" "
DISPLAY"WORK;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
COMMIT END-EXEC MOVESQLCODETODISPLAY"FIPS 166- Sizing#27 Length of a row" PERFORM CHCKOK " "
MOVE longst-value TO longst DISPLAY"The java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 66 " - - --- - ---- DISPLAY longst
DISPLAY java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 "xxxx"TO
*twice the number of columns 18 PERFORM CHCKOK DISPLAY" "
DISPLAY"UPDATE T0892" DISPLAY FUNCTION1 = DISPLAY"INTKEY NUMERIC ()PRIMARY KEY,"
- " of the '" DISPLAY"'Materials '" DISPLAY"'Blasting Laboratory in the National Cattle
- "Acceleration '" DISPLAY"'Project of '" DISPLAY"' DISPLAY " KEYWORDSVARCHAR (1000),"
- DISPLAY"FUNCTION1 (1000),java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 DISPLAY DESCRIPT1 (1000)" DISPLAY978)
-" of'java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 DISPLAY"'materials '" DISPLAY"'usedinthetrebuchet. He served ten years as
- " the '" DISPLAY VARCHAR(000, DISPLAY FUNCTION1 1000)
thejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 "Pennsylvania' DISPLAY VARCHAR 978)END-EXEC
- " '" DISPLAY"'java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY"'as a world-class graffiti artist and source of
- " all good '" DISPLAY"' MOVE SQLCODE T DISPLAY' in poorweather.He is
-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY T statementa DISPLAY"'paperback novels, java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 34
- DISPLAY"Pumpkinswill Fit ' DISPLAYEXEC :
-"Useless Things 'java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 DISPLAY"that Don't' DISPLAY"'Want java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 0 " DISPLAY"'Head without '" ' worksRedundancy
-"of 'java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 ' ' DISPLAY"'java.lang.StringIndexOutOfBoundsException: Range [0, 31) out of bounds for length 28
- " DISPLAY lower jobto the
DISPLAYjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 36
- java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 26 DISPLAYDISPLAY' intrebuchet served
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 30
Harry inthejava.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 67 ' java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 'Acceleration "' ' tojava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 61
- "all 'java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 'correlate the loft and acceleration "to poor weather. isis 'quality of DISPLAY "'ten thousand ' the trebuchet. served ten ' 'as the java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 20 'charge of marketing in the now "the ofa ,""A java.lang.StringIndexOutOfBoundsException: Range [65, 66) out of bounds for length 65 ' of ' 'java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 64 DISPLAY'without'java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 ' 'all good bits related ' 'to ANSI 'java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 'authorof ten java.langEXEC UPDATE SETCHAR_LENGTH(ESCRIPT1 +
CHAR_LENGTH()
DESCRIPT2=FUNCTION1
F FROM1FOR978) END-EXEC MOVESQLCODETO PERFORM WHERE INTK 0END-EXEC DISPLAY" "
DISPLAY" 8000;its is ", int1 DISPLAY"SELECT CHAR_LENGTH (NAAM) +" "CHAR_LENGTH (DDRESS) +" DISPLAY" CHAR_LENGTH (KEYWORDS) +" DISPLAY" CHAR_LENGTH (FUNCTION1) +" DISPLAY" CHAR_LENGTH (FUNCTION2) +" "CHAR_LENGTH (DESCRIPT1) +" DISPLAY" CHAR_LENGTH (DESCRIPT2) +" DISPLAY" CHAR_LENGTH (DESCRIPT3) + EXEC COMMIT WORK END-EXEC DISPLAY" INTO :int1" DISPLAY" FROM T0892" DISPLAY" WHERE INTKEY = 0;" EXECSQLDISPLAY" TABLE T0892 ;java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
CHAR_LENGTH (ADDRESS) +
CHAR_LENGTH (KEYWORDS) +
CHAR_LENGTH (FUNCTION1) +
CHAR_LENGTH (FUNCTION2) +
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
CHAR_LENGTH (DESCRIPT2) +
CHAR_LENGTH (DESCRIPT3) + 22 INTO :int1 FROM T0892 WHERE INTKEY = 0END-EXEC MOVESQLCODE PERFORM CHCKOK DISPLAY"int1 should be 8000; its value is ", int1 then MOVE0TO flag
DISPLAY"DROP TABLE T0892 CASCADE pco * **java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
TABLEEND-EXEC MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORKDISPLAY ===========================java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY" "
if ( flag = 1 ) then DISPLAY" *** pass *** " EXECSQLINSERTINTOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
VALUES(' MOVESQLCODETOPERFORM NOSUBCLASS EXIT-NOSUBCLASS
DISPLAY" dml179.pco *** MOVE 0 TO flag EXECSQLINSERTINTO HU.TESTREPORT
VALUES(0892''fail''' END-EXEC MOVESQLCODETO SQL-COD COMPUTE errcnt = errcnt + 1
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD ******************** END TEST0892 ******************** **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
*This routine replaces valid implementation-defined
* **** Procedures for PERFORM statements
*Test SQLCODE and SQLSTATE for normal completion.
CHCKOK. DISPLAY"SQLCODE *After calling NOSUBCLASS, NORMSQ will be tested DISPLAY"SQLSTATE should be 00000; its value is ", SQLSTATE
SQLSTATE TONORMSQ if (SQLCODENOTMOVE3TOnorm1 MOVE0TO flag END-IF if ( PERFORMVARYINGnorm2 FROM14BY1UNTIL norm2 > 36 then " 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.
MOVEjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
MOVE3*so proceed to zero it out, if valid (0-9,A-Z) *subclass begins in position 3 of char array NORMSQ *valid subclass begins with 5-9, I-Z, end of ALPNUM table PERFORMVARYING java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 17 if (NORMSQX *examining position 4 of char array NORMSQ 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 (NORMSQ = SQLSTATEMOVE0"TO (orm1) GOTO java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 22 END-IF
MOVE4*examining position 5 of char array NORMSQ *examining position 4 of char array NORMSQ *valid characters are 0-9, A-Z PERFORM norm2FROM1UNTIL norm2 36 if (NORMSQX(norm1) = ALPNUM(norm2)) then MOVE"0" MOVE "0" TO(norm1) END-IF END-PERFORM
MOVE5 *implementation-defined subclasses are allowed for warnings *valid characters are 0-9, A-Z *examining position 5 of char array NORMSQ PERFORMVARYING norm2 FROM1BY1UNTIL norm2 if(java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 53 " () END-IF END-PERFORM
*implementation-defined subclasses are is not impl.-def. *Changed NORMSQ means implementation-defined subclass, *so proceed to zero it out, if valid (0-9,A-Z) if (NORMSQ = *subclass begins in position 3 of char array NORMSQ GOTO EXIT-NOSUBCLASS END-IF
MOVE4TO norm1 *examining position 4 of char array NORMSQ *valid characters are 0-9, A-Z PERFORMVARYING norm2 java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 if (NORMSQX(norm1 *so proceed to zero it out, if valid (0-9,A-Z) MOVE""TONORMSQX(orm1 END-IF END-PERFORM
MOVE5TO norm1 *valid characters are 0-9, A-Z *examining position 5 of char array NORMSQ PERFORMVARYING*examining position 4 of char array NORMSQ ifVARYINGFROM1BY1UNTILnorm2>java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
NORMSQX) 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" (NORMSQX(norm1) = ALPNUM(norm2)) then MOVE"0"TOMOVE"0"TO NORMSQXnorm1) END-IF
.
EXIT-NOSUBCLASS. EXIT.
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-10-11)
¤
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.