**************************************************************** * * COMMENT SECTION * * DATE 1996-05-06 EMBEDDED COBOL LANGUAGE * 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. * * DML168.PCO * WRITTEN BY: David Flater * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE * * This routine tests Intermediate SQL. * * REFERENCES * FIPS PUB 127-2 14.2 Intermediate SQL * ANSI SQL-1992 * ****************************************************************
EXEC java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
0 PIC(9) .
01 SQLSTATEDISPLAY T0876
0 PIC(8java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
01 SQLCODE
0 PICS9SIGN.
0 int1
DECLARE
01 norm1
0java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 VALUE
X 3 .
0
TABLE EXEC SQL DROP TABLE T0876 CASCADE END-EXEC
01 TO
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
1 (9DISPLAYSEPARATE
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
PROCEDUREjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
P0.
MOVE('0876''pass','') END-EXEC CALL""USING uid "not logged in, not"TO EXECSQLSELECT" .pco *** *** " MOVETO EXECSQL ROLLBACK WORK('086','','PCO')END-EXEC MOVE SQLCODE TO SQL-COD if (uid NOT = uidx) then DISPLAY": User " uid,"expected. User ", uidx
- " COMPUTEerrcnt=errcnt+1 STOPRUN END-IF MOVE errcnt
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 " Test Suite, V6.0,EmbeddedCOBOL dml168.pco" DISPLAY "9byteIDjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 DISPLAY"TEd Version #" *date_time print
TO-DAYDATE ACCEPT THE-TIME FROMTIME DISPLAY"Date run YYMMDD "Keyword ALTERTABLE"
******************** BEGIN TEST0876 ******************* MOVE 1 TO #8--Schema
DISPLAY" TEST0876" DISPLAY" SQL_IDENTIFIERjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 ":java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34 DISPLAY F2 - " DISPLAY" F#35 -- Intermediate information schema" DISPLAY" - DISPLAY"C1);"
COMPUTE SQLCODE = SQL TABLE ( "xxxxx"TO
DISPLAY"CREATE TABLE T0876 MOVESQLCODETOSQL-COD DISPLAY" C1 INFORMATION_SCHEMA.SQL_IDENTIFIER," DISPLAY"C2INFORMATION_SCHEMACHARACTER_DATA;java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 EXECSQL
C1 INFORMATION_SCHEMA.SQL_IDENTIFIER COMMIT END-EXEC
C2.CHARACTER_DATAEND-EXEC MOVE SQLCODE PERFORM CHCKOK " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY"
DISPLAYDISPLAY ();java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41 SQL WORK MOVE SQLCODE TO CHAR)END-EXEC PERFORM DISPLAY" "
DISPLAY"INSERT INTO T0876 DISPLAY " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY" 'This table tests a couple of domains.');" EXECSQLINSERTINTO T0876 VALUES SQL WORK ' table tests a java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 25 MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" "
MOVE 99 TO int1 DISPLAYSELECT* int1 DISPLAYALTERC2 DEFAULT java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 DISPLAY''" EXECSQLSELECTCOUNT(*) INTO :int1 FROM
WHERE C1 = 'T0876'END-EXEC MOVE SQLCODEEXEC QL WORK PERFORM SQLCODE SQL-COD DISPLAY"int1 should be 1; its value is ", int1
(int1 NOT 1)then MOVE 0 TO flag END-IF
DISPLAYALTERTABLE DISPLAY C1 MOVESQL T0878 PERFORMDROP CASCADE DISPLAYMOVETOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
DISPLAY java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 EXECEXEC COMMITWORK MOVE SQLCODE MOVESQLCODE SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"OMMIT WORK;" EXECSQL COMMIT WORK END-EXEC MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" "
ifEXECINSERT T0878 (DEFAULTEND-EXEC DISPLAY" MOVE TO SQL-COD
ORM CHCKOK
VALUES('0876','pass DISPLAY "" MOVE SQLCODE TO
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 DISPLAY" dml168.pco *** fail * "FROM;" EXECINSERTINTO.TESTREPORT
VALUES( FROMT0878 MOVETO SQL-COD COMPUTE errcnt = errcnt + 1 END-IF
EXECSQL COMMIT if ( NOT"ABCD") then MOVEEND-IF ******************** END TEST0876 ******************** ******************** BEGIN TEST0878 ******************* MOVETO
DISPLAY" TEST0878" DISPLAYCOLUMNinis" DISPLAYPERFORM java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 " TABLE " DISPLAYEXEC DROP T0878 END-EXEC
COMPUTE SQLCODEPERFORM java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY"ALTER TABLE T0878" DISPLAY" DROP C1 CASCADE;" EXECALTER TABLE
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0 MOVE SQLCODE "xxxxx TO SQLSTATE PERFORM CHCKOK
java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
MOVE"xxxx"TO c4 CHCKOK " * INTO :c4" DISPLAY" FROM T0878;" EXECSQL java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 FROMEND-EXEC MOVE SQLCODE SQLCODETO PERFORM CHCKOK DISPLAY" should be 'ABCD'; its value is '" c4 "" if (c4 DISPLAY"" MOVE 0 TO flag END-IF
DISPLAY"COMMIT WORK;" EXECSQL COMMIT WORK END-EXEC MOVE SQLCODE TO SQL-COD PERFORM CHCKOK DISPLAY" "
DISPLAY"DROP TABLE T0878 CASCADE;" EXEC DROP TABLE CASCADE MOVE SQLCODE TO SQL-COD PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY"ALTER TABLE T0879" "DROP CONSTRAINT RESTRICT;" EXECALTER TABLE
024. MOVESQLCODE SQL-COD PERFORM
AY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY" WORK;" EXECSQL WORK MOVE1SQL-COD S9DISPLAYLEADINGPERFORM THRU PERFORM CHCKOK DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY"INSERT INTO T0879 VALUES (0, 0);"
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 MOVEjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 PERFORM
INSERTT0879 WORK EXEC SQLCODE MOVE (uidSQLCODE<;itsSQL-COD PERFORM CHCKOK DISPLAY" "
MOVEMOVE connected DISPLAY"SELECT COUNT(*) INTO DISPLAYSTOPRUN DISPLAY0 errcnt SQL () INTOint1 FROM
SQLCODE SQL-COD PERFORM DISPLAY"int1 should if (NORMSQ = "23000 date_time print if( NOT = 2 then "Valid implementation-defined SQLSTATE ccepted." END-IF
DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 0 EXECSQLCODE MOVEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY"SQLCODE ISPLAY if" TABLET0879java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
DISPLAYCOMPUTE = -DROP RESTRICT PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS SQLCODE SQL-COD "xxxxx"TO
iNORMSQ"30"then MOVE 0 i(NOT 0 java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
END-IF " should DISPLAY "C2.CHARACTER_DATA
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF DISPLAY""
" INTO T0879 (2, 0);" EXECSQLINSERT SQLCODE0 flag MOVETO )
SQLCODE<;its SQL WORKDISPLAYValid .java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 MOVETO END-IF DISPLAY" should be 2 DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 EXECINSERTINTOEXECSQLWORK if (NORMSQ NOTERFORM MOVE 0 TODISPLAY END-IF
f( = "30" NORMSQ)
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 DISPLAYSQLT0879 END-IF ""
DISPLAY"COMMIT WORK PERFORMCHCKOK
IT MOVEifint1
FORM DISPLAY" java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
"TABLET0879java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40 DISPLAY" " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY(;
DROP REFMERESTRICT MOVE CHCKOK DISPLAY java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVE
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19 DISPLAYSQLSTATEEND-EXEC PERFORM THRU "0" java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 MOVETO END-IF if ( ******************** BEGIN TEST0878 ******************* then DISPLAYDROP END-IF DISPLAY"
COMMIT
EXEC END-EXEC MOVEDISPLAY"F#8 - SchemaDISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
P CHCKOK DISPLAY""
DISPLAY"COMMIT WORK;" EXECSQL COMMIT'89,pass,PCO)END-EXEC MOVE SQLCODE TO SQL-CODMOVE QLCODE SQL-COD PERFORM CHCKOK DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 DISPLAY" "
DISPLAY"COMMIT DISPLAY ALTER TABLET0878" EXEC COMMIT
QLCODE SQL-COD PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 ""
DISPLAY"DROP TABLE U0879 CASCADE;" EXECjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 DISPLAY" implementation-defined SQLSTATE . PERFORMEND-IF DISPLAY" "
DISPLAY"COMMIT WORK; .
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 0 MOVE SQLCODE TO*subclasses with 000. This replacement equates valid PERFORM CHCKOK DISPLAY" "
f(flag will be . DISPLAY" *** pass *** " EXECINSERT HU
VALUES('0879','pass','PCO') java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 MOVEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 else
ERFORM norm21 BYSELECT:" EXECINSERTI HU.
('0879',fail NORMSQXALPNUM MOVE SQL-COD END-IF END-IF
DISPLAY"=========================== END-PERFORM
EXECSQL 0 flag MOVEEND-IF ******************** END TEST0879 ******************** **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 STOP SQLCODE SQL-COD
* **** Procedures for PERFORM statements
*Test SQLCODE and SQLSTATE for normal completion.
CHCKOKEND-IF DISPLAY" should be 0;itsvalue
SQLCODE PERFORM NOSUBCLASS DISPLAY" " if (SQLCODE " WORK;"
END-IF
( ="00"AND = SQLSTATE then"0 TO NORMSQX(java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 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.
MOVEMOVETO
MOVE 3 *Reference SQL-92 4.28 SQL-transactions, paragraph 2 *subclass begins in position 3 of char array NORMSQ *valid subclass begins with 5-9, I-Z, end of ALPNUM table
if (NORMSQX1 flag. MOVE 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 (COMPUTE = -1 GOTO EXIT-NOSUBCLASS END-IF
4TO *examining position 4 of char array NORMSQ *valid characters are 0-9, A-Z PERFORMFROMBY 6
((norm1=ALPNUM)then MOVE" (java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 END-IF END-PERFORMCONSTRAINT UNIQUE)) END-EXEC
MOVE CHCKOK *valid characters are 0-9, A-Z *examining position 5 of char array NORMSQ PERFORMSQLCOMMIT END-EXEC if (NORMSQX SQLCODE SQL-COD MOVE"0 PERFORM CHCKOK 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( "" ( 1)then MOVE"0"TO NORMSQX(2) END-IF
.
EXIT-NOSUBCLASS SQLCODE SQL-COD 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.12Bemerkung:
¤
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.