IDENTIFICATION. PROGRAM-ID.DML037. DML037java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28 ENVIRONMENTDIVISION. CONFIGURATIONSECTION. * WRITTEN BY: HU YANPING OBJECT-COMPUTER. xyz * THIS PROGRAM TESTS THE USE OF VARIABLE NAMES AS COLUMN NAMES * WITHIN SQL STATEMENTS.
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
* Standard COBOL (file "DML037.SCO") calling SQL * procedures in file "DML037.MCO"
**************************************************************** * * COMMENT SECTION * * DATE 1987/09/13 STANDARD 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.
* DML037.SCO * WRITTEN BY: HU YANPING * TRANSLATED AUTOMATICALLY FROM EMBEDDED COBOL BY CHRIS SCHANZLE * * THIS PROGRAM TESTS THE USE OF VARIABLE NAMES AS COLUMN NAMES * AND THE PLACEMENT OF SQL-STYLE COMMENTS * WITHIN SQL STATEMENTS. * * REFERENCES * AMERICAN NATIONAL STANDARD database language - SQL * X3.135-1989 * * SR3 of Annexes C, E, F; SR4 of Annex D. * Section 5.3 <token>, <comment> definition ****************************************************************
* EXEC SQL BEGIN DECLARE SECTION END-EXEC
1 PIC3.
01 " 1 i S9(9)DISPLAY LEADING SEPARATE. PIC9 SIGN PIC(java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
01 GRADE " "
1str240. * EXEC SQL END DECLARE SECTION END-EXEC "java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 PIC)
01 THE-TIME DIVISION
(
java.lang.StringIndexOutOfBoundsException: Range [0, 21) out of bounds for length 0
--- -java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 * WHERE PNUM='P2' END-EXEC
* date_time declaration *
1 PIC6 SQLCODEjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 PIC
PROCEDURE.
- ii AND = 1)then
MOVE""TO * EXEC SQL INSERT INTO TESTREPORTDISPLAY"
"sco*fail ** java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57 MOVE SQL-COD ifDISPLAY java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 ERROR" ." DISPLAY" " DISPLAY "User " uidxjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 DISPLAY ******************** BEGIN TEST0202 *******************
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
0 " " "-java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
SUB6 DISPLAY" "
"59-byte ID" DISPLAY* EXEC SQL INSERT INTO TEXT240 -- This is the test for rules* WHERE PNUM='P2' END-EXEC " * date_time print * ACCEPT SQLCODE TO TO ******************** BEGIN TEST0202 *******************
* EXEC SQL DECLARE X CURSOR * FOR SELECT EMPNUM,HOURS * FROM WORKS * WHERE PNUM='P2' END-EXEC * EXEC SQL OPEN X; CALLDISPLAY*java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 MOVE S'2''CALL" java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
MOVE* EXEC SQL INSERT INTO TESTREPORT* VALUES('0202','fail','MCO') END-EXEC
0 i PERFORM SQLCODE
0END-IF * EXEC SQL SELECT STAFF.GRADE, STAFF.CITY * INTO :GRADE,:CITY * FROM STAFF * WHERE EMPNUM = 'E2' END-EXEC * EXEC SQL COMMIT WORK; * EXEC SQL INSERT INTO TESTREPORT
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVE
----- --"
if ( * FROM TEXT240 END-EXEC
SPLAY * EXEC SQL INSERT INTO TESTREPORT * VALUES('0202','pass','MCO') END-EXEC CALL* ('SQL-STYLE COMMENTS') --of* -- SQL-style comments MOVE SQL-COD "dml037sco ** ***"
ejava.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15 DISPLAY * EXEC SQL INSERT INTO TESTREPORT * FROM TEXT240 END-EXEC
SUB11
MOVE
java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 36
M SQLCODE* *"
DISPLAY======= * EXEC SQL COMMIT WORK;
SQLCODESTOPTO MOVE.* *java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
******************** END TEST0202 *******************
******************** BEGIN TEST0234 *******************
* EXEC SQL DELETE -- we empty the table! * FROM TEXT240 END-EXEC CALLSUB6java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 MOVE
* EXEC SQL INSERT INTO TEXT240 -- This is the test for rules * VALUES -- for the placement * ('SQL-STYLE COMMENTS') --of * -- SQL-style comments * END-EXEC CALL"SUB7"USING MOVE
DISPLAY" After ii = i 1
M SQLCODE
* EXEC SQL SELECT * -- There is only one column to select. * INTO * :str240 -- there is only one row in the table * FROM TEXT240 END-EXEC CALL"SUB8"USING SQLCODE str240 MOVE SQLCODE TO SQL-COD
******************** END TEST0234 *******************
**** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 STOPRUN.
* **** Procedures for PERFORM statements
P50. * EXEC SQL FETCH X INTO :EMPNUM,:HOURS; CALL"SUB13"USING SQLCODE EMPNUM HOURS MOVE SQLCODE TO SQL-COD if (SQLCODE = 0) then COMPUTE ii = i + 1 DISPLAY" EMPNUM=", EMPNUM " and HOURS=", HOURS "
- " " END-IF ADD 1 TO i
.
-- " SQLCODE DISPLAY . **fail DISPLAY "======================== * EXEC SQL INSERT INTO TESTREPORT * VALUES('0234','fail','MCO') END-EXEC * FROM TEXT240 END-EXEC CALLUSING MOVETO
DISPLAYOLLBACK ""
* EXEC SQL COMMIT WORK; CALL SQLCODE
OVE TO"****"
******************** END TEST0234 *******************
**** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 RUNSQLCODEjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
* **** Procedures for PERFORM statements
P50. * EXEC SQL FETCH X INTO :EMPNUM,:HOURS;
SQLCODE ""USING SQLCODE MOVE SQLCODEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (SQLCODEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
P0 DISPLAY" EMPNUM=", EMPNUM " and HOURS=", HOURS
- " " END-IF ADD-STYLE COMMENTS') * -- SQL-style comments
.
¤ Dauer der Verarbeitung: 0.14 Sekunden
(vorverarbeitet)
¤
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 ist noch experimentell.