IDENTIFICATION* COMMENT SECTION PROGRAM-ID. COB004. ENVIRONMENT* DISCLAIMER: CONFIGURATION* NIST assumes no responsibility for any party's use of SOURCE-COMPUTER. xyz. OBJECT-COMPUTER. xyz. DATADIVISION. WORKING-STORAGESECTION.
* EMBEDDED COBOL (file "COB004.PCO")
*************************************************************** * * COMMENT SECTION * * DATE 1988/08/29 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. * * COB004.PCO * WRITTEN BY: S Hurwitz * * THIS ROUTINE TESTS COBOL DATA TYPES IN SQL LANGUAGE. * * REFERENCES * AMERICAN NATIONAL STANDARD database language - SQL * X3.135-1989 * * SECTION 5.5 <data type> * ANNEX C. <embedded SQL COBOL program> * * This program was written by employees of NIST to test SQL ***************************************************************
EXEC * NIST assumes no responsibility for* this program. 01 var18 PIC* COB004.PCO PROCEDUREDIVISION. 01 java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 0
EXECSQLEND-EXEC 01 S99)java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 01var12PIC( SIGN.
01 SQL-COD PIC S9 User "java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 47
* date_time declaration *
PIC(. 01 MOVE0 errcnt
P0.
MOVE"HU"TO 01 errcnt ) . " MOVE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXEC
USER INTO if DISPLAY"ERROR: User " java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 25 " ""
java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 24
END-IF uid
******************** BEGIN TEST0196 ******************* "SQL java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 42 DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
******************** BEGIN TEST0196 *******************
DISPLAY" TEST0196" DISPLAY run" hhmmssff:" ":X3.- 5 java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 " -- -- 5198955& ." DISPLAY" " DISPLAY"* (umtest java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 0 DISPLAY"*** INSERT INTO "* * TABLE (umtest NUMERIC(15)) " DISPLAY" "
EXECSQLINSERT INTO "* (123456789123456) "
ES123456789123456.java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 23 MOVESQLCODE SQL-COD
DISPLAY" After ",SQL-COD
MOVE0
EXECSQLSELECT * INTO :var18 FROM P15 1234567891234560then MOVETO
DISPLAY" DISPLAY " MOVE SQL-COD
SQL WORKjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 MOVESQLCODE VALUES('0196TOSQL-COD
if (var18 = 123456789123456.0) then
DISPLAY
DISPLAYelse DISPLAY" " DISPLAY" "
VALUES'0196'pass'PCO'END-EXEC MOVESQLCODETO SQL-COD else DISPLAY" " DISPLAY"cob004.pco ** java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 42 DISPLAY" " EXECSQLINSERTINTO DISPLAY " cob004.pco *** . * fail*"
VALUES('0196 ADD1DISPLAY MOVETOjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 END-IF
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 "========= MOVE SQLCODE SQL-COD DISPLAY" "
EXEC******************** END TEST0196 ******************* MOVESQLCODE java.lang.StringIndexOutOfBoundsException: Range [0, 1) out of bounds for length 0
******************** END TEST0196 ******************* ******************** BEGIN TEST0197 *******************
DISPLAYDISPLAY" - - - -------"
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" " DISPLAY"***
java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 43 DISPLAY"*** VALUES(123456789012.) "
java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 23
SQL - --- - -- --" MOVESQLCODEDISPLAY (..
DISPLAY"
0TO var12
EXECSQLMOVE MOVETO
java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
DISPLAY" cob004.pco *** fail ***" DISPLAY" EXECSQL java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
VALUES('0197','fail' java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 34 ADD
LCODETO END-IF
DISPLAY
====================java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD
******************** END TEST0197 *******************
**** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 STOPRUN
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.