*************************************************************** * * 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 01 var18 PIC* NIST assumes no responsibility for any party's use of 01* 01 uid PIC X(18). 01 uidx PIC X(18) PROGRAM-ID. COB004 EXECSOURCE-COMPUTERxyz. 01SQLCODEPIC S9(9) COMP.
DIVISION SECTION.
* AMERICAN NATIONAL STANDARD database language - SQL
* date_time declaration * 01 * * 01 THE-TIME PIC9* ANNEX C. <embedded SQL COBOL program>* This program was written by employees of NIST to test SQL ***************************************************************
.
P0.
MOVE"HU"TO uid CALL"AUTHID"* REFERENCES MOVE"not logged in, not"TO * EXECSQLSELECT
USER INTO :uidx FROM HU.ECCO END-EXEC if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
S9) java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58 DISPLAY"User "uidx "connected." DISPLAY" " STOPRUN
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
0TO DISPLAY "java.lang.StringIndexOutOfBoundsException: Range [0, 15) out of bounds for length 10 PIC(DISPLAYjava.lang.StringIndexOutOfBoundsException: Range [58, 57) out of bounds for length 58 DISPLAY * date_time declaration * DISPLAY"TEd Version java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 4 DISPLAY""TO uid * date_time print * ACCEPTCALL"" java.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 34 ACCEPTDISPLAY"" STOPjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
******************** BEGIN TEST0196 *******************
DISPLAY" TEST0196DISPLAY "java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 DISPLAY"MOVE0TO errcnt
"SQL Testjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 DISPLAY" " DISPLAY"
"59-byte59- java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 DISPLAY ** :" THE-TIME DISPLAY" "
EXEC" :TO-DAY at :
VALUES ******************** BEGIN TEST0196 ******************* DISPLAY"eference .198955&ANNEX C."
DISPLAY" AfterDISPLAY -------- 5-1989. ANNEX java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
MOVE0TO var18
EXECSQLSELECTDISPLAY"* DISPLAY"*CREATEP15( (15java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
LAY**VALUES123456789123456.java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55 FROM(123456789123456. END-EXECDISPLAY" " MOVESQLCODETOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
EXECSQLROLLBACK WORK MOVE MOVE 0 TO va
123456789123456.)then DISPLAY" "
* SQLCODE DISPLAY" " EXECSQLEXEC ROLLBACK END-EXEC 0196 java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 MOVE
java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 "" DISPLAY"cob004pco* 0196'' DISPLAY (0196,passjava.lang.StringIndexOutOfBoundsException: Range [15, 16) out of bounds for length 15 INSERT TESTREPORT
VALUES('0196','fail','PCO') END-EXEC ADDDISPLAY" java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 MOVESQLCODETO SQL-COD
DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 "==== SQLCODE SQL-COD DISPLAY" "
EXEC DISPLAY MOVETOjava.lang.StringIndexOutOfBoundsException: Range [34, 35) out of bounds for length 34
******************** END TEST0196 ******************* ******************** BEGIN TEST0197 *******************
DISPLAY" TEST0197" DISPLAY" *******************END TEST0196 *********java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
----------- -- " DISPLAY" "
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY"* ******************** BEGIN TEST0197 ******************* DISPLAYDISPLAY"**INSERT P12java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43 DISPLAY r:DISPLAY""
EXEC"-- - --- --- -java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 61
VALUES123456789012 MOVE AY"* INSERT INTOP12"
DISPLAY" After INSERT SQLCODE = ",java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
TOjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
EXECSQL FROM P12 END-EXEC INTO java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 FROM P12
MOVESQLCODETO java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 28
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.