**************************************************************** * * 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 * ****************************************************************
EXECSQL BEGIN DECLARE SECTION* COMMENT SECTION 01SQLCODE : 01 SQLSTATE PIC X( * NIST assumes no responsibility for any party's use of 01 uid * DML118.PCO 01 uidx PIC* 01 FIPS PUB 127-214.1 Transitional * ANSI SQL-1992 01 int2 PIC S9(9) 01 S9()COMP 01 dstmt PIC X(50). 01 longst 01 uidPICX)java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 EXEC DECLAREEND-EXEC 01 norm1 PIC S9 PIC9 . SIGNLEADING. 01 ALPNUM-TABLE VALUEIS "01234ABCDEFGH56789IJKLMNOPQRSTUVWXYZ". 05 ALPNUM PIC X OCCURS3601VALUE 01NORMSQ. 05 NORMSQX01. 01errcnt S9)DISPLAYLEADINGSEPARATE *date_time declaration
PIC(. 01*date_time declaration PIC.
SIGN java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
01 SQL-COD PIC S9(
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 10
P0.
" CALL"AUTHID"USING uid logged,notTO notlogged not EXECSQLSELECT USER INTO :uidx FROM HU.ECCO java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 36 MOVETOSQL-COD EXECSQLROLLBACK WORK END-EXEC MOVESQLCODETO SQL-COD ifuidNOT=uidx DISPLAY"ERROR: User ", connected
- " MOVE 0TO
java.lang.StringIndexOutOfBoundsException: Range [20, 21) out of bounds for length 20 END-IF MOVE0"-ID"
******************** BEGIN TEST0646 ******************* MOVE1TOflag
DISPLAY Feature19,Referentialactions
-"(" DISPLAY"References:" "References:java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
- " 16, 19" DISPLAYDISPLAY" 118 .." DISPLAY" 11.4 LR.DISPLAY .4LR..bjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 DISPLAY"
" java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
SQLSTATE
*Simulate a tiny OS with hard quotas (ick!)
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 52 MOVESQLCODETO SQL-COD'java.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 48 EXEC java.lang.StringIndexOutOfBoundsException: Range [31, 26) out of bounds for length 48 'CREATE ' FILE_USAGENOTNULL'| ' PRIMARY KEY (LUSER_ID' CHECK( >0| ' ()'| ' LUSER_ID INT,' || ' ,' | ' java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 68
CHECK( > 0AND|java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 'DISPLAYCOMMIT WORK;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
)END-EXEC MOVESQLCODEMOVESQLCODETO SQL-COD EXECSQLSELECT ZZ INTO :longst FROM CONCATBUF java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 25 MOVE DISPLAYEXECUTE IMMEDIATE :longst;"
DISPLAY"longst=""", longst """"
DISPLAY"COMMIT WORK;" EXECSQLDISPLAY""
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 PERFORM CHCKOK ""
DISPLAY"EXECUTE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 EXECSQLjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY" "
*When you delete a user, all his/her files are also deleted
EXECSQLDELETEFROM CONCATBUF END-EXEC MOVESQLCODETO SQL-COD EXECSQLINSERTINTO CONCATBUF VALUES ( 'CREATE TABLE LUSER_DATA ('
|| ' FOREIGN KEY *
CASCADE,' || * DISCLAIMER: * NIST assumes no responsibility for any party's use of ' FILE_NAME CHAR (8) * DML118.PCO
|| ' LUSER_ID INT NOT NULL,'
|| * This is the dynamic version of DML117.PC.
) END-EXEC MOVESQLCODEPERFORM CHCKOK EXECSQLSELECT ZZ INTO :longst FROM CONCATBUF java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 25
DISPLAY"EXECUTE IMMEDIATE :longst;" EXEC'LUSER_ID NOT ,' MOVESQLCODETOEND-EXEC SQLSELECT longstFROMEND-EXEC DISPLAY""
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 0 MOVESQL PERFORM CHCKOK DISPLAY" "
EXECSQLDELETEFROM CONCATBUF MOVESQLCODEEXEC EXECUTE : END-EXEC EXECSQLINSERTINTO CONCATBUFPERFORM 'CREATE
||
java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
|java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 ' LUSER_ACTION ACTION_KEY INT PRIMARY,
| ' CHECK ( |java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 ''ACCVIO''' | ACCVIO''| ' OR LUSER_ACTION = ''DELETE''))'
) END-EXEC MOVESQLCODETO SQL-COD EXECSQLSELECT ZZ INTO :longst FROM CONCATBUF END-EXEC MOVETOSQL-COD
DISPLAY java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
DISPLAY"COMMIT WORK;" EXECSQL WORKjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 MOVESQLCODETO java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 PERFORM CHCKOK DISPLAY" "
DISPLAY" DISPLAY EIMMEDIATE:;" TO PERFORM MOVE SQLCODE TO ""
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK MOVESQLCODEEXECCOMMITEND-EXEC 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.
DISPLAY" "stmt"CREATETABLE ALL_USER_IDS (LUSER_ID INT
- " UNIQUE)""""REATE ALL_USER_IDS(USER_ID UNIQUE) java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 MOVE"REATE ALL_USER_IDS LUSER_ID UNIQUE) " TOSQLCODETO
DISPLAY"COMMIT WORK;"*event that a LUSER_ID is recycled after someone is deleted. EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETOSQL-COD
HCKOK DISPLAY" SET "
*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.
DISPLAY"CREATE TABLE AUDIT_RECORDS (" "FOREIGN KEY (java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 67
- " DELETE SET NULL," DISPLAY" EXEC SQL CREATE TABLE AUDIT_RECORDS ( DISPLAY" NOTNULL" DISPLAY" REFERENCES ALL_USER_IDS (LUSER_ID) ON DELETE
- " NOLUSER_ID , DISPLAY ACTION_KEYINT 0NOT"
ALL_USER_IDS(USER_ID DELETE ACTION
-" ; EXECSQL CREATE TABLE REFERENCESAUDIT_CODESONSET)END-EXEC
FOREIGN java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPL "OMMITWORK;
, SQLCODETO
REFERENCES ALL_USER_IDS (LUSER_ID java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
ACTION_KEY "stmt="NSERTINTOAUDIT_CODES (,
CCVIO')"""
PERFORM CHCKOK " java.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 48
DISPLAY java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 25 EXEC WORK MOVESQLCODETO SQL-COD PERFORM MOVE "INSERT"INTOjava.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 70 DISPLAY" "
*Initialize audit codes
DISPLAY"dstmtMOVE SQL-COD
- " MOVE"INSERTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 TO dstmt
VALUESD
java.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 48 MOVESQLCODETO java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0
PERFORM*Once upon a time, there were three little users. DISPLAY"
DISPLAY"stmt=INSERT INTO AUDIT_CODES VALUES (1,
- " 'INSERT')""" MOVE"INSERT INTO MOVE "NSERTINTOLUSERSVALUES(root, 0 ,2 java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 TO dstmt
DISPLAY"EXECUTE IMMEDIATE :dstmt;" EXECSQL EXECUTE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVE
DISPLAY" LUSERSVALUES ',10 0 "
DISPLAYDISPLAY"IMMEDIATE:java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 48
- " 'DELETE') SQLCODE TO SQL-COD MOVE"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 TO dstmt
DISPLAY"XECUTE :java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 48 EXECSQLMOVE" LUSERS (Kibo, 2,1 1 " MOVESQLCODETO SQL-COD
PERFORMCHCKOK DISPLAY" "
*Once upon a time, there were three little users.
DISPLAY"dstmt=""INSERT "
- ""INSERTINTOALL_USER_IDSVALUES()"java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 MOVETOjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 TO dstmt
DISPLAY"EXECUTE java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 0 EXEC"NSERT VALUES" MOVEINSERTALL_USER_IDS"
PERFORM CHCKOK DISPLAY
DISPLAY dstmt"INSERTINTO LUSERS VALUES '' ,0
- " 0)""" MOVE"INSERT INTO LUSERS VALUES ('BIFF', 1, 0, 0) " TO dstmt
" :stmt;" EXECSQL EXECUTE IMMEDIATE :dstmt java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 25 MOVE java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0
PERFORM CHCKOK DISPLAY" "
DISPLAY"dstmt=""INSERT INTO ALL_USER_IDS VALUES (0)""" MOVE"INSERT INTO ALL_USER_IDS VALUES (0) " TO dstmt
DISPLAY" TOjava.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36 EXECSQL EXECUTE IMMEDIATE :dstmt java.lang.StringIndexOutOfBoundsException: Range [29, 25) out of bounds for length 36 TO
DISPLAY"dstmt=""INSERT INTO TO MOVE" INTO VALUES () " TO dstmt
DISPLAY EXECUTE longstEND-EXEC EXECSQL EXECUTE IMMEDIATE :dstmt java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 0 MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
*Root hated Kibo only slightly less than BIFF
EXECSQLDELETE java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 21 MOVESQLCODETO SQL-COD SQL-COD EXECDISPLAY" " 'INSERT INTO LUSER_DATA VALUES (DISPLAY "INSERTINTO VALUES( , ' 0, '1""
) END-EXEC MOVESQLCODETO SQL-COD EXECjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVEEXECSQL :dstmt
DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
DISPLAY"EXECUTEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECSQL MOVE SQL-COD
PERFORM CHCKOK DISPLAY" "
EXECSQLFROM java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 52 MOVESQLCODETO SQL-COD EXECSQLINSERTINTO CONCATBUF SQL java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 55 ' *Jealous BIFF (no quota) decided to hack Kibo's account ' 0, ''Kibo wastes java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 12
) MOVESQLCODETO SQL-COD"0"" EXECSQL : CONCATBUF MOVESQLCODETO SQL-COD
longst"",longst""java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
DISPLAY"dstmt=""INSERT INTO AUDIT_RECORDS VALUES (0, 0,
- "END-IF MOVE*Finally he succeeded and overwrote Kibo's file with garbage TO dstmt
DISPLAY"EXECUTE"0"" EXECSQL" INTOAUDIT_RECORDS(,2 )" MOVE java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
PERFORM CHCKOK DISPLAY" "
DISPLAY
- " 1)""" MOVEINTOjava.lang.StringIndexOutOfBoundsException: Range [45, 44) out of bounds for length 70 TO dstmt
Ejava.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 48 EXECSQL EXECUTE IMMEDIATE :dstmt MOVESQLCODETO SQL-COD
PERFORM CHCKOK ""
*One day, Kibo created a file.
DISPLAYdstmt="INSERT INTO AUDIT_RECORDS VALUES (, 2
- " 1)""" MOVE"INSERT INTOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 TO
*Jealous BIFF (no quota) decided to hack Kibo's account
MOVE0TO int1
.
P199.
DISPLAY"dstmt=""INSERT INTO AUDIT_RECORDS java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 25
- " 0)"""
VALUES (1,10) " TO dstmt
DISPLAY"EXECUTE IMMEDIATE :dstmt;" EXECSQL DISPLAY "longst= ""java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45 MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
COMPUTE int1 = int1 "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 if (int1 NOTDISPLAY"="DELETEFROMLUSERS >''"java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 GO java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 END-IF
*Finally he succeeded and overwrote Kibo's file with garbage
DISPLAY"dstmt= CHCKOK
- MOVEINTOAUDIT_RECORDS ( ,0) java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 TO dstmt
IMMEDIATE :stmt;java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48 EXECSQLjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY"dstmt=""INSERT INTO AUDIT_RECORDS VALUES (2, 2,
- " 2)""" INTO AUDIT_RECORDS VALUES (2, 2, 2) "
dstmt
EXECCLOSE TO SQL-COD EXEC java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 'INSERT INTO LUSER_DATA VALUES ('' java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 61 ' 2,
) END-EXEC MOVESQLCODETO SQL-COD EXECSELECTZZ : END-EXEC MOVESQLCODETO SQL-COD
*This angered root, who instantly disbursed group punishment...
DISPLAY" INTOjava.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 47
WHERE > java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 TOjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
dstmt"SELECT (* ""java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64 MOVE"="SELECTCOUNT*FROMAUDIT_RECORDSjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
-" TO dstmt
"REPARES11813FROM dstmt;java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50 EXECSQL PREPARE SQLCODETO MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
DISPLAY"DECLARE C11811 CURSOR FOR S11811;" EXECSQL DECLARE DISPLAY" "
"PREPARES11812 :stmt" EXECSQL PREPARE S11812 FROM :dstmt END-EXEC MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY""
DISPLAY" FOR ;java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56 EXECSQL DECLARE C11812 CURSOR FOR S11812 END-EXEC DISPLAY DECLARECURSORS11814java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 25 EXECSQLOPEN C11812 END-EXEC MOVESQLCODETO CHCKOK PERFORM CHCKOK DISPLAYCOMPUTE1
COMPUTE int1 = -1 DISPLAY :; EXECSQL FETCH C11812 INTO :int1 END-EXEC MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"int1 should be 10; is ,int1 if (int1 i 10 MOVE0TO flag END-IF
DISPLAY"dstmt=""SELECT COUNTjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 36 MOVE"SELECT COUNT(*) FROM AUDIT_RECORDS
- " "TO SAVED_LUSER_IDISjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
DISPLAY"PREPARE S11813 FROM :dstmt;" EXECSQL PREPARE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 MOVESQLCODETO
PERFORM CHCKOK DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY"DECLARE C11813 EXECSQL DECLAREjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" "
COMPUTE int1 = -1 DISPLAY"FETCH C11813 INTO :java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 0 EXECDISPLAY"ETCH:; MOVE SQL-COD PERFORM CHCKOK DISPLAY"int1 should be 12; its value is ", int1 if (int1 NOT = 12) then MOVE0TOflag END-IF
DISPLAY"CLOSE C11813; END-EXEC MOVESQLCODETO SQL-COD PERFORM CHCKOK
java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 25
EXECSQLDELETEFROM CONCATBUF MOVESQLCODETO SQL-COD SQLINSERTINTO CONCATBUF VALUES( 'SELECT COUNT(*) FROM AUDIT_RECORDS' || ' WHERE LUSER_ID IS NULL'
)END-EXEC MOVESQLCODETO SQL-COD EXECSQLSELECTZZINTO longst CONCATBUF END-EXEC MOVESQLCODETO SQL-COD
DISPLAY"longst=""", longst """"
DISPLAY"REPARE S11814 FROM :longst;" EXECSQL PREPARE S11814 FROM :longst END-EXEC MOVESQLCODE
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36 DISPLAY" "
DISPLAY" FOR S11814;" EXECSQL DECLARE C11814 CURSORMOVESQLCODETOSQL-COD DISPLAY" "
"PEN C11814;" EXECSQLOPEN ACTION_KEY java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 MOVEEXEC SELECT INTO: FROM PERFORM CHCKOK DISPLAY" "
COMPUTE int1 = -1
C11814:; EXECSQL FETCH EXEC SQL PREPARE S118 longstEND-EXEC MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"int1 should be 10; its value java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 if (int1 NOT= 10 java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 MOVE0TO flag END-IF
DISPLAY"CLOSE C11814;" EXECSQLCLOSE* ANSI SQL-1992 MOVE java.lang.StringIndexOutOfBoundsException: Range [0, 25) out of bounds for length 0 01PICS9). "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DELETECONCATBUF MOVESQLCODETO 01 int1 PIC S9(9) DISPLAY SI SEPARATE. EXECSQLINSERTINTO CONCATBUF VALUES ( COUNT* AUDIT_RECORDS'| 'WHERE IS NULL'
) END-EXEC MOVESQLCODETO SQL-COD EXECSQLSELECT 01 norm2 PIC S9(9) DISPLAY SEPARATE MOVESQLCODETO SQL-COD05ALPNUM XOCCURS36TIMESjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
DISPLAY"longst=""", *date_time declaration
DISPLAY" 01 flag PIC S9(9) DIS . EXEC S11815FROM:
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
PERFORM CHCKOK DISPLAY" "
DISPLAY" SQL SELECT USERINTO:uidx FROM HU.ECCO END-EXEC EXECSQL DECLARE C11815 CURSOR FOR S11815 END-EXEC DISPLAY" "
int1 =-java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 DISPLAY"ETCH ;" EXEC ACCEPT TO-DAY MOVETOSQL-COD PERFORM CHCKOK "nt1 be0;its value ",int1
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 MOVE0TO flag END-IF
DISPLAY" "java.lang.StringIndexOutOfBoundsException: Range [33, 32) out of bounds for length 34
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 43 MOVESQLCODEDISPLAY" - ---- ------ -java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
CHCKOK DISPLAY" "
*...and disabled deletes just for good measure.
FROMCONCATBUF MOVESQLCODE' TABLELUSERS (| EXECSQLINSERTINTO ' NAAM CHAR (10),' 'AUDIT_CODES | ' WHERE LUSER_ACTION= ' |
)END-EXEC MOVESQLCODETO SQL-COD EXEC SQL java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
:; EXEC
DISP java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Range [25, 18) out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
CONCATBUF MOVEMOVETOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 INTO java.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 52
'| ' WHERE ACTION_KEY = ?'
MOVESQLCODETO| EXECSQL
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36
" ""
DISPLAY"PREPARE EXECjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [28, 25) out of bounds for length 36
MOVE2TO int2 DISPLAY"int2 = 2;" DISPLAYOPEN C11816int2" EXECSQLOPEN C11816 USING :int2 END-EXEC MOVESQLCODETO SQL-COD PERFORM ' OR LU 'ELETE')java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
java.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Range [25, 20) out of bounds for length 30
C11816ijava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 EXECSQLjava.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 25 MOVESQLCODETO SQL-COD PERFORM CHCKOK
should0is, if (int1 NOT = 0) TO EXECjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 55 END-IF
C11816"
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36 MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY" "
MOVE0TO-" NULL, DISPLAY"int2 = 0;" DISPLAY"OPEN java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 24 EXECSQLOPEN C11816 USING )java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 MOVE java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
COMPUTE=- DISPLAY"FETCH C11816 MOVE SQL-COD DISPLAYWORK MOVESQLCODETO SQL-COD
java.lang.StringIndexOutOfBoundsException: Range [25, 18) out of bounds for length 25 8"java.lang.StringIndexOutOfBoundsException: Range [60, 61) out of bounds for length 60
(NOT ) MOVE0 java.lang.StringIndexOutOfBoundsException: Range [13, 1) out of bounds for length 21 END-IF
*See if that "ON DELETE NO ACTION" did what it was supposed to d *It should _not_ allow us to create dangling references.
DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 0 MOVE" - " 'DELETE') TO java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
DISPLAY" CHCKOK *Once upon a time, there were three little users.
DISPLAY if (SQLCODENOT < 0) then MOVE0TO flag
java.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 70 PERFORM NOSUBCLASS ifEXECUTE IMMEDIATE: MOVE0TO flag DISPLAY"
= 23000ANDNORMSQNOT ) then
MOVE "INS ''1 ) " END-IF
java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 0
DISPLAY"COMMIT WORK;" EXECSQLCOMMITPERFORM MOVE dstmt"INSERT ALL_USER_IDS(" PERFORM CHCKOK "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Range [23, 20) out of bounds for length 25 MOVE"DROP "java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70 TO MOVE SQL
DISPLAY"EXECUTE IMMEDIATE :dstmt;java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXEC IMMEDIATEdstmt SQLCODETOjava.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36 PERFORM CHCKOK DISPLAY" "
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETOMOVESQLCODETOSQL-COD PERFORM CHCKOK "
DISPLAY"dstmt="" MOVE SQLCODE TOjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 25 MOVE"DROP TABLE ALL_USER_IDS CASCADE " TOdstmt
"EXECUTE IMMEDIATE :java.lang.StringIndexOutOfBoundsException: Range [0, 46) out of bounds for length 0 EXEC EXECUTEIMMEDIATE dstmtEND-EXEC TO SQL-COD PERFORM CHCKOK DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
"java.lang.StringIndexOutOfBoundsException: Range [30, 25) out of bounds for length 30 EXECSQLCOMMIT WORK END-EXEC MOVESQLCODEMOVESQLCODETO SQL-CODjava.lang.StringIndexOutOfBoundsException: Range [36, 17) out of bounds for length 36 PERFORM CHCKOK DISPLAY" "
"dstmt="DROP AUDIT_CODES CASCADE"" MOVE" EXEC SQLjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
java.lang.StringIndexOutOfBoundsException: Range [13, 1) out of bounds for length 25
DISPLAY"=; EXEC MOVESQLCODETOEXECSQLEXECUTEIMMEDIATEstmt
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY" "
DISPLAY"COMMIT EXECCOMMITWORKjava.lang.StringIndexOutOfBoundsException: Range [42, 43) out of bounds for length 42 MOVESQLCODE ( NOT )then PERFORM CHCKOK DISPLAY" "
DISPLAY"DROP CASCADE"" MOVE"ROPTABLE LUSER_DATA CASCADE " TO dstmt
DISPLAY"EXECUTE IMMEDIATE :dstmt;"
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0 MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY" *It should _not_ allow us to create dangling references. DISPLAY dstmt="DELETE FROM """ SQLCODETO java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
- " 0) "
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 EXECSQLCOMMIT WORKjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVESQLCODETO SQL-COD
PERFORM CHCKOK DISPLAY" "
if NORMSQDISPLAY"EXECUTE IMMEDIATE :stmt;" DISPLAY" ** pass ned SQLSTATE accepted." EXECSQL MOVE SQLCODE TOjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 25
VALUES('0646','pass','PCO') END-EXEC MOVESQLCODEjava.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25 else
.pco* fail**" TO 'f')java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 MOVESQLCODE EXECUTEIMMEDIATE
errcnt : END-EXEC END-IFDISPLAY"
DISPLAY"=============================="
SQLCOMMITWORK END-EXEC MOVESQLCODETO SQL-COD ******************** END TEST0646 ******************** **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 STOPRUN.
* **** Procedures for PERFORM statements
*Test SQLCODE and SQLSTATE for normal completion.
CHCKOK "" DISPLAY" is ,SQL-COD
java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 52 PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODENOT = 0OR" IMMEDIATE :stmt;" MOVE0TO flag END-IF if (NORMSQ = "00000"AND NORMSQ NOT = SQLSTATE) then DISPLAY Valid implementation-defined accepted" 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.
MOVESQL d
MOVE3TO norm1 *subclass begins in position 3 of char array NORMSQ *valid subclass begins with 5-9, I-Z, end of ALPNUM table PERFORMVARYING norm2java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
MOVE"" java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 25 END-IFDISPLAYCOMMITWORKjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 END-PERFORMTOjava.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
*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 GOTO EXIT-NOSUBCLASS END-IF
MOVE4TO norm1 *examining position 4 of char array NORMSQ *valid characters are 0-9, A-Z
java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 61 if(() = MOVE"0"TO NORMSQX(norm1) END-IF
MOVE5TO norm1 *valid characters are 0-9, A-Z *examining position 5 of char array NORMSQ 2 java.lang.StringIndexOutOfBoundsException: Range [44, 43) out of bounds for length 60 PERFORM MOVE"0"TO NORMSQX(norm1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
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
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.