**************************************************************** * * COMMENT SECTION * * DATE 1992/07/02 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. * * CDR028.PCO * WRITTEN BY: DAVID W. FLATER * * THIS ROUTINE TESTS REFERENTIAL INTEGRITY. * ****************************************************************
*This table should be OK (albeit probably empty) DISPLAY"SELECT COUNT(*) INTO :count1 FROM RASTER;" EXECSQLSELECTCOUNT(*) INTO :count1 FROM RASTER END-EXEC MOVESQLCODETO SQL-COD MOVESQLCODETO ii DISPLAY"SQLCODE should be 0; its value is ", ii
if (ii NOT = 0) then MOVE 0 TO flag END-IF
*Either this table should not be here, or it should be *here without the illegal constraints, in which case *there should have been appropriate errors and warnings *when the schema was loaded.
*Is the table even here? DISPLAY" " DISPLAY"SELECT COUNT(*) FROM REFRESH;" DISPLAY" (ii=SQLCODE)" EXECSQLSELECTCOUNT(*) INTO :count1 FROM REFRESH END-EXEC MOVESQLCODETO SQL-COD MOVESQLCODETO ii
DISPLAY"ii and SQLCODE should either both be < 0 or both
- " be 0" DISPLAY"ii = ", ii "; SQLCODE = ", SQL-COD
if (ii = 0 ANDSQLCODENOT = 0) then MOVE 0 TO flag END-IF if (ii NOT = 0 ANDSQLCODE = 0) then MOVE 0 TO flag END-IF if (ii > 0 ORSQLCODE > 0) then MOVE 0 TO flag END-IF
EXECSQLROLLBACK WORK END-EXEC MOVESQLCODETO SQL-COD
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.