IDENTIFICATIONDIVISION. PROGRAM-ID. YTS791. ENVIRONMENTDIVISION. CONFIGURATIONSECTION. *on behalf of the CTS5 SQL2 Project. OBJECT-COMPUTER. xyz. DATADIVISION.
*The CTS5 SQL2 Project is sponsored by the *
* EMBEDDED COBOL (file "YTS791.PCO")
*Copyright 1996 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 * * YTS791.PCO * WRITTEN BY: Susan Watters * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE * * GRANT USAGE on character set, WITH GRANT OPTION * * * REFERENCES * 11.28 <character set definition> * 11.36 <grant statement> * 10.3 <privileges> * 11.3 <table definition> * 11.4 <column definition> * 16.4 <set session authorization identifier statement> * F#45 Character set definition * F#25 Domain definition * F#32 User authorisation * F#3 Basic schema manipulation * F#2 Basic information schema * * DATE LAST ALTERED 02.01.96 CTS5 Hand-over Test * * QA Status: Full FC * * Revised by DWF 1996-03-22 * Added rollback after authid * Fixed charset usage ****************************************************************
MOVE"TS2 TO uid CALL"AUTHID"USING uid MOVE"byte IDjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 EXECSQLSELECT USER INTO TO-DAY DATE SQLCODE EXECSQL******************** BEGIN TEST7525 ******************* MOVESQLCODETO SQL-COD ifuidNOT=uidx DISPLAY" DISPLAY "References characterset, OPTION"
- " connected" STOPRUN
MOVE0TO errcnt
DISPLAY"1136< statement> DISPLAY "59-byte ID" DISPLAY"TEd Version #" *date_time print ACCEPT" 11.4<column definition>java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 ACCEPT THE-TIME FROMTIME DISPLAY"Date YYMMDD:"TO-DAY " at hhmmssff: " THE-TIME
******************** BEGIN TEST7525 ******************* 1flag
DISPLAY" TEST7525 " DISPLAY" GRANT USAGE on DISPLAY " F#3 Basic schemajava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 "References:java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
racter setdefinition>" " 11. grant " DISPLAY" 10 "xxxx java.lang.StringIndexOutOfBoundsException: Range [23, 20) out of bounds for length 60 11. <tabledefinition>java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53 DISPLAY" 11.4 <column definition> "hecking DISPLAY - " java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
- " *initialise variables DISPLAY" #gram java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 70 DISPLAY" F#25 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" F#32 User authorisation" DISPLAY" F#3 Basic java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 30 DISPLAY" F#2 Basic information schema" DISPLAY
COMPUTESQLCODE = -1 MOVE"MOVE SQLCODE
ofjava.lang.StringIndexOutOfBoundsException: Range [61, 60) out of bounds for length 70
PERFORM
- " OPTION" DISPLAY
*initialise variables
xxx ggt
*as second user grant usage on domain to third user
DISPLAY"USAGE PERFORMCHCKOK EXECSQL GRANT "" END-EXEC
java.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
( 3)java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 36 DISPLAY
DISPLAYMOVESQL-COD EXECSQLCOMMIT WORK END-EXEC MOVETOSQL-COD
DISPLAY" DISPLAY COMMIT WORK"
*create table using character set
DISPLAY"CREATE TABLE TB" DISPLAY (TBC3 java.lang.StringIndexOutOfBoundsException: Range [52, 51) out of bounds for length 66 EXECSQL CREATE TABLE TB
(()CHARACTER CS) MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"COMMIT WORK"
MOVESQLCODETO SQL-COD PERFORM DISPLAY" "
*insert value into table
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 EXECSQLINSERTEND-EXEC MOVESQLCODETO SQL-COD
DISPLAY"DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY" INTO :FROMTB" EXECSQL EXEC SQL SELECTINTO :ggtFROM TB END-EXEC MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"gt EXEC SQL COMMIT WORK END-EXEC if (ggt NOT = "java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 27 MOVE0TO flagif( = 1)thenEND-IF END-IF
DISPLAY SQL-COD EXECSQLCOMMIT WORKVALUESPERFORM CHCKOK MOVESQLCODETOSQL-COD PERFORM java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 17 DISPLAY"
*ensure database is left in a consistent state
DROPTABLE TB CASCADE; EXECSQLSQLCODETO SQL-COD
TO SQL-COD PERFORM CHCKOK DISPLAYDISPLAYTOjava.lang.StringIndexOutOfBoundsException: Range [38, 39) out of bounds for length 38
EXECSQLCOMMIT WORK END-EXEC MOVESQLCODETO SQL-COD ******************** END TEST7525 ********************
**** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 STOPRUN.
* **** Procedures for PERFORM statements
*Test SQLCODE and SQLSTATE for normal completion.
CHCKOK. DISPLAY"SQLCODE should be 0 DISPLAY"SQLSTATE should be 00000; its value is "RUN. PERFORM NOSUBCLASS THRU MOVE SQLSTATETO DISPLAY"QLCODE be 0;itsvalue is ", SQL-COD 0TOjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 END-IF if( 00000ANDVARYINGnorm2FROMBYUNTIL norm2 36 then
Validimplementation-definedSQLSTATE 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.
MOVE SQLSTATE TO NORMSQ
MOVE3TO norm1 *subclass begins in position 3 of char array NORMSQ *valid subclass begins with 5-9, I-Z, end of ALPNUM table PERFORMVARYING norm2 14BY1UNTIL > 36 ifif (NORMSQX()=ALPNUM( MOVE"0"TO NORMSQX(norm1) 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 *valid characters are 0-9, A-Z GOTO EXIT-NOSUBCLASS END-IF
MOVE4TO norm1 *examining position 4 of char array NORMSQ *valid characters are 0-9, A-Z PERFORMVARYING" (norm1) if (NORMSQX END-IF MOVE"0"TO NORMSQX(norm1) END-IF END-PERFORM
*examining position 4 of char array NORMSQ *valid characters are 0-9, A-Z *examining position 5 of char array NORMSQ PERFORMVARYING norm2 FROM11UNTILnorm2 if((orm1 =ALPNUM(orm2) if (java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 MOVE"0"TO NORMSQX(norm1)
rence SQL-92 4.java.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
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.9Bemerkung:
¤
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.