************************************************************** * * COMMENT SECTION * * DATE 1988/06/26 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. * * DML078.PCO * WRITTEN BY: S Hurwitz * * This routine tests how the SQL language handles * the length of several COBOL alphanumeric character strings. * * Examples: * 01 xyz4 PIC X(256). * 01 xyz5 PIC X(512). * 01 xyz6 PIC X(1024). * * REFERENCES * AMERICAN NATIONAL STANDARD database language - SQL * X3.135-1989 * SECTION 5.5 <data type> Syntax Rule 5). * X3.168-1989 <embedded SQL COBOL program> * SECTION 9.5 Snytax Rule 4)c). ***************************************************************
01 XYZ1 PIC X(80) valueis"NOTE: Additional SQL
- " language is planned for later addenda to this
- " standard. M".
01 XYZ2 PIC X(52) valueis"ajor topics under consid
- "eration for such addenda inc".
01 XYZ3 PIC X(108) valueis"lude referential integrity,
- " enhanced transaction management, specification
- " of certain implementor-defined ru".
01 XYZ4 PIC X(16) valueis"les, enhanced ch".
01 XYZ5.
02 FILLERPIC X(128) valueis"aracter handling facilities,
- " and support for national character sets. Annexes
- " to this standard specify embedded syntax for incl".
02 FILLERPIC X(128) valueis"uding
- " SQL data manipulation language st
- "atements in an otherwise standard application prog
- "ram. Such embedded syntax is defined t".
01 XYZ6.
02 FILLERPIC X(128) valueis"o be a shorthand notation
- " for a standard application program in which the
- " embedded SQL statements have been replaced with explic".
02 FILLERPIC X(128) valueis "it of database procedures that
- " contain the SQL statements. This standard applies
- " to implementations that exist in an en".
01 XYZ7.
02 FILLERPIC X(128) valueis"vironment
- " that may include application programming languages,
- " end-user query languages, report generator systems,
- " data dictionar".
02 FILLERPIC X(128) valueis "y ststems, program library systems,
- " and distributed communication systems, as well as
- " various tools for database design,..... ".
*log into database move"HU"to uid. CALL"AUTHID"USING uid. MOVE"not logged in, not"TO uidx EXECSQLSELECT
USER INTO :uidx FROM HU.ECCO END-EXEC if (uid NOT = uidx) then DISPLAY"ERROR: User " uid " expected." DISPLAY"User " uidx " connected." DISPLAY" " STOPRUN END-IF
MOVE 0 TO errcnt DISPLAY "SQL Test Suite, V6.0, Embedded COBOL, dml078.pco" DISPLAY" " DISPLAY "59-byte ID" DISPLAY"TEd Version #" DISPLAY" " * date_time print * ACCEPT TO-DAY FROMDATE ACCEPT THE-TIME FROMTIME DISPLAY"Date run YYMMDD: " TO-DAY " at hhmmssff: " THE-TIME
display" Testing COBOL character string lengths ". display" reference X3. 135-1989 SECTION 5.5 ". display" syntax rule 5). ". display" reference X3.168-1989 SECTION 9.5 SR 4) C) ".
move XYZ1 to aa256
aa512 aa1024. move XYZ2 to bb256 bb512
bb1024. move XYZ3 to cc256 cc512 cc1024. move XYZ4 to dd256 dd512 dd1024. move XYZ5 to ee512 ee1024. move XYZ6 to ff1024. move XYZ7 to gg1024. move T256 to IN256. move T512 to IN512. move T1024 to IN1024.
********************** BEGIN TEST0189 ******************** display" ". display" OPTIONAL TEST0189 ". display" CHAR (256) ". display" ". EXECSQLDELETE FROM TEXT256 END-EXEC.
EXECSQLINSERT INTO TEXT256(TEXXT)
VALUES (:IN256) END-EXEC.
EXECSQLSELECT
TEXXT INTO :OUT256 FROM TEXT256 END-EXEC.
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 ist noch experimentell.