IDENTIFICATION* X/Open SQL VALIDATION TEST SUITE V6.0 * WRITTEN BY: E. Pratt ENVIRONMENTDIVISION* CONFIGURATION PROGRAM-ID. XOP719.PROGRAM-ID. * SECTION 5.3.9
Xjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 DATADIVISION.
* conformance to theSQL .
* Embedded SQL COBOL (file "XOP719.PCO")
* Copyright 1994, 1995 X/Open Company Limited
* All rights reserved. *Log on as user XOPEN2 * DISCLAIMER: * This program was reviewed by employees of NIST for * conformance to the SQL standards. * NIST assumes no responsibility for any party's use of * this program.
* X/Open and the 'X' symbol are registered trademarks of X/Open Company * Limited in the UK and other countries.
**************************************************************** * * COMMENT SECTION * END-IF * X/Open SQL VALIDATION TEST SUITE V6.0 * * XOP719.PCO &='color:green'> * WRITTEN BY: E. Pratt * * GRANT ALL with optional PRIVILEGES omitted. * * REFERENCES * X/Open CAE SQL * SECTION 5.3.9 * * <embedded SQL C program> * * DATE PROGRAM LAST CHANGED 1/11/94 * ****************************************************************
*Must be run under authorization identifier XOPEN2
*This test program must be run before xop720.pco, *xop721.pco, xop722.pco, xop723.pco
java.lang.StringIndexOutOfBoundsException: Range [20, 18) out of bounds for length 70 01java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 34 01DISPLAY GRANTALLON PIC)
01 HCV X. 01 ch1 PIC X(2). 01"*. TO ;java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 01 uidx PIC DISPLAY "** ALLON . XOPEN3java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59 EXEC
01 errcntjava.lang.StringIndexOutOfBoundsException: Range [0, 13) out of bounds for length 0 *date_time declaration 01 TO-DAY PIC9(01norm2 java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 29 PIC Ajava.lang.StringIndexOutOfBoundsException: Range [51, 49) out of bounds for length 51
*variables for nosubclass routine
01 SQLS2SQLSTORE PIC S99) DISPLAYSIGN java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 42 01flag (4 SIGN. 01 ALPNUM VALUEISjava.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 "01234ABCDEFGH56789IJKLMNOPQRSTUVWXYZ". 05PICX . 01 SQLSTORE PIC X(5). 01 SQLS2 REDEFINES SQLSTORE INSERTINTO XOPEN1AAAVALUES('AG''AH''I) 05 NORMSQ PICMOVESQLCODETO SQL-COD
(.
01 SQL-COD PIC S9(9) DISPLAYSIGNLEADINGSEPARATE.
PROCEDURE EXEC SQL INSE. '' BH,BI)
P0.
*Log on as user XOPEN2 MOVEX"TOuid CALL"AUTHID BBB (','''L) MOVE"not SQLCODE java.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36 SQLSELECTUSER : XOPEN1ECCOEND-EXEC MOVESQLCODETO SQL-COD ifuidNOT = uidx) then "RROR:User "uid"expected User ,uidxjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
STOPRUN END-IF MOVE0TO errcnt "/PEN SQL Test Suite,V6. Embedded
- "COBOL, xop719.pco" DISPLAY "59-byte SQLCODE SQL-COD DISPLAY"TEd Version #" *date_time print "===============" ACCEPT THE-TIME *Grantor holds all privileges, but has grant option *only for SELECT and CREATE
Drun THE-TIME
VE ""TOHCV
******************** BEGIN TEST0719 *******************
DISPLAY" TEST0719 " DISPLAY" (NORMSQ2 = 00000"0 DISPLAY / DISPLAY"====================" DISPLAY"*** GRANT ALL ON XOPEN1. *Grantor holds SELECT, INSERT, DELETE with GRANT OPTION, DISPLAY"*** GRANT OPTION;"
** GRANTXOPEN1BBB " DISPLAY"*** SELECT B2 INTO : SQLCODE PERFORM
( NOT="0000"ORSQLCODENOT ) DISPLAYDISPLAY ** found(ESTSTEPNUMBER2 * java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
*GRANT ALL with optional PRIVILEGES omitted, grantor
MOVE0TO errflg MOVE1TO flag
*Clear the tables first EXECSQLDELETE .AAA END-EXEC SQLCODE SQL-COD EXECSQL *Grantor holds SELECT, INSERT, DELETEwith GRANT OPTION,MOVE""TO
SQL INTOch1 EXECSQLWHEREB1=BD MOVESQLCODEMOVETO SQL-COD SQL WORKjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42 MOVESQLCODETO SQL-COD
*Load data into the working database tables EXECSQLINSERTINTO XOPEN1.AAA VALUES('AA', 'AB', 'AC') END-EXEC SQLCODETOSQL-COD EXECSQL if (NORMSQ2 NOT "" ch1 NOT ="BE")then END-EXEC MOVESQLCODETO SQL-COD EXEC WORK END-EXEC MOVESQLCODETO SQL-COD EXECINTOXOPEN1. '''AK' AL END-EXEC MOVESQLCODETO SQL-COD EXECSQLINSERTMOVE"x"TO END-EXEC MOVESQLCODETO SQL-COD EXECSQLINSERT XOPEN1. VALUESBD BE BF) END-EXEC MOVESQLCODETO SQL-COD INSERTINTO XOPEN1.BB('' BH,''java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69 END-EXEC MOVESQLCODETO SQL-COD EXECINSERTINTOXOPEN1.BB (BJ, '' BL) END-EXEC MOVESQLCODETO SQL-COD EXECSQLINSERTINTO XOPEN1CCC VALUES('CA','CB''CC') END-EXEC MOVESQLCODETO SQL-COD EXECSQLINSERT XOPEN1CCCVALUES(CD,', CF) END-EXEC MOVESQLCODE SQL-COD EXECSQLINSERTINTO XOPEN1.CCC VALUES('CG', 'CH', 'CI') END-EXEC MOVESQLCODETO SQL-COD EXECSQLINSERTINTO XOPEN1.CCC VALUES('CJ','CK','CL') END-EXEC MOVESQLCODETO SQL-COD EXEC
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
if java.lang.StringIndexOutOfBoundsException: Range [23, 24) out of bounds for length 0 TO SQL-COD
DISPLAY"============================================== END-IF *Grantor holds all privileges, but has grant option *only for SELECT and CREATE MOVE"x"TO SQLSTATE EXECSQLMOVE1TO
GRANT OPTION END-EXEC
VE SQLCODETO SQL-COD PERFORM CHCKOK if*SQLSTATE values of 00000. if((1 = 0'(2)= 1)then END-IF END-IF
EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD DISPLAY"======java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0 *Grantor holds SELECT, INSERT, DELETE with GRANT OPTION,r:red'>test case; otherwise the test will DISPLAY"*** Problem found'color:red'>EXECSQL GRANT DISPLAY" should be 00000; its value is " SQLSTATE
java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 36 PERFORM CHCKOK NOT = "0000 OR SQLCODE NOT = 0) then DISPLAY"*** Problem found (TEST STEP NUMBER 2) ! *** "
= + 1 END-IF EXEC java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 19 TO SQL-COD
DISPLAY"=== *Grantor holds SELECT, INSERT, DELETE with GRANT OPTION, MOVE"x"TO SQLSTATE MOVE" "TO ch1 *CREATE VIEW XOPEN2V AS SELECT B1, B2, B3 FROM XOPEN1.BBB EXECSQLSELECT B2 INTO :ch1 FROM XOPEN2V WHERE B1 = 'BD'END-EXEC MOVESQLCODETO SQL-COD DISPLAY"SQLSTATE should be 00000, it is ", SQLSTATE DISPLAY"ch1 should be BE, it is ", ch1 PERFORM NOSUBCLASS THROUGH P213. if (NORMSQ2 NOT = "00000"OR ch1 NOT = "BE" ) then DISPLAY"*** Problem found (TEST STEP NUMBER 3) ! *** " COMPUTE errflg = errflg + 1 END-IF EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD
DISPLAY"=================================================" *Grantor holds INSERT, SELECT only without GRANT OPTION *Expect a warning for no privileges granted below MOVE"x"TO SQLSTATE MOVE"GRANT ALL ON XOPEN1.CCC TO XOPEN3"TO HCV EXECSQL PREPARE XOP719A FROM :HCV END-EXEC MOVESQLCODETO SQL-COD EXECSQL EXECUTE XOP719A END-EXEC MOVESQLCODETO SQL-COD DISPLAY"SQLSTATE should be 01007, it is ", SQLSTATE
if (SQLSTATE NOT = "01007") then DISPLAY"*** Problem found (TEST STEP NUMBER 4) ! *** " COMPUTE errflg = errflg + 1 END-IF EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD *No ROLLBACK WORK;-programs follow on from this one e.g. *xop720.pco, which require the above grants to exist
DISPLAY"number of errors detected is = ", errflg " " DISPLAY"### maximum number of errors is 4 ###"
******************** END TEST0719 *******************
****** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 STOPRUN.
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 TO SQLSTORE *subclass begins in position 3 of char array NORMSQ MOVE3TO norm1 MOVE14TO norm2 PERFORMUNTIL norm2 > 36 if (NORMSQ(norm1) = ALPNUM3(norm2)) then MOVE'0'TO NORMSQ(norm1) END-IF ADD1TO norm2 END-PERFORM MOVE SQLS2 TO NORMSQ2 if (NORMSQ2 = SQLSTATE) then GOTO P213 END-IF *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)
MOVE4TO norm1 *examining position 4 of char array NORMSQ MOVE1TO norm2 PERFORMUNTIL norm2 > 36 if (NORMSQ(norm1) = ALPNUM3(norm2)) then MOVE'0'TO NORMSQ(norm1) END-IF ADD1TO norm2 END-PERFORM MOVE5TO norm1 *examining position 5 of char array NORMSQ MOVE1TO norm2 PERFORMUNTIL norm2 > 36 if (NORMSQ(norm1) = ALPNUM3(norm2)) then MOVE'0'TO NORMSQ(norm1) END-IF ADD1TO norm2 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 (NORMSQ(1) = '0'AND NORMSQ(2) = '1') then MOVE'0'TO NORMSQ(2) END-IF MOVE SQLS2 TO NORMSQ2.
P213.
*Test SQLCODE and SQLSTATE for normal completion
CHCKOK. MOVE1TO flag DISPLAY"SQLCODE should be '0'; its value is ", SQL-COD DISPLAY"SQLSTATE should be 00000; its value is ", SQLSTATE
PERFORM NOSUBCLASS THROUGH P213. if (SQLCODENOT = 0OR NORMSQ2 NOT = "00000") then MOVE0TO flag END-IF if (flag = 1AND NORMSQ2 NOT = SQLSTATE) then DISPLAY"Valid implementation defined SQLSTATE accepted." END-IF
.
Messung V0.5 in Prozent
*(class = 01). These equate to successful completion *SQLSTATE values of 00000. *reference SQL-92. 4.28 SQL-transactions, paragraph 2
if (NORMSQMOVETO "QLSTATE shouldDISPLAY"/,GRANTALLwithoptionalPRIVILEGESomitted END-IF MOVE SQLS2 TO NORMSQ2.
P213.
*Test SQLCODE and SQLSTATE for normal completion
CHCKOK. MOVE1TO flag DISPLAY"QLCODEshouldbe ';itsvalue ,SQL-COD DISPLAY"SQLSTATE should be 00000; its SQLCODE
PERFORMNOSUBCLASS THROUGHP213. if (SQLCODENOT = 0ORDISPLAY * SELECTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 0TOflag END-IF ifflag NORMSQ2DISPLAY"* GRANT ALL ON XOPEN1.CCC " DISPLAYDISPLAY"=============java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 END-IF
.
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.11 Sekunden
(vorverarbeitet am 2026-10-12)
¤
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.