IDENTIFICATIONDIVISION.
* This routine tests FIPS feature 19. * This is the dynamic version of DML117.PC. ENVIRONMENTDIVISION. * REFERENCES SOURCE-COMPUTER* FIPS PUB 127-2 14.1 Transitional SQL OBJECT-COMPUTER. xyz. DATADIVISION. WORKING-STORAGESECTION.
* EMBEDDED COBOL (file "DML118.PCO")
**************************************************************** * * COMMENT SECTION * * DATE 1994/6/2 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. * * DML118.PCO * WRITTEN BY: David W. Flater * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE * * This routine tests FIPS feature 19. * This is the dynamic version of DML117.PC. * * REFERENCES * FIPS PUB 127-2 14.1 Transitional SQL * ANSI SQL-1992 * ****************************************************************
MOVE"FLATER "TO uid
MOVEFLATER "TOuid MOVE"not in not" uidx EXECSQLSELECT USER INTO :uidx FROM HU.ECCO END-EXECMOVE" in,not"TOuidx MOVESQLCODETO SQL-COD EXECSQLROLLBACK WORK END-EXEC MOVESQLCODESQLCODE if (uid NOT = uidx) then DISPLAY"ERROR: User ", uid " (uid uidx)then
-"connected" STOPRUN END-IF 0 errcnt
DISPLAYSTOPRUN "SQL Test Suite, V6.0, Embedded COBOL, dml118.pco" DISPLAY "9byte java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 DISPLAY" #java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 *date_time print ACCEPT TO-DAY FROM" Version #java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 ACCEPT THE-TIMEACCEPT DaterunYYMMDD hhmmssff
******************** BEGIN TEST0646 ******************* MOVE flag
"Feature 19,Referential delete actions DISPLAYdynamic)
- " (dynamic)" DISPLAY: DISPLAY" FIPS PUB 127-2 14.1 Transitional SQL features
- " 16, 19" " 11.8 LR2ajava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 "114 .." DISPLAY" - - - - - - - - - - - - - - - - - - -"
COMPUTESQLCODE = -1 MOVE"xxxxx"TOSQLSTATE
*Simulate a tiny OS with hard quotas (ick!)
EXECSQLDELETEFROM CONCATBUF END-EXECMOVE"xxxxx"TO MOVESQLCODETO SQL-COD
EXECSQLDELETEFROM CONCATBUF END-EXEC 'CREATE TABLE LUSERS (' || ' PRIMARY KEY (LUSER_ID),' || ' NAAM CHAR (10),' || ' LUSER_ID INT,' || ' FILE_QUOTA INT,' || ' FILE_USAGE INT , |java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
FILE_USAGE= 0AND' | ' (FILE_QUOTA NAAM CHAR 10, |
) END-EXEC MOVE FILE_QUOTAINT | EXECSQLSELECT ZZINTO:longst FROM CONCATBUF END-EXEC MOVESQLCODETO SQL-COD
DISPLAY" ' (ILE_USAGE> ' |
"" EXECSQLCOMMIT )
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36 PERFORM CHCKOK DISPLAY" "
"java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 49
java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 45 MOVESQLCODE PERFORM CHCKOK " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY"COMMIT WORK;" EXECSQLDISPLAY" MOVESQLCODETO SQL-COD
java.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25 DISPLAY" "
*When you delete a user, all his/her files are also deleted
EXEC MOVE SQLCODETO SQL-COD MOVESQLCODE SQL-COD EXECSQLINSERTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
CREATETABLE (
|| ' FOREIGN KEY (LUSER_ID) REFERENCES LUSERS ON DELETE
CASCADE' |java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 ' PRIMARY PERFORM
|| ' FILE_NAME java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
||
INTNOTNULL'
|| ' LUSER_DATA CHAR (30))'
) MOVESQLCODETO SQL-COD EXECSELECTZZINTO: CONCATBUFjava.lang.StringIndexOutOfBoundsException: Range [68, 69) out of bounds for length 68 MOVEDISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY"longst=""", longst """"
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK END-EXEC MOVE java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 PERFORM CHCKOK DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
EXECSQLDELETEFROM CONCATBUF END-EXEC MOVESQLCODETO SQL-COD EXECSQLINSERTINTO CONCATBUF VALUES ( 'CREATE TABLE AUDIT_CODES ('
| | ' PRIMARY KEY'java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
|| ' |
| ' CHECK (LUSER_ACTION = ''INSERT'' OR LUSER_ACTION = ''' | ' OR LUSER_ACTION = ''DELETE''))'
) END-EXEC
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36 EXECSQLSELECT ZZ INTOSQLCODETO MOVESQLCODETO SQL-COD
DISPLAY"longst=""", SQLCOMMIT END-EXEC
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 25
"
"XECUTE longst;" EXECMOVESQLCODETOSQL-COD MOVESQLCODE SQL-COD PERFORMDISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY""
DISPLAY"COMMIT WORK;" EXECSQL WORK java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY" "
*This table ostensibly separates UID's that have been valid at s *time in history from those that have always been invalid.
*The persistent audit records need to be consistent in the *event that a LUSER_ID is recycled after someone is deleted. *The original LUSER_ID is preserved in SAVED_LUSER_ID in case *it is needed.
MOVE DISPLAY
-"DELETE NULL,java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 DISPLAY" LUSER_ID INT," DISPLAY" SAVED_LUSER_ID INT NOT NULL" DISPLAY" REFERENCES *it is needed.
- "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" ACTION_KEY INT DEFAULT DISPLAY (USER_ID) REFERENCES LUSERS ON DISPLAY" REFERENCES AUDIT_CODES ON DELETE SET
- " DEFAULT);"
SQL TABLE AUDIT_RECORDS
FOREIGN KEY (LUSER_ID " SAVED_LUSER_ID INT java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 NULL,
INT
SAVED_LUSER_ID INT " DEFAULT0 NULL"
REFERENCES ALL_USER_IDS () ONNO,
ACTION_KEY INT " DEFAULT);
DELETE DEFAULT MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAYd=INSERT VALUES(java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 MOVEMOVESQLCODETO SQL-COD TO dstmt
DISPLAY "XECUTEIMMEDIATE :stmt;"
- " 1)""" INSERTINTO VALUES(''2 ,) java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 TO dstmt
DISPLAY"dstmt=" ALL_USER_IDS VALUES 0"" MOVE"INSERT INTO ALL_USER_IDS VALUES (0) " TO dstmt
DISPLAY"EXECUTE IMMEDIATE :dstmt;" EXECSQL EXECUTE IMMEDIATE :dstmt java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 21 MOVE java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
PERFORM CHCKOK DISPLAY" "
DISPLAY"dstmt=""INTOALL_USER_IDS VALUES (1)"" MOVE" INTO VALUES (1) java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 TO dstmt
DISPLAYEXECUTEIMMEDIATE:stmtjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 DISPLAY" "
*Root hated Kibo only slightly less than BIFF
EXECSQLDELETEFROM CONCATBUF END-EXEC MOVESQLCODETO SQL-COD EXECSQL java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 'INSERT INTO LUSER_DATA VALUES (''ROOT1'',' || ' 0, ''BIFF is a total loser'')'
) END-EXEC MOVESQLCODE SQL-COD EXECSQLSELECT ZZ INTO :longst FROM CONCATBUF END-EXEC MOVESQLCODETO SQL-COD
EXEC"NSERT INTO ALL_USER_IDS VALUES (1) MOVESQLCODETO SQL-COD INSERT CONCATBUFVALUES java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 'INSERT INTO LUSER_DATA VALUES (''ROOT2'',' || ' 0, ''Kibo wastes
) END-EXEC MOVETO EXECSQLSELECT ZZ INTO :longst FROM CONCATBUF MOVESQLCODE SQL-COD
DISPLAYINSERTINTOALL_USER_IDSVALUES2
EXECSQLEXECUTEIMMEDIATE: MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
PERFORM
- " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 MOVE"INSERT INTO AUDIT_RECORDS VALUES (0, 0,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 TO dstmt
"dstmt=" AUDIT_RECORDSVALUES (, 0java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
-" 1)" MOVE"INSERT INTO AUDIT_RECORDS VALUES (0, 0, 1) " TO
DISPLAY"dstmt="SQLCODETO java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
- " 1)""" MOVE"INSERT DELETE CONCATBUF END-EXEC TO dstmt
COMPUTE int1 = int1 + 1 if (int1 NOT >java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 GOTO P199
*Finally he succeeded and overwrote Kibo's file with garbage
DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 21
- )"java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 MOVE"NSERT INTO AUDIT_RECORDS VALUES 2 ,0 java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 TO dstmt
DISPLAY"EXECUTE IMMEDIATEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECSQL EXECUTE IMMEDIATE :dstmt END-EXEC MOVESQLCODETO SQL-COD
CKOK DISPLAY" "
MOVE "INSERT INTO AUDIT_RECORDS VALUES (0, 0, 1) "
- " 2)""" MOVE"INSERT INTO AUDIT_RECORDS VALUES (2, 2, 2) " TO dstmt
EXECSQLDELETEFROM CONCATBUF END-EXEC TO EXECSQLINSERTINTO CONCATBUF VALUES 'INSERT INTO java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
) END-EXEC MOVESQLCODETO SQL-COD EXECSQLSELECT ZZ INTO : MOVE "INSERT INTO AUDIT_RECORDS1 ,0) "
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
DISPLAY"PREPARE S11811 FROM :dstmt;" EXECSQL PREPARE S11811 FROM MOVESQLCODETO SQL-COD
PERFORM java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 DISPLAY" "
MOVE "INSERTjava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 70 EXECSQLTO DISPLAY"java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 48
COMPUTE -java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 DISPLAY"dstmt="INTOAUDIT_RECORDSVALUES 22java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69 EXECSQL java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 54 TO DISPLAY"java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 48 DISPLAY"int1 should be 2;TO if (int1 NOT = 2) then
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0 END-IF
DISPLAY"dstmt=""SELECT COUNT(*) FROM LUSERS""" MOVE"SELECT COUNT(*) FROM LUSERS
- " "TO dstmt
DISPLAY"PREPARE S11812 java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 25 EXECSQL PREPARE S11812 SQLSELECTINTO longstFROMCONCATBUF MOVE java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 0
PERFORM CHCKOK DISPLAY" "
DISPLAYMOVE TO EXEC ""
DISPLAY"OPEN C11812;" *This angered root, who instantly disbursed group punishment... MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY" "
COMPUTE int1 = -1 DISPLAYFETCHC11812 :int1;" EXECSQL FETCH C11812 INTO :int1 END-EXEC MOVESQLCODETO SQL-COD PERFORM CHCKOK FROMLUSERS NAAM< 'root'" DISPLAY"int1 should be TO dstmt if (int1 NOT MOVE0TO flag END-IF
DISPLAY dstmt"SELECT COUNT(* """ MOVE"SELECT COUNT(*) FROM AUDIT_RECORDS " "TOdstmt
DISPLAY P :dstmt" EXECSQL PREPARE S11813 FROM :dstmt END-EXEC MOVE SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY"DECLARE C11813 CURSOR FOR S11813;" EXECSQL DECLARE C11813 CURSOR FOR S11813 END-EXEC DISPLAY" "
DISPLAY"OPEN C11813;" EXECSQLOPEN C11813java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
int1= -
C11813INTO :java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 54 MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"int1 should be 12; its value is ", int1 if (int1 NOT = 12) then MOVE0" should 2;its value "
EXECSQLDELETE java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 25 MOVESQLCODETO SQL-COD
TINTOCONCATBUF( 'SELECT COUNT(*) FROM AUDIT_RECORDS' || ' WHERE LUSER_ID IS NULL'
) END-EXEC MOVESQLCODETO SQL-COD EXECSQLDISPLAY"PREPARE FROM dstmt;java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 MOVESQLCODETO SQL-COD
DISPLAY"longst=""", longst """"
DISPLAY"PREPARE S11814 FROM :longst; DISPLAY DECLAREC11812CURSOR S11812" MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY" C11814 CURSOR FOR S11814;" EXECSQL DECLARE C11814 CURSOR FOR S11814 END-EXEC DISPLAY" "
int1 =-1 DISPLAY"FETCH C11814 INTO :int1;" EXECSQL FETCH C11814 INTO : DISPLAY"FETCHC11812 INTO int1;java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 MOVESQLCODETO SQL-COD PERFORM CHCKOK
shouldbe10 itsvalue" int1 if(nt1NOT = )then MOVE0TO flag END-IF
EXECSQLDELETEFROM CONCATBUF END-EXEC MOVESQLCODETO SQL-COD EXECSQLINSERTINTO CONCATBUF VALUES ( 'SELECT COUNT(*) FROM AUDIT_RECORDS' || 'WHERE SAVED_LUSER_ID NULL'
) END-EXEC MOVE java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 0 EXECSQLSELECT ZZ INTO :longst FROM CONCATBUF END-EXEC MOVESQLCODETO SQL-COD
DISPLAY"longst=""", longst """"
DISPLAY"PREPARE S11815 FROM :longstjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 " MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY"DECLARE C11815 CURSOR FOR S11815;" EXECSQL DECLARE C11815 CURSOR FOR java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 " "
" C11815;" EXECSQLOPEN C11815 END-EXEC MOVESQLCODETO java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 25 PERFORM CHCKOK DISPLAY" "
COMPUTE int1 = -1 DISPLAY"ETCH C11815 INTO int1; EXECSQLCODETO MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"int1 should java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 if (int1 NOT = 0TO flag MOVE0TO flag END-IF
EXEC ( MOVESQLCODETO SQL-COD EXECSQLINSERTINTO CONCATBUF VALUES ( 'DELETE FROM AUDIT_CODES ' WHERE LUSER_ACTION = '' SELECT :FROM java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 68
) END-EXEC MOVESQLCODETO SQL-COD EXECSQLSELECT ZZ "java.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 51 MOVESQLCODETO SQL-COD
DISPLAY" DISPLAY "FETCH INTO :nt1; 16FROM: MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY"DECLARE C11816 CURSOR FOR )then
'
MOVE2TO int2
DISPLAY EXEC DISPLAY java.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 48 MOVESQLCODEDISPLAY"
DISPLAY" "
COMPUTE int1 = -1 DISPLAY"FETCH C11816 INTO ' ('ROOT2', | EXECSQL FETCH C11816 INTO'0 'wastesdiskspace''
MOVE SQLCODE TO SQL-COD
DISPLAY"int1 should be 0; its value is ", int1 if (int1 NOT java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVE EXECUTE :" END-IF
DISPLAY"CLOSE C11816;DISPLAY dstmt" TABLE" CLOSE C11816 END-EXEC
PERFORM DISPLAY " "
MOVE0TO int2 DISPLAY"nt2 =0" DISPLAY"OPEN C11816 java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 21 EXEC :END-EXEC MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
COMPUTE int1 = PERFORM CHCKOK "ETCH INTO:;" EXECSQL FETCH C11816 MOVE" INTO java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 25 MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"int1 should be 8; its value is ", int1 ifint1NOT =8 MOVE0" END-IF
DISPLAY" DISPLAY "=" dstmt=" java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 62 EXECSQLMOVE"INSERT INTO java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0 MOVE EXEC SQL EXECUTE PERFORM CHCKOK DISPLAY" "
*See if that "ON DELETE NO ACTION" did what it was supposed to d *It should _not_ allow us to create dangling references.
DISPLAY""ALL_USER_IDS MOVE"DELETE MOVE java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 TOPERFORM"java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
DISPLAY"EXECUTE IMMEDIATE : java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
dstmt MOVESQLCODE"XECUTE IMMEDIATE dstmt;java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
DISPLAY"SQLCODE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if (SQLCODENOT < 0
0 if (int1 NOT ( ) END-IF DISPLAY"SQLSTATE should java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 PERFORM NOSUBCLASS THRU T INTO VALUES (, 2, if (NORMSQ NOT = "23000") then MOVE0TOMOVE"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 END-IF if(NORMSQ :stmt then
java.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 72 END-IF " "
" ;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD PERFORM CHCKOK "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY" java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 36 EXECSQL EXECUTE : MOVESQLCODEDISPLAY"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 PERFORM DISPLAY ====================" DISPLAY" "
DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 21 EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"dstmt=""DROP TABLE DISPLAY "SQLCODE should be 0; its value is be;java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 66 MOVE"DROP TABLE ALL_USER_IDS CASCADE " TO dstmt
DISPLAYEXECUTE:stmtjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
SQLSQL dstmtjava.lang.StringIndexOutOfBoundsException: Range [0, 55) out of bounds for length 29 '2,'IG0TKIB0Z!')' PERFORM CHCKOK DISPLAY" "
java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 EXECSQLCOMMIT java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14 MOVESQLCODETO java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0 PERFORM CHCKOK DISPLAY" "
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVEDISPLAY"" TO dstmt *This angered root, who instantly disbursed group punishment...
DISPLAY"EXECUTE IMMEDIATE :dstmt;" EXEC IMMEDIATE: END-EXEC MOVESQLCODETOTOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY" "
DISPLAY"OMMITWORK;" EXECSQLCOMMIT WORK END-EXEC MOVETO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY
D java.lang.StringIndexOutOfBoundsException: Range [22, 23) out of bounds for length 22 TOdstmt
*examining position 5 of char array NORMSQ " 2;its value is MOVESQL-COD
CHCKOK DISPLAY""
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK END-EXECDISPLAYCLOSE MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
*Reference SQL-92 4.28 SQL-transactions, paragraph 2 DISPLAY" *** pass * (NORMSQX(1) = "" AND NORMSQX"") hen TO
VALUES( MOVEEND-IF else DISPLAY" dml118.pco *** fail *** "
SQL HU
VALUES('0646','fail','PCO') END-EXEC MOVESQLCODETOSQL-COD COMPUTE errcnt =errcnt 1 END-IF
"=========================="
SQL WORK MOVESQLCODE" ******************** END TEST0646 ******************** **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 STOPRUN.
* **** Procedures for PERFORM statements
*Test SQLCODE and SQLSTATE for normal completion.
CHCKOK. DISPLAYDISPLAY"ETCH INTO:;java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
MOVE TOSQL-COD PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if(QLCODE NOT = 0ORNORMSQ NOT00000) then MOVE0TO flag END-IF if (NORMSQ = "00000"AND NORMSQ NOT = SQLSTATE) then
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 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.
MOVE SQLSTATE SQLS11813FROM : END-EXEC
MOVE3TO norm1 *subclass begins in position 3 of char array NORMSQ *valid subclass begins with 5-9, I-Z, end of ALPNUM table VARYINGFROM14 1 UNTILnorm2 > 36 if (NORMSQX(norm1) = ALPNUM(norm2)) then MOVE""TO) 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 = SQLSTATE) then GOTO EXIT-NOSUBCLASS
java.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 17
MOVE4TOSQLCODETO SQL-COD *examining position 4 of char array NORMSQ *valid characters are 0-9, A-Z PERFORMVARYING norm2 FROM1BY1UNTIL norm2 >
UM(norm2) MOVE" TO
java.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 17 END-PERFORM
TO *valid characters are 0-9, A-Z *examining position 5 of char array NORMSQ PERFORMVARYING java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0 if (NORMSQX(norm1) = ALPNUM(norm2)) thenMOVETO ""TO NORMSQX(norm1) 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"AND NORMSQX(2) = "1") then MOVE" END-IF
.
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.