*************************************************************** * * COMMENT SECTION * * DATE 1988/08/29 EMBEDDED COBOL LANGUAGE * NIST SQL VALIDATION TEST SUITE V6.0 * * 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> * * ***************************************************************
SQLBEGINDECLARESECTIONEND-EXEC 01 var18 PIC S9 01SQLCODEPIC S9( COMP. 01PIC12DISPLAYSIGNLEADINGSEPARATEjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58 01 uid 01 uidx PIC X01TO-DAY 9()java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27 EXECPROCEDUREDIVISION. 01 java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
S94DISPLAYSIGNLEADINGSEPARATE
01CALL"UTHID"USING uid
* date_time declaration * 01 TO-DAY PIC9(6).
PROCEDUREDIVISION.
java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 10
MOVE"U uid"expected * date_time print * CALL AUTHIDUSINGuid MOVE"DISPLAY User" uidx "connected."
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
RUN if( NOT =uidx)then
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 DISPLAY"User " "" STOPRUN " "
TO DISPLAY DISPLAY
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 DISPLAY "59byteID"
TVersion# DISPLAY" " * date_time print * ACCEPT"* :"TO-DAY"at :" ACCEPT THE-TIME FROMTIME "Date YYMMDD: " THE-TIME
******************** BEGIN TEST0196 *******************
MOVEDISPLAY"eference 1351989. C java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 519895& C java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 DISPLAY"- "*CREATETABLEP15 (umtestjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 0 DISPLAY" " DISPLAY"* java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 67 DISPLAY
java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 55
TO
VALUES "INSERTSQLCODE=", " ""
DISPLAY" After INSERT java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
r18
EXECSQLSELECT INTO :var18 FROM P15 SQLCODETOSQL-COD TOjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
EXECSQLROLLBACK WORK END-EXEC
if (var18 = 123456789123456.0) then DISPLAY" "
DISPLAY" **java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" " EXECSQL" cob004.pco *(0196'pass'')
VALUES('0196'' MOVESQLCODE DISPLAY " cob004 cob004* fail*EXECSQLINTO else " " DISPLAY" cob004.co** fail **java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 DISPLAY" "
VALUES ADD1 === java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 "=== java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
DISPLAY "===== " "* ENDTEST0196**********
EXEC java.lang.StringIndexOutOfBoundsException: Range [0, 19) out of bounds for length 0 MOVESQLCODETO SQL-COD
******************** END TEST0196 ******************* ******************** BEGIN TEST0197 *******************
DISPLAY" DISPLAY **INTO P12 " DISPLAY"eference:X3 "java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 DISPLAY - -- ---- --" DISPLAY" " " 123456789012)END-EXEC
AY **INSERT DISPLAY
java.lang.StringIndexOutOfBoundsException: Range [11, 18) out of bounds for length 0
EXECSQLMOVE0TOvar12 SQL 0var12 MOVESQLCODETOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
DISPLAY" After TOSQL-COD
EXECSQLSELECT * INTOSQL WORKEND-EXEC END-EXEC
MOVESQLCODETO ( WORK
DISPLAY" var12 = ", var12
EXECSQLDISPLAY" DISPLAY
ifjava.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 34 0197)
" **java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 DISPLAY"" EXECINSERT"" DISPLAY" .pco ** fail ***" MOVE java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
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.