java.lang.StringIndexOutOfBoundsException: Range [7, 1) out of bounds for length 21 PROGRAM-ID. *over the World Wide Web inorderto promote *DISCLAIMER: ENVIRONMENTDIVISION. CONFIGURATION java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0 SOURCE-COMPUTER* COMMENT SECTION OBJECT-COMPUTER. xyz. DATADIVISION. * SQL VALIDATION TEST SUITE V6.0 WORKING-STORAGESECTION.
* EMBEDDED COBOL (file "XTS716.PCO")
*Copyright 1995 National Computing Centre Limited *and Computer Logic R&D S.A *on behalf of the CTS5 SQL2 Project. *All rights reserved. *The CTS5 SQL2 Project is sponsored by the European Community. * *The National Computing Centre Limited and Computer Logic R&D *have given permission to NIST to distribute this program *over the World Wide Web in order to promote SQL standards. *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.
**************************************************************** * * COMMENT SECTION * * SQL VALIDATION TEST SUITE V6.0 * * XTS716.PCO * WRITTEN BY: Manolis Megaloikonomou * REVIEWED BY: Nickos Backalidis * * SET SESSION AUTHORIZATION to current auth-id. * * REFERENCES * 16.4 -- <set session authorization identifier statement> * 16.4 GR.1 * 16.4 LR.2a -- Raised. Entry SQL restriction that * prohibits the use of any <set session * authorization identifier statement>. * 6.2 -- <value specification> and <target specification> * 6.2 SR.3 * 6.2 GR.9 * 6.2 LR.2c -- Raised. Entry SQL restriction which * prohibits the specification of CURRENT_USER, * SYSTEM_USER or SESSION_USER in a * <general value specification>. * F#1 -- Dynamic SQL. * F#32 -- User authorization. * * DATE LAST ALTERED 14/12/95 CTS5 Hand-over Test * * Cleanups and fixes by V. Kogakis 01/12/95 * 01 xuser PIC X(20). * * Revised by DWF 1/23/96 * Removed status code checks after cursor definition. * Removed violations of 16.4 GR.1. ****************************************************************
01 xuser PIC X(20). 01java.lang.StringIndexOutOfBoundsException: Range [32, 33) out of bounds for length 32 EXEC5 TIMES
errcnt ( . 01 norm2 PIC S9(9*date_time declaration 01 ALPNUM-TABLE VALUEPIC98)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 "01234ABCDEFGH56789IJKLMNOPQRSTUVWXYZ". PIC36TIMES 01 NORMSQ. 05 01java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 *date_time declaration 01 TO-DAY PIC9(6). 01 THE-TIME PIC9(). 01 flag PICS99) DISPLAYSIGN .
01 SQL-COD PIC S9(9) DISPLAYSIGNLEADINGSEPARATE.
PROCEDUREDIVISION.
P0
MOVE"CTS1 DISPLAY "ERROR: User " uid, expected. User ", uidx, " CALL"AUTHID"USING uid MOVE"not logged in, not"TO uidx EXECSQLSELECT USER INTO :uidx FROM CTS1 MOVETOSQL-COD EXECSQLROLLBACK java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 20 MOVESQLCODETO SQL-COD if (uid AYFROMDATE DISPLAY"ERROR: User ", uid, " expected. User ", uidx ACCEPTFROMTIME
- " connected" STOPRUN END-IF MOVE0TO errcnt
DISPLAY"SQL Test Suite, V6.0, EmbeddedDISPLAY SESSION tocurrent" DISPLAY "59-byte ID"
TEd# *date_time print ACCEPT TO-DAY FROM- "statement>java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24 ACCEPT THE-TIME FROM"164LR.a -Raised.Entry java.lang.StringIndexOutOfBoundsException: Range [69, 70) out of bounds for length 69 DISPLAY"Date run YYMMDD: " TO-DAY " at hhmmssff: " THE-TIME
******************** BEGIN TEST7016 *******************
MOVE1TO flag DISPLAY TEST7016 " DISPLAY" SET SESSION AUTHORIZATION to current auth-id." DISPLAY" References:" " .4 - set authorization
- " statement>" DISPLAY"164GR" DISPLAY" 16.4 LR.2a -- Raised. . 9
- " that" DISPLAY" java.lang.StringIndexOutOfBoundsException: Range [0, 49) out of bounds for length 19
" DISPLAY" java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
>" DISPLAY" #32- authorization"
- " specification DISPLAY"---------------- --" DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" *a host variable with padded leading and trailing spaces. DISPLAY" 6.2 LR.2c -- Raised. Entry SQL restrictionxuser " java.lang.StringIndexOutOfBoundsException: Range [41, 39) out of bounds for length 44
- java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 DISPLAYMOVExxxxx SQLSTATE
- " *Ensure that the current authorization has access rights DISPLAY" SYSTEM_USER or SESSION_USER in
- " a" " <eneral specification>java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 DISPLAY" F# -- SQL.java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 DISPLAY" F#32 -- User authorization." DISPLAY" - - - - - - - - - - -
*Preserve the original authorization identifier CTS1 into *a host variable with padded leading and trailing spaces.
java.lang.StringIndexOutOfBoundsException: Range [39, 29) out of bounds for length 49 DISPLAY"xuser = '", xuser, "'"
*Initialise error reporting variables COMPUTEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVE"xxxxx"TO SQLSTATE
*Ensure that the current authorization has access rights *to table STAFF. MOVE99TO coun DISPLAY"SELECT COUNT(*) INTO :coun FROM CTS1.STAFF;" EXECSQLSELECTCOUNT(*) INTO :coun FROM CTS1.STAFF END-EXEC MOVESQLCODESQLCODE SQL-COD
java.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 25 DISPLAY" java.lang.StringIndexOutOfBoundsException: Range [49, 47) out of bounds for length 56 if ( coun NOTSQLCODESQL-COD MOVE0TO flag
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" "
DISPLAY"COMMIT WORK;" EXECSQLCOMMIT WORK MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
*Change the session authorization identifier to the *value of host variable xuser DISPLAY"SET SESSION AUTHORIZATION :xuser;" EXECSQLSET SESSION java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 25 PERFORM CHCKOK DISPLAY" "
*Check for SELECT access rights in STAFF table MOVE99TO SQL-COD DISPLAY"SELECT PERFORMCHCKOK EXECSQLSELECTCOUNT(*) INTO :java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 END-EXEC MOVESQLCODETO =" "" PERFORM CHCKOK
Coun 5", coun if ( coun NOT = 5 ) then MOVE0TO flag END-IF DISPLAY" "
DISPLAY"SET SESSION AUTHORIZATION USER;" EXECSQLSET SESSION AUTHORIZATION USER END-EXEC MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
MOVE99TO java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 MOVESELECTCOUNT()FROM CTS1STAFF TO DISPLAY"sqlsm2 = """, sqlsm2, """" DISPLAY"PREPARE S FROM :sqlsm2; EXECSQL PREPARE "" MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 25 DISPLAY"OLLBACK"
DISPLAY"FETCH ALPHA INTO :coun;" EXECSQL FETCH ALPHA INTO :coun END-EXEC MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY .TESTREPORT if ( coun NOT = 5 ) then MOVE0TO flag END-IFMOVESQLCODETO SQL-COD DISPLAY" "
DISPLAY"ROLLBACK WORK;"******************** END TEST7016 ******************** EXECSQLROLLBACK WORK END-EXEC * **** Procedures for PERFORM statements PERFORM CHCKOK DISPLAY" "
if ( flag = 1 ) then DISPLAY" xts716.pco *** pass *** " EXECSQL" be 00000 is"SQLSTATE
VALUES('7016','pass','PCO (QLCODE = 0 00000" java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66 MOVESQLCODETO SQL-COD else DISPLAY"xts716.** **java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 MOVESQLCODETO SQL-COD COMPUTE*implementation-defined subclasses with the 000 value END-IF
DISPLAY"==========================java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
EXEC*subclass begins in position 3 of char array NORMSQ MOVESQLCODETO SQL-COD ******************** END TEST7016 ********************
**** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
RUN
* **** Procedures for PERFORM statements
*Test SQLCODE and SQLSTATE for normal completion.
CHCKOK. DISPLAY"SQLCODE should be 0; its value is *Quit if NORMSQ is unchanged. Subclass is not impl.-def. DISPLAY"SQLSTATE should be 00000; its value is ", SQLSTATE PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if ( NOT0ORNORMSQ NOT ="")then MOVE0TO flag END-IF
(=00000 ) then DISPLAY"Valid 4 TO 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.
MOVESQLSTATETONORMSQ
MOVE*valid characters are 0-9, A-Z *subclass begins in position 3 of char array NORMSQ *valid subclass begins with 5-9, I-Z, end of ALPNUM table PERFORMVARYING norm2 FROM14BY1UNTIL norm2 > 36 if (NORMSQX(norm1) = ALPNUM(norm2)) java.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 17 MOVE*(class = 01). These equate to successful completion 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)
RMSQ SQLSTATE) GOTO EXIT-NOSUBCLASS END-IF
MOVE4TO norm1 *examining position 4 of char array NORMSQ *valid characters are 0-9, A-Z PERFORMVARYING norm2 FROM1BY1UNTIL norm2 > 36 if (NORMSQX(norm1) = ALPNUM(norm2)) then MOVE"0"TO NORMSQX(norm1) END-IF END-PERFORM
MOVE5TO norm1 *valid characters are 0-9, A-Z *examining position 5 of char array NORMSQ PERFORMVARYING norm2 FROM1BY1UNTIL norm2 > 36 if (NORMSQX(norm1) = ALPNUM(norm2)) then MOVE"0"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"0"TO NORMSQX(2) END-IF
.
EXIT-NOSUBCLASS. EXIT.
Messung V0.5 in Prozent
¤ 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.0.8Bemerkung:
¤