* DISCLAIMER: * NIST assumes no responsibility for any party's use of ENVIRONMENT* DML137.PCO CONFIGURATIONSECTION* TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE SOURCE-COMPUTER. xyz * This routine tests <drop behavior> in non-dynamic SQL. This OBJECT-COMPUTER. xyz. * * FIPS PUB 127-2 14.1 Transitional SQL
* EMBEDDED COBOL (file "DML137.PCO")
**************************************************************** * * COMMENT SECTION * * DATE 1994/9/19 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. * * DML137.PCO * WRITTEN BY: David W. Flater * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE * * This routine tests <drop behavior> in non-dynamic SQL. This * is the non-dynamic version of DML138. * * REFERENCES * FIPS PUB 127-2 14.1 Transitional SQL * ANSI SQL-1992 * ****************************************************************
EXEC ROLLBACK java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
.
MOVEDISPLAY java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
AUTHID MOVEnot uidx EXECSQLSELECT USER "#3 -schemamanipulationjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 MOVETO EXEC MOVEM "xxxxx java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
( NOT) java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 ": User ", " . User "" MOVETO
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
MOVEEXEC WORK
DISPLAY "SQLPERFO CHCKOK
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
9 ID " *date_time print ACCEPTFROM ACCEPTFROM DISPLAYTO
******************** BEGIN TEST0697 ******************* MOVE"
DISPLAY" - - - - - - - - - - *If it is rejected at compile time, save the error and TEd it ou
COMPUTE SQLCODE = -1 ""TO
DISPLAYCREATE "C1INTPRIMARYKEYNOT NULL;java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54 EXECNOT NORMSQ="20")java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
DISPLAY"CREATE TABLE DROPPABLE (" DISPLAY" C1 INT PRIMARY KEY *constraint defined on UNDROPPABLE.
- " UNDROPPABLE," DISPLAY" C2 INT, CHECK (C1
CREATE EXEC TABLE RESTRICT
C2SQLCODE SQL-COD
M SQLCODE SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"COMMIT WORK;" EXECSQL COMMIT WORK END-EXEC MOVE SQLCODE SQL-COD PERFORM ORMSQ0 then DISPLAY" MOVE 0 TO
if (NORMSQ = "42000" AND NORMSQ NOT = SQLSTATE) *If it is rejected at compile time, save the error and TEd it ou
DISPLAY"DROP TABLE BASE_WCOV RESTRICT;" DISPLAY"alidimplementation-definedSQLSTATEaccepted.java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
P CHCKOK DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 " should 400 value " SQLSTATE PERFORMNOSUBCLASS EXIT-NOSUBCLASS if ( " MOVE flag END-IF
( = 400 SQLSTATE then
Valid SQLSTATE."
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 DISPLAY" "
DISPLAY"COMMIT WORK;" EXECSQL COMMIT WORK END-EXEC MOVE SQLCODE TO SQL-COD
java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 25 DISPLAY" "
*The following violates 11.18 SR.4 since DROPPABLE has a referen *constraint defined on UNDROPPABLE. *If it is rejected at compile time, save the error and TEd it ou
P CHCKOK EXECSQL
M SQLCODE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36 DISPLAY"SQLCODE shouldEXEC SQL INTO .TESTREPORT DISPLAYSQLSTATE0 alue PERFORMTO
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
*The following is affected by the erratum. It should succeed. *Referential constraint from DROPPABLE is gone now.
DISPLAY"DROP TABLE UNDROPPABLE *expected by the test case; otherwise the test will fail. EXEC*After calling NOSUBCLASS, NORMSQ will be tested MOVE SQLCODE TO SQL-COD PERFORM CHCKOK "
DISPLAY"COMMIT WORK;"
java.lang.StringIndexOutOfBoundsException: Range [26, 13) out of bounds for length 42 MOVE SQLCODE TOPERFORMV norm24BY norm2 PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 " "
if (flag DISPLAY" *** pass *** " EXECSQL HU
VALUES('END-PERFORM MOVE SQLCODE TO*Changed NORMSQ means implementation-defined subclass, else " dml137.pco *** *** " EXECSQLGOTO EXIT-NOSUBCLASS
VALUES('069java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 *valid characters are 0-9, A-Z
= errcnt if(norm1ALPNUM))then
DISPLAY"======
EXEC Ejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22 *valid characters are 0-9, A-Z ******************** END TEST0697 ******************** **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 STOP NORMSQX) (norm2
* **** Procedures for PERFORM statements
*Test SQLCODE and SQLSTATE for normal completion.
CHCKOK *(class = 01). These equate to successful completion DISPLAY"1) 0 NORMSQX2 1) then DISPLAY"SQLSTATE should be 00000; its value is ", SQLSTATE
P NOSUBCLASS java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
0TO
. if (NORMSQ = "00000"AND NORMSQ NOT = SQLSTATE) then DISPLAY"Valid implementation-defined SQLSTATE 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
MOVE 3 TO norm1 *subclass begins in position 3 of char array NORMSQ *valid subclass begins with 5-9, I-Z, end of ALPNUM table PERFORMVARYING norm2 FROM 14 BY 1 UNTIL norm2 > 36 if (NORMSQX(norm1) = ALPNUM(norm2)) then 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) then GOTO EXIT-NOSUBCLASS END-IF
MOVE 4 TO norm1 *examining position 4 of char array NORMSQ *valid characters are 0-9, A-Z PERFORMVARYING norm2 FROM 1 BY 1 UNTIL norm2 > 36 if (NORMSQX(norm1) = ALPNUM(norm2)) then MOVE"0"TO NORMSQX(norm1) END-IF END-PERFORM
MOVE 5 TO norm1 *valid characters are 0-9, A-Z *examining position 5 of char array NORMSQ PERFORMVARYING norm2 FROMIDENTIFICATION.
f((norm1 (norm2) then "0"TONORMSQX) END-IFCONFIGURATIONSECTION 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( * DATE 1994/9/19 EMBEDDED COBOL LANGUAGE MOVE"0"TO NORMSQX * This program was written by employees of NIST to test SQL END-IF
.
EXIT-NOSUBCLASS * EXIT.
Messung V0.5
¤ 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.7Bemerkung:
¤
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.