products/Sources/formale Sprachen/Cobol/Test-Suite/SQL P/yts/     Datei vom 4.1.2008 mit Größe 19 kB image not shown  

 dml135.cob   Interaktion und
PortierbarkeitCobol

 
       IDENTIFICATION .
              PROGRAM-ID  DML135
       ENVIRONMENT         SECTION.  xyz.java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 29
       CONFIGURATION      *  this program.
       SOURCE-COMPUTER.  xyz.
       OBJECT-COMPUTER      * DML135.PCO                                                    
       DATA DIVISION.
       WORKING-STORAGE SECTION      *                                                              


      * EMBEDDED COBOL (file "DML135.PCO")


      ****************************************************************
      *                                                              
      *                 COMMENT SECTION                              
      *                                                              
      *                                                              
      * 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.
      *                                                              
      * DML135.PCO                                                    
      * WRITTEN BY:  David W. Flater                                 
      * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE
      *                                                              
      * This program tests multiple TSQL features together.          
      *                                                              
      * REFERENCES                                                   
      *   FIPS PUB 127-2 14.1 Transitional SQL                       
      *   ANSI SQL-1992                                              
      *                                                              
      ****************************************************************



EXECDECLARE java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
       01  0ALPNUM 6.
0   PIC5
       01  uid0.
       uidx
                     PICOCCURS.
0   PIC S9  SIGN SEPARATE.
       01  tchar PIC      *date_time declaration 
       01   PIC  X(240.
       01  tname PIC  X(18).
       01  ttype PIC  X(10).
       01  cname PIC  X(18).
       01  indic1 PIC S9(4) DISPLAY SIGN LEADING SEPARATE.
       01  flt1 PIC S9(4)V9       1THE-TIME 98)
       01  emnum  (3).
       01  ename PIC  X(20).
       01  city PIC  X(15).
             EXEC1SQL-COD S9) DISPLAY SIGN LEADINGSEPARATE
01norm1 S9)DISPLAYSIGN SEPARATE
       01  norm2 PIC S9.
       01  ALPNUM-TABLE "FLATER TO uid
               "01234 "AUTHID
05ALPNUM XOCCURST.
       01  .
           0   PIC X OCCURSTIMES
       01  errcnt PIC S9(9) DISPLAY SIGNEXEC SELECTUSER uidxFROM .ECCO END-EXEC
      *date_time declaration 
       01  TO-DAY PIC 9(6).
       01  THE-TIME             MOVE TO SQL-COD
       01   PIC S99  SIGN SEPARATE

       01  SQL-CODMOVE TO SQL-COD

       PROCEDURE DIVISION.
       P0

             MOVE " - connected"
             CALL "AUTHID" USING uid
              "not loggedin,not"TO
             EXEC SQL SELECT USER
             MOVE SQLCODE
             EXEC SQL ROLLBACK" Test Suite,V60,Embedded COBOL, dml135.pco"
MOVE TO
             if "9 ID"
               DISPLAY      *date_time print 
      -    " connected"
            STOP
             END-IF
MOVE TO

             DISPLAY
           "SQL Test Suite,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             
           "59-byte ID"
" Version #"
      *date_time print 
ACCEPTTO-DAYDATE
           ACCEPT THE-TIME FROM TIME
           DISPLAY "Date "    #1 - Dynamic"

      ******************** BEGIN TEST0692 *******************
             MOVE 1 TO              " F# -- Basic schema manipulation"

             DISPLAY " TEST0692 "
             DISPLAY "Many TSQL features #3: enhanced proj/works"
             DISPLAY "References:"
             DISPLAY " F#15-- Lowercase identifiers"
             DISPLAY             DISPLAY    #6-  KEY"
             DISPLAY " F# 13 -- Grouped operations"
             DISPLAY"F#1 - Lowercaseidentifiersjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
             DISPLAY " F# 16 -- PRIMARY KEY enhancement"
             DISPLAY"F 9 - Referential delete "
             DISPLAY " F# 22 -- Explicit defaults"
             DISPLAY"F# 24--Keywordrelaxations"
             DISPLAY " - - -java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

              SQLCODE
             MOVE

             DISPLAY "CREATE TABLE ""Proj "        CHAR3)PRIMARY"
             DISPLAY " PNUM CHAR(3) PRIMARY KEY,"
                 PNAME    CHAR"
             DISPLAY " PTYPE CHAR(6) DEFAULT 'Code',"
             DISPLAY " DISPLAY "       CHAR()    DEFAULT,java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
             DISPLAY " CITY CHAR DISPLAY "        CHAR(15)DEFAULT);
              SQL TABLE "Proj" (
               PNUM     CHAR(               NUM(3) PRIMARY,
               PNAME(20),
               PTYPE    CHAR(6)                   PTYPE(6)    DEFAULT'
               BUDGET   DECIMAL(9) DEFAULTCITY(15)   DEFAULT)END-EXEC
               CITY SQLCODE SQL-COD
             MOVE SQLCODE CHCKOK
               " "
             DISPLAY  " "

             DISPLAY "COMMIT;"
             EXEC SQL END-EXEC
MOVE TO
            CHCKOK
             DISPLAY  " "

                        PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY "SELECTPTYPE COUNT() FROM"Proj
             DISPLAY " GROUP BY PTYPE;"
             EXEC CREATEVIEW (TYPE) AS
               SELECT PTYPE, COUNT(*) FROM "Proj"
               GROUP BY PTYPE END-EXEC" ("TYPE)AS
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
                             PTYPE, COUNT(*) FROM Proj

             DISPLAY "COMMIT;"
             EXEC COMMIT
             MOVE SQLCODEPERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
 java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY "

             DISPLAY "CREATE VIEW PTYPES AS"
             DISPLAY " SELECT * MOVESQLCODE TOSQL-COD
             DISPLAY " WHERE NUM > 1;"
            EXEC CREATE PTYPES java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
               SELECTDISPLAY" VIEW PTYPES AS"
               WHERE  java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
             MOVE SQLCODE TOEXEC CREATE PTYPES AS
           ERFORM
             DISPLAY  " "

             DISPLAY "COMMIT;"
 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "CREATE TABLE ""Works"" ("
             DISPLAY " EMPNUM CHAR(3),"
 CHCKOK
              REFERENCES,
             DISPLAY " HOURS DECIMAL(5),
             DISPLAY " PRIMARY DISPLAY CHAR,
EXECTABLE"(
               EMPNUM   CHAR(3),
             ISPLAYREFERENCESDELETEjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
REFERENCES  CASCADE
               HOURS    DECIMAL(5),
               PRIMARY                    CHAR(5,
MOVE TO
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY
             EXEC SQL COMMIT              EXEC SQL COMMIT END-EXEC
 SQLCODE TO SQL-COD
           PERFORM CHCKOKDISPLAY  "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
                           " SELECT PNUM, COUNT(*) ""Works"""

             DISPLAY "CREATE VIEW ""PStaff"" (PNUM, NUM) AS"
             DISPLAY " SELECT PNUM, COUNT(*) FROM ""Works"""
             DISPLAY " WHERE HOURS >= 20"
             DISPLAY  GROUPPNUM
                            HERE >= 20
               SELECT PNUM, COUNT(*) FROM "Works"
               WHERE >= 2
               GROUP BY PNUM END-EXEC
             MOVE TO SQL-COD
           PERFORMPERFORM
             ISPLAY  " "

             DISPLAY "COMMIT;"
             EXEC SQL COMMITjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             MOVE SQLCODE SQL-COD
           PERFORM CHCKOK
DISPLAY  ""

             DISPLAY "INSERT INTO ""Proj"""
             DISPLAY "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             EXEC SQL              " ELECT* FROM Hu.Proj;
              SQL INTO""
             MOVE SQLCODE * FROM Hu.Proj
           PERFORM  MOVE TO SQL-COD
             DISPLAY  " "

             DISPLAY             CHCKOK
DISPLAY" VALUES(P7,'',DEFAULT;"
             EXEC INSERT INTOProjPNUM, PNAME)
               VALUES             DISPLAY   VALUESP7FROB"
             MOVE SQLCODE SQL-COD
           PERFORM CHCKOK ('P7','FROB', DEFAULT END-EXEC
             DISPLAY  " "

             DISPLAY" INTO "ProjPNUM )java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
             DISPLAY  VALUES,BORF
 "VALUES('P8', 'BORF', 15000);"
               VALUES ('P8 EXEC INSERT "Proj" (PNUM, PNAME, BUDGET)
             MOVE  TO SQL-COD
            MOVE TO java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             DISPLAY  " "

             DISPLAY "INSERT INTO ""Proj"" ( DISPLAY " VALUES ('P9', 'FORB', DEFAULT)"
DISPLAY VALUES,'' DEFAULT
             EXEC SQL INSERT INTO "Proj" (PNUM ('P9''FORB, DEFAULT END-EXEC
               VALUES,'', DEFAULT 
             MOVE SQLCODE TO SQL-COD
           PERFORMCHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO ""Proj"" VALUES"
             DISPLAY " ('P10', 'ROBF', 'Docsjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
 SQLINTO Proj
               ('P10''ROBF''Docs', 1000,MOVE TO
             MOVE SQLCODE"SELECT FROM Hu.Works;"
PERFORM
   java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY "INSERT INTO ""Works"""
  * FROM.;"
             EXEC SQL C13511
                * Hu 
             MOVE SQLCODE TO
             C13511
             DISPLAY  " "

             DISPLAY "DECLARE C13511 CURSOR PERFORMCHCKOK
             DISPLAY " SELECT * FROM PTYPES ORDER BY NUM;"
               ""
               SELECT * FROM PTYPESjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

             DISPLAY "EXECSQLFETCHC13511 INTO :tchar, :int1 END-EXEC
             EXEC  TOSQL-COD
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
              "tcharshouldbe' '; its value is',

                          tchar
             COMPUTEint1
             DISPLAY "FETCH C13511 "  OR  NOT =2 then
             EXEC SQL FETCH C13511 INTO :tchar,:int1END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "tchar should be 'Test '; its value END-IF
             tchar "'"
             DISPLAY "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
              tchar" "  OR  NOT =)then
               MOVE 0 TO flag SQLCODE SQL-COD
             END-IF

             MOVE "xxxxxx" TO tchar
              "'"
             DISPLAYint13    ,int1
             EXEC SQL FETCH C13511 INTO :tchar, :int1             if tchar  =""  OR  int1 =  3 
              SQLCODE SQL-COD
           PERFORM CHCKOK
             DISPLAY "tcharjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             tchar              " C13511 INTO :tchar, int1;"
             DISPLAY "int1 should be 3; its value is ", int1
             iftchar  =""  OR  int1 =3)then
               MOVE 0 TO flag
             END-IFMOVE TO SQL-COD

             MOVE "xxxxxx" TO
             COMPUTE = -1
             DISPLAY "FETCH C13511 INTO :tchar, :int1;"
             EXEC SQL FETCHDISPLAYint1;its,java.lang.StringIndexOutOfBoundsException: Range [60, 61) out of bounds for length 60
             MOVE 0 TO flag
             END-IF
DISPLAY   Code   "
             tchar "'"
             DISPLAY "int1 should be 4; its value is ", int1EXECSQL C13511 INTO:char END-EXEC
tchar  NOT     "Code "  OR  NOT =  4) then
               MOVE TO
             END-IF

             DISPLAY "FETCH C13511INTO :tchar, :int1;"
             EXEC SQL            NOSUBCLASS EXIT-NOSUBCLASS
             MOVE TOSQL-COD
               MOVETO
             DISPLAY "SQLSTATE should be 02000; its
           PERFORM NOSUBCLASS EXIT-NOSUBCLASS
             
               MOVE 0 TODISPLAY" implementation-defined SQLSTATE accepted."
             END-IFEND-IF
             if (NORMSQ   =   "02000"  AND  NORMSQ  NOT  =   SQLSTATE)
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
             DISPLAY  " "

             DISPLAY "CLOSE C13511;"
             EXEC SQL              SQLCODETO
QLCODE SQL-COD
           PERFORM              DISPLAY""
             DISPLAY  " "

      *Grouped dynamic cursor over a grouped view 

             EXEC MOVE TO
 SQLCODE
             EXEC' NUM()FROMPStaff
               '
               GROUP
               ) SQLCODE SQL-COD
                           SQL ZZ :longstCONCATBUF
             EXEC SQL SQLCODE SQL-COD
             MOVE SQLCODE TO              "longst"",longst""

             DISPLAYlongst  """"

             DISPLAY "PREPARE XEC SQLPREPARES13512FROM:longst END-EXEC
             MOVE SQLCODE SQL-COD
             MOVE SQLCODE TOPERFORM
           PERFORMC13512"
             DISPLAY  " "

DECLARE
             EXEC SQL

             DISPLAYOPEN
             EXEC SQLMOVE TOSQL-COD
             MOVE SQLCODE TO SQL-COD
PERFORM
             DISPLAY  " "

             COMPUTE int1 =
 = -1
             DISPLAY "FETCH C13512 INTO :int1, :int2;"
H C13512 :int1int2 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM
             DISPLAY "int1 EXEC SQL FETCHC13512INTO :, :int2 END-EXEC
             DISPLAY "int2shouldbe2 its is ", int2
PERFORM CHCKOK
               MOVE 0 TO flag
             END-IF

             COMPUTE int1 = -1
             COMPUTE int2 = -1
DISPLAYFETCHINTO,:;"
             EXEC SQL FETCH C13512 " should be 2; its valueis ,int2
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             if (  NOT =1  ORint2 = 2)then
             DISPLAY "int2 should be 2; its value is ", int2MOVET flag
             if (int1  NOT =  2  OR  int2  NOT =  2) then
               MOVE 0 TO flag
             END-IF

             COMPUTE int1 = -1
             COMPUTE int2=-1
             DISPLAY               "FETCH INTO :int1, :int2;"
             EXEC SQL C13512 INTOint1 END-EXEC
             MOVE SQLCODEMOVE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "int1 should be 4; its value is ", int1
             DISPLAY "int2 should be 1; its value is ",              "int1 be 2; its value is ", int1
             if (int1  NOT             ISPLAYshouldits",int2
               OVE flag
             END-IF

             DISPLAY "FETCH C13512 INTO :int1, :int2;"
             EXEC SQL FETCH C13512
             MOVESQLCODE TO
             DISPLAY "SQLCODE should be COMPUTEint2=-1
DISPLAY" be000;itsvalueis" SQLSTATE
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             ifSQLCODE =  10  OR  NOT  =   "200)then
               MOVE flag
             END-IF
                           "int1 should be 4;itsvalueis" int1
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
             DISPLAY  " "

             DISPLAY "CLOSE C13512;"
             EXEC SQL CLOSE C13512 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
  " "

      *Cascaded delete -- ditch all that costly Design work 

             DISPLAY "DELETE FROM ""Proj java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             EXEC SQL DELETE FROM "Proj" WHERE SQLCODESQL-COD
             END-EXEC
             MOVE
           PERFORM" 20 ,SQLSTATE
             DISPLAY  " "

                          if  NOT0OR  NORMSQ  =   0200") then
             EXEC SQL 0 TO
             MOVE SQLCODE TO
           PERFORM CHCKOKifNORMSQ000"AND NORMSQ =SQLSTATE
             DISPLAY  " "

             MOVE               DISPLAY"alidimplementation-definedSQLSTATEaccepted.java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
             COMPUTE int1 = -1
             DISPLAY "FETCH C13511 INTO :tchar, :int1;"
             EXEC AYjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             MOVE QLCODE SQL-COD
            CHCKOK
             ISPLAY
             tchar "' *Cascaded delete -- ditch all that costly Design work
             DISPLAY "int1 should be 2; its value is ", int1
if       Test    NOT2 java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
               MOVE 0 TO flag
             END-IF

             MOVE"" TO tchar
             COMPUTEint1 = -1
             DISPLAY "FETCH C13511 INTO :tchar, :int1;"
             EXEC SQL FETCH C13511  " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
MOVE TOSQL-COD
            CHCKOK
             DISPLAY                "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             tchar "'"
             DISPLAY "int1 should be 4; its " C13511,:;"
 (  NOT  =" "  OR  NOT =  4) then
               MOVE 0 TO flag SQLCODE TO
             END-IF

             DISPLAY "FETCH C13511 INTO :tchar, :int1;"
EXEC FETCH :, : END-EXEC
             MOVE SQLCODE TO SQL-COD             tchar
DISPLAY" be 10 its value is ", SQL-COD
             DISPLAY "QLSTATE be 02000; its value is ", SQLSTATE
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODE  NOT =  100  OR  NORMSQ  NOT  =   "02000"then
               MOVE0TO
             END-IF
             ifMOVE  flag
             then
               DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             
             DISPLAY  " "

             DISPLAY "CLOSE C13511;"
             EXEC SQL CLOSE C13511 END-EXEC
MOVE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY" "

             DISPLAY "OPEN C13512;"
             EXEC            PERFORM
              SQLCODE
           PERFORM
             DISPLAY  " "

             COMPUTE int1 = -1
             COMPUTE int2 = -1
             DISPLAY " C13512 INTO :int1, int2"
             EXEC SQL FETCH C13512 INTO :int1, :int2 0 TO
             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
           PERFORM
             DISPLAY "int1 should be 1; its value SQL FETCHC13511INTO:tchar, :int1 END-EXEC
             DISPLAYint22    ",int2
             if (int1  NOT =  1  OR              "SQLCODEshouldbe 10;itsvalueis ",SQL-COD
               MOVE 0 TO flag
END-IF

             COMPUTE int1 = -1
             COMPUTE int2-
             DISPLAY             ifSQLCODE =  0    NORMSQ  =   "00)then
             EXECSQLFETCH C13512 INTOint1 :int2 END-EXEC
             MOVE SQLCODE TO              END-IF
           PERFORM CHCKOK
             DISPLAY "int1 should be 4; its value is ", int1
PLAY should; its " int2
             if (int1  NOT =  4  ORthen
               MOVE 0 TO flag
             END-IF

             DISPLAY "FETCH C13512 INTO :int1, :int2;"
             EXEC SQL FETCH               " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             MOVE              EXEC SQL CLOSE END-EXEC
             DISPLAYSQLCODE10;   ,SQL-COD
             DISPLAY "SQLSTATE should be 02000; its value is ", SQLSTATE
           PERFORM NOSUBCLASS             CHCKOK
             if (SQLCODE  NOT =  100  OR
               MOVE 0 TO flag
             END-IF
             if              SQL C13512END-EXEC
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."

             DISPLAY  " "

             DISPLAY "CLOSE C13512;"
             EXEC SQL java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             MOVE SQLCODE int2
           PERFORM "FETCHC13512 INTO :int1, :int2;"
             DISPLAYEXEC FETCH C13512 :int1: END-EXEC

              "ROLLBACK"
             EXEC SQLPERFORM
                           "int1 should be 1; its value is ", int1
           PERFORM
             DISPLAY  " NOT =1 int2 = 2 java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57

      *TEd hook ababababa 
DISPLAYDROPProj;
             EXEC SQL DROP TABLE "Proj"               int2
MOVE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY "COMMIT;"
             EXEC              " should be 4; itsvalue is" int1
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
DISPLAY

             DISPLAYifint1   4OR  int2 =1 then
             EXEC SQL DROP 0 TO
             MOVE SQLCODEEND-IF
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "COMMIT;"
             EXEC SQL END-EXEC
             MOVE SQLCODE TOMOVE TO SQL-COD
            CHCKOK
             DISPLAY  " "
      *TEd hook zyzyzyzyzyz 

             if ( flag  =  1 ) then
               DISPLAY " *** pass *** "
               EXEC SQL INSERT INTO HU.TESTREPORTPERFORM THRU EXIT-NOSUBCLASS
                 VALUES092,'','PCO'END-EXEC
               MOVEMOVE  flag
             elseEND-IF
               DISPLAY " dml135.pco *** fail *** "
               EXEC SQLINSERT INTOHU.TESTREPORT
                 VALUES9'',''END-EXEC
               MOVE SQLCODE "Validimplementation-defined accepted."
               COMPUTE errcnt =java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 19
             END-IF 
DISPLAY
                   *TEd hook zyzyzyzyzyz 

EXECCOMMIT
             MOVE SQLCODE  * *"
      ******************** END TEST0692 ********************
      ******************** BEGIN TEST0693 *******************
             MOVE 1 TO SQLCODE

DISPLAYTEST0693
             DISPLAY "Many TSQL features #4: enhanced INFO_SCHEM
DISPLAY:
             DISPLAY " F# 2 -- Basic information schema"
             DISPLAY " F# 3 -- Basic schema manipulation"
             DISPLAY " F# 4 -- Joined table"
             DISPLAY " F# 5 -- DATETIME data types"
             DISPLAY " F# 11 -- Transaction isolation"
             DISPLAY " F# 15 -- Lowercase identifiers"
             DISPLAY " F# 22 -- Explicit defaults"
             DISPLAY " F# 24 -- Keyword relaxations"
             DISPLAY " - - - - - - - - - - - - - - - - - - -"

             COMPUTE SQLCODE = -1
             MOVE "xxxxx" TO SQLSTATE

      *The Information Schema is defined to give a view to only the 
      *current catalog, so it is not necessary to join across       
      *TABLE_CAT.                                                   

             DISPLAY
              "TABLE_SCHEM CHAR (50,"
             DISPLAY " TABLE_NAME CHAR (50),"
             DISPLAY " java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             EXEC SQL CREATE TABLE CreationTimes (
               TABLE_SCHEM CHAR (50),
               TABLE_NAME  CHAR (50),
               CREATE_TIME TIMESTAMP) END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "COMMIT;"
             EXEC SQL COMMIT END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "CREATE VIEW TablesColumns AS"
             DISPLAY " SELECT TABLE_SCHEM, TABLE_NAME,"
             DISPLAY " TABLE_TYPE, COLUMN_NAME, CREATE_TIME"
             DISPLAY " FROM Info_Schem.Tables"
             DISPLAY " NATURAL JOIN Info_Schem.Columns"
             DISPLAY " NATURAL JOIN CreationTimes;"
             EXEC SQL CREATE VIEW TablesColumns AS
               SELECT TABLE_SCHEM, TABLE_NAME,
               TABLE_TYPE, COLUMN_NAME, CREATE_TIME
               FROM Info_Schem.Tables
               NATURAL JOIN Info_Schem.Columns
               NATURAL JOIN CreationTimes END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "COMMIT;"
             EXEC SQL COMMIT END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

      *Populate CreationTimes with data for all tables we wish to 
      *see -- the natural join will eliminate all others!         

             DISPLAY "INSERT INTO CREATIONTIMES VALUES"
             DISPLAY " ('FLATER', 'CREATIONTIMES',"
             DISPLAY " TIMESTAMP '1994-09-01 16:15:00');"
             EXEC SQL INSERT INTO CREATIONTIMES VALUES
               ('FLATER''CREATIONTIMES',
               TIMESTAMP '1994-09-01 16:15:00'END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO CREATIONTIMES VALUES"
             DISPLAY " ('FLATER', 'TABLESCOLUMNS', DEFAULT);"
             EXEC SQL INSERT INTO CREATIONTIMES VALUES
               ('FLATER''TABLESCOLUMNS', DEFAULT) END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "COMMIT;"
             EXEC SQL COMMIT END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "SET TRANSACTION READ ONLY;"
             EXEC SQL SET TRANSACTION READ ONLY END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "DECLARE C13521 CURSOR FOR"
             DISPLAY " SELECT TABLE_NAME, TABLE_TYPE, COLUMN_NAME,"
             DISPLAY " EXTRACT (HOUR FROM CREATE_TIME)"
             DISPLAY " FROM TABLESCOLUMNS"
             DISPLAY " ORDER BY TABLE_NAME, COLUMN_NAME"
             DISPLAY " FOR READ ONLY;"
             EXEC SQL DECLARE C13521 CURSOR FOR
               SELECT TABLE_NAME, TABLE_TYPE, COLUMN_NAME,
               EXTRACT (HOUR FROM CREATE_TIME)
               FROM TABLESCOLUMNS
               ORDER BY TABLE_NAME, COLUMN_NAME
               FOR READ ONLY END-EXEC

             DISPLAY "OPEN C13521;"
             EXEC SQL OPEN C13521 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             MOVE 99 TO int1
             MOVE 99 TO indic1
             MOVE "xxxxxxxxxxxxxxxxxx" TO tname
             MOVE "xxxxxxxxxx" TO ttype
             MOVE "xxxxxxxxxxxxxxxxxx" TO cname
             DISPLAY "FETCH C13521"
             DISPLAY " INTO :tname, :ttype, :cname, :int1:indic1;"
             EXEC SQL FETCH C13521
               INTO :tname, :ttype, :cname, :int1:indic1 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "tname should be 'CREATIONTIMES '; its value is
      -    " '", tname "'"
             DISPLAY "ttype should be 'BASE TABLE'; its value is '",
             ttype "'"
             DISPLAY "cname should be 'CREATE_TIME '; its value is
      -    " '", cname "'"
             DISPLAY "int1 should be 16; its value is ", int1
             DISPLAY "indic1 should be 0; its value is ", indic1
             if (tname  NOT  =   "CREATIONTIMES "then
               MOVE 0 TO flag
             END-IF
             if (ttype  NOT  =   "BASE TABLE"then
               MOVE 0 TO flag
             END-IF
             if (cname  NOT  =   "CREATE_TIME "then
               MOVE 0 TO flag
             END-IF
             if (int1  NOT =  16  OR  indic1  NOT =  0) then
               MOVE 0 TO flag
             END-IF

             MOVE 99 TO int1
             MOVE 99 TO indic1
             MOVE "xxxxxxxxxxxxxxxxxx" TO tname
             MOVE "xxxxxxxxxx" TO ttype
             MOVE "xxxxxxxxxxxxxxxxxx" TO cname
             DISPLAY "FETCH C13521"
             DISPLAY " INTO :tname, :ttype, :cname, :int1:indic1;"
             EXEC SQL FETCH C13521
               INTO :tname, :ttype, :cname, :int1:indic1 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "tname should be 'CREATIONTIMES '; its value is
      -    " '", tname "'"
             DISPLAY "ttype should be 'BASE TABLE'; its value is '",
             ttype "'"
             DISPLAY "cname should be 'TABLE_NAME '; its value is
      -    " '", cname "'"
             DISPLAY "int1 should be 16; its value is ", int1
             DISPLAY "indic1 should be 0; its value is ", indic1
             if (tname  NOT  =   "CREATIONTIMES "then
               MOVE 0 TO flag
             END-IF
             if (ttype  NOT  =   "BASE TABLE"then
               MOVE 0 TO flag
             END-IF
             if (cname  NOT  =   "TABLE_NAME "then
               MOVE 0 TO flag
             END-IF
             if (int1  NOT =  16  OR  indic1  NOT =  0) then
               MOVE 0 TO flag
             END-IF

             MOVE 99 TO int1
             MOVE 99 TO indic1
             MOVE "xxxxxxxxxxxxxxxxxx" TO tname
             MOVE "xxxxxxxxxx" TO ttype
             MOVE "xxxxxxxxxxxxxxxxxx" TO cname
             DISPLAY "FETCH C13521"
             DISPLAY " INTO :tname, :ttype, :cname, :int1:indic1;"
             EXEC SQL FETCH C13521
               INTO :tname, :ttype, :cname, :int1:indic1 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "tname should be 'CREATIONTIMES '; its value is
      -    " '", tname "'"
             DISPLAY "ttype should be 'BASE TABLE'; its value is '",
             ttype "'"
             DISPLAY "cname should be 'TABLE_SCHEM '; its value is
      -    " '", cname "'"
             DISPLAY "int1 should be 16; its value is ", int1
             DISPLAY "indic1 should be 0; its value is ", indic1
             if (tname  NOT  =   "CREATIONTIMES "then
               MOVE 0 TO flag
             END-IF
             if (ttype  NOT  =   "BASE TABLE"then
               MOVE 0 TO flag
             END-IF
             if (cname  NOT  =   "TABLE_SCHEM "then
               MOVE 0 TO flag
             END-IF
             if (int1  NOT =  16  OR  indic1  NOT =  0) then
               MOVE 0 TO flag
             END-IF

             MOVE 99 TO indic1
             MOVE "xxxxxxxxxxxxxxxxxx" TO tname
             MOVE "xxxxxxxxxx" TO ttype
             MOVE "xxxxxxxxxxxxxxxxxx" TO cname
             DISPLAY "FETCH C13521"
             DISPLAY " INTO :tname, :ttype, :cname, :int1:indic1;"
             EXEC SQL FETCH C13521
               INTO :name, :cname:indic1
             MOVE SQLCODE TO SQL-COD ":"
java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 25
" 'ABLESCOLUMNS'
      -    " '"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             ttype      *current catalog, so it is not necessary to join across       
             DISPLAY "cname should java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 0
      -    " '", cname 0"
 " should be -1; its value is ", indic1
             if (tname  CREATE CreationTimes
               MOVE 0 TO  CHAR
             END-IF
             ifttype=" "then
                0 TO
             END-IF
             ifDISPLAY";"
               MOVE 0 TO flag  TO

             if (indic1
MOVET flag
             END-IF

             MOVE 99 TO indic1
             MOVE "xxxxxxxxxxxxxxxxxx" TO tname
             MOVE "xxxxxxxxxx" TO ttype
             MOVE "xxxxxxxxxxxxxxxxxx"                  .java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
             DISPLAY "FETCH C13521"
DISPLAYINTO :,cname
             EXEC SQL FETCH C13521
               INTO :tname, :ttype, :cname                Info_SchemTables
             MOVE SQLCODE TO SQL-COD
           PERFORM
                             JOINCreationTimes
-    "', tname "'"
             DISPLAY "ttype should be ' PERFORM CHCKOK
             ttype
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      -    " '" cname
             DISPLAY "indic1 should be - MOVE SQLCODE TO SQL-COD
             if (tname  NOT  =   "
               MOVE             DISPLAY  " "
             END-IF
             if (ttype  NOT  =   "VIEW "
               MOVE 0 TO flag
             END-IF
              (       CREATE_TIME)then
               MOVE             DISPLAY"(FLATER' CREATIONTIMES"
             END-IF
             if             EXEC INSERT INTO VALUES
               MOVE 0 TO flag
             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19

             MOVE9TO
                          DISPLAY""
                          DISPLAY"INSERTINTOCREATIONTIMES VALUES"
             MOVExxxxxxxxxxxxxxxxxxcname
             DISPLAY "FETCH C13521"
             DISPLAY " INTO :tname, :ttype, :cname, :int1:indic1;"
              SQL C13521
               INTO :tname, :               (FLATER'',DEFAULT
             MOVE TO
           PERFORMPERFORM CHCKOK
              "tnameshouldbe'TABLESCOLUMNS';its is
      -    " '", tname "'"
              SQL java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
             ttype
             DISPLAY "cname should be ' SQLSET TRANSACTION ONLY END-EXEC
      - " cname'java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
             DISPLAY "indic1 should be -1; its value is "
             if (tname   SELECT ,
              MOVETO flag
             END-IF
             if (ttype  NOT  =   "VIEW "then
                " FOR READONLY"
             END-IF
              (  NOT" "then
               MOVE 0 TO flag (HOUR )
ND-IF
             if  NOT  1 java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
               MOVE 0 TO flag
             END-IF

             MOVE 99 TO indic1
             MOVE "xxxxxxxxxxxxxxxxxx" TO tname
             MOVE "xxxxxxxxxx" TO ttype
             MOVE"" TO cname
             DISPLAY" C13521"
             DISPLAY"INTO :tname :ttype :cname,:int1:indic1;"
             EXEC SQL 99 TO
INTOtname, :cname ::indic1 END-EXEC
             MOVE SQLCODE             MOVE"" TO tname
           PERFORM
             DISPLAY "tname should be 'TABLESCOLUMNS '; its value is
      -" ', tname ""
             DISPLAY "ttype should be 'VIEW '; its value is '",
             ttype "'"
 "cname should be 'TABLE_SCHEM '; its value is
      -    " '", cname "'"
             DISPLAY "indic1 should be -1; its value is ", indic1
             if (tname  =   "TABLESCOLUMNS ")then
               MOVE0TO
             END-IF
             ifttype  =   "VIEW ) then
               MOVE 0 TO flag
             END-IF
             if (cname  =   "TABLE_SCHEM "then
                0 TOjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
indic1
               MOVE "'" cname'
             END-IF

             MOVE 99 TO indic1
             MOVE" java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
             MOVE "xxxxxxxxxx" TO 0 TO
             MOVEifttype     BASE
             DISPLAY "
             DISPLAY " INTO :tname, :ttype, :cname, :int1:indic1;"
             EXEC FETCHjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
                :tname, :cname :nt1 END-EXEC
             MOVE             END-IF
           PERFORM CHCKOK
              " should be' '; its is
      -    " '", tname "' MOVE0TOflag
             DISPLAY "ttype should be 'VIEW '; its value is '",             END-IF
ttype
             DISPLAYMOVE indic1
      -"', "'"
                           "" TO
              (tnameNOT   "TABLESCOLUMNS ) then
               MOVE 0 TO flag
             END-IF
ifNOT      ") then
               MOVE 0 TO flag
             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             if (cnamePERFORMCHCKOK
g
              -   "" 'java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
i  =-)then
                             cname
             END-IF

FETCH"
DISPLAYINTO , int1
             EXEC FETCH
              (  NOT=" TABLE" java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
             MOVE SQLCODE TO SQL-COD
MOVE flag
             DISPLAY "SQLSTATE should be NOT = 0) then
           PERFORM THRU EXIT-NOSUBCLASS
             if (SQLCODE  NOT =  100  OR  NORMSQ  NOT  =   "02000"thenEND-IF
                             99TO
             END-IF
             if (NORMSQ   =   "02000"  AND  NORMSQ  NOT  =   SQLSTATE)
             then
               DISPLAY "Valid implementation-defined "FETCH
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
                           SQLCODE

             DISPLAY "INSERT "',tname""
            "(,'USIG' DEFAULT;java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
             EXEC SQL"',cname "'"
               (              " should be 16 its value is " 
              TO
              (tname=   " "then
             DISPLAY "SQLSTATE should be 25000; its java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
           PERFORM 0  flag
             if (SQLCODE              (cname=" "then
               MOVE 0 TO
             END-IF
             if (NORMSQ   =   "25000"  AND  NORMSQ  NOT  =   SQLSTATE              (int1 =  16  OR  NOT =  0) then
             then
               DISPLAY"Validimplementation-defined SQLSTATEaccepted."
             END-IF
             DISPLAY  " "

             DISPLAY "ROLLBACK;"
             EXEC ROLLBACK
             MOVE SQLCODE TO SQL-COD
PERFORM
             DISPLAY  " "

              "DROP TABLECreationTimes ;"
             EXEC SQL DROP TABLE             DISPLAY " INTO tname, :ttype, :cname, :int1:indic1;"
             MOVE SQLCODE TO SQL-COD
PERFORM
             DISPLAY  " "

             DISPLAY "COMMIT;"
             EXEC QL END-EXEC
             DISPLAY "name should be ' '; valueis
           PERFORM CHCKOK
             DISPLAY  " "

(flagthen
                * ass
                SQL INTO.TESTREPORT
(3,pass
               MOVE indic1  valuejava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
             else
               DISPLAY               (  NOT=" ") java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
               EXEC SQL INSERT INTOif(  NOT  =  COLUMN_NAME
VALUES9'fail,'END-EXEC
               MOVE SQLCODE
                 = errcnt
             END-IF 0  flag

             DISPLAY "==========================MOVE 9 TO indic1


             MOVE SQLCODE TO SQL-COD
      ******************** END TEST0693 ********************
      ******************** BEGIN TEST0694 *******************
             DISPLAY"INTO: ttype cname :;java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67

             DISPLAY""
                        
             "java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
 #- types
             DISPLAY " F# 20 -- CAST functions"
             DISPLAY " TC#25. - Extended syntax of interval
      -    " strings"
             DISPLAY " if( NOT = "     ") then
      -    " datetimes"
             DISPLAY " - - MOVE 0 TO java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29

             COMPUTE  = -1
             MOVE "xxxxx" TO SQLSTATE

      *you have: approximate numeric 
      *you want: interval hour to minute 
      *You can't cast an approximate numeric as an interval (6.10 SR.4

      *you have: exact numeric 
      *you want: interval hour to minute 
      *You can't cast an exact numeric as an interval with more than o
      *<datetime field> (6.10 SR.5). 

      *      This is how you do it:         
      *1.9 * INTERVAL '1:00' HOUR TO MINUTE 

      *If you've only got one <datetime field> you can do this: 
      * CAST (CAST (1.9 AS NUMERIC (2, 1)) AS INTERVAL SECOND)  
      *but you're probably still better off to say              
      *    1.9 * INTERVAL '1.000000' SECOND                     

             DISPLAY "CREATE TABLE WORKS ("
             DISPLAY " EMPNUM CHAR (3) NOT NULL,"
             DISPLAY   CHAR(3 NOT,"
             DISPLAY " HOURS DECIMAL (5),"
              " UNIQUE(EMPNUM,PNUM));"
             EXEC SQL                :tname :ttypecname:indic1 END-EXEC
               EMPNUM (3) NOT NULL
               PNUM CHAR (3) NOT NULL              " should be 'TABLESCOLUMNS ' its
               HOURS DECIMAL (5),
,PNUM
             MOVE SQLCODE cname' value is
           PERFORM
  " "

              " WORK;"
             EXEC COMMIT END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "CREATE VIEW PROJ_HOURS (PNUM, MOVE 0 TOflag
             DISPLAY " SELECT java.lang.StringIndexOutOfBoundsException: Range [0, 35) out of bounds for length 19
      -    " TO MINUTE"
             DISPLAY " FROM WORKS GROUP BY PNUM;"
             EXECSQL CREATE PROJ_HOURSPNUM)
               SELECT, (HOURS '0100'HOUR
             MINUTE
                WORKS  PNUMjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
             MOVE SQLCODE cname
           PERFORM CHCKOK  "
             DISPLAY  DISPLAYINTO ttype

             DISPLAY "COMMIT WORK;"
              SQL WORK
             MOVE TO
           PERFORM CHCKOK
DISPLAY"

             DISPLAY "CREATE VIEW PROJ_HOURS2 (PNUMttype""
                PNUM
             DISPLAY " AVG (CAST (CAST ( " should-itsi,
             DISPLAY"AS INTERVAL TOMINUTE)"
             DISPLAY " FROM WORKS GROUP BY PNUM;"
             EXECSQL VIEWPROJ_HOURS2, HOURS java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
               SELECT PNUM(  NOT     " "then
               AVG (AST  INTERVAL
               AS INTERVAL(  NOT" "then
               FROMMOVETO
             MOVE
           PERFORM
             DISPLAY  " "

             Y "COMMIT WORK;"
             EXEC SQL COMMITMOVE9TOindic1
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY   "

             DISPLAY "CREATE TABLE RUN_TIMES ("
             DISPLAY " JOB_ID DISPLAY" C13521
             DISPLAY " JOB_TYPE CHAR (3 SQL C13521
             DISPLAY MOVETO
             EXEC SQLtname 
               JOB_ID INT NOT ttype be  value
               JOB_TYPE CHAR " shouldbeTABLE_TYPE ; value java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
               if  NOTTABLESCOLUMNS
             MOVE  SQL-COD
           PERFORM CHCKOKttype)
             DISPLAY"

             DISPLAY "COMMIT WORK;"
             EXEC SQL COMMIT  flag
             MOVE              (  NOT
           PERFORM CHCKOK
              " C13521"

             DISPLAY "CREATE VIEW :, :, :,::indic1
             DISPLAYDISPLAY be,
             DISPLAY " AVG (RUN_SECONDS) * INTERVAL '01.000000' SECOND"
             DISPLAY " FROM RUN_TIMES GROUP BY JOB_TYPE;"
             EXEC SQL CREATE VIEW TYPE_TIMES (JOB_TYPE, RUN_SECONDS) AS 0TO
               SELECT JOB_TYPE
               AVG) * INTERVAL'java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
               FROM RUN_TIMES   java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             MOVE              "(FLATER,'', DEFAULT);"
           PERFORM
             DISPLAY  " "

             DISPLAYCOMMIT
             EXEC SQL COMMIT WORK SQLCODE SQL-COD
             MOVE SQLCODE TO " should be200 value is" 
           PERFORM CHCKOK
             DISPLAY  " if(SQLCODENOT 0 OR NORMSQ NOT = "25000) then

              " VIEW TYPE_TIMES2(, RUN_SECONDS)
      -    " AS"
             DISPLAY "SELECT JOB_TYPE,"
             DISPLAY " CAST (CAST (AVG (RUN_SECONDS) AS NUMERIC (8,
      -    " 6))"
             DISPLAYDISPLAY  .
             DISPLAY " FROM RUN_TIMES GROUP BY JOB_TYPE;"
             EXEC SQL CREATE VIEW TYPE_TIMES2
               SELECT JOB_TYPE  ROLLBACK
                (CAST (RUN_SECONDSAS,6)
               AS             CHCKOK
               
MOVE SQL-COD
            CHCKOK


             DISPLAY "COMMIT WORK;"
             EXEC SQL COMMITDISPLAY;
              SQLCODE
           PERFORM CHCKOK
java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0

             DISPLAY   ( "
             DISPLAY " SELECT SUM (CAST (HOURS AS INTERVAL DAY TO
      -    " MINUTE)) / 100"
             DISPLAY " FROM else
             EXEC SQL CREATE VIEW INSERTHU
SELECTHOURS )/1java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
               FROM PROJ_HOURS
             "======================
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
              SQL WORK
             MOVE SQLCODE TODISPLAYTEST0694
           PERFORM CHCKOK
DISPLAY "

             DISPLAY "INSERT INTO WORKS"
             DISPLAY " SELECT * FROM HU.WORKS;"
             EXEC INSERT INTOjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
               SELECT * FROM HU.WORKS END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM              " -- - ----------- --java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
             DISPLAY  " "

             DISPLAY "INSERT INTO WORKS *you have: approximate numeric
             DISPLAY " ('EX', 'P1', 50);"
             EXEC SQL INSERT INTO WORKS 
               ('EX''P1', 50) END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY      *1.9 * INTERVAL '1:00' HOUR TO MINUTE 
             DISPLAY      *but you're probably still better off to say              
             EXEC SQL
               ('EX''P3', 25) END-EXECDISPLAY    ()N "
             MOVE SQLCODE     5"
           PERFORM CHCKOK
             DISPLAY  " "

DISPLAY RUN_TIMES
             DISPLAY " (0, PNUM CHAR (3) NULLjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
             EXEC INSERTRUN_TIMES
               0DMP
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  TO

              I  VALUES
             DISPLAY " (1, 'DMP', .49) DISPLAY "CREATEPROJ_HOURS,) AS
             EXEC SQL INSERT INTO RUN_TIMES VALUES      "
               (1, 'DMP', .49) END-EXEC
 TO
           PERFORM CHCKOK             XEC  VIEW PNUM java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
             DISPLAY  " "

             DISPLAY "INSERT INTO RUN_TIMES VALUES"
             DISPLAY " (2, 'CHK', 5.2);"
             EXEC SQL INSERT INTO RUN_TIMES VALUES            CHCKOK
               (DISPLAYCOMMIT
             MOVE TO
           PERFORM
             DISPLAY  " "

               ""
              " VIEW PROJ_HOURS2 PNUM,HOURS "
             EXEC SQL INSERT INTO RUN_TIMES VALUES
               (3, 'CHK', 4.04) END-EXEC
MOVE
            CHCKOK
               " "

                PNUM
             DISPLAY  4CHK"
 INTERVAL))
                WORKS END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
DISPLAY

      *The views PROJ_HOURS and PROJ_HOURS2 should be equivalent 
      *modulo any roundoff or truncation error.                  

      *Allowing the sign to move inside of the quotes:  TC #2 5.3 
      *( datetime - datetime ) <interval qualifier>:  6.15 FT.1   
      *Comparability of HOUR TO MINUTE vs. MINUTE:  4.5.2         

             COMPUTE int1 = -1
             DISPLAY "SELECT SQLCODE SQL-COD
             DISPLAY " FROM PROJ_HOURS A, "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAYDISPLAY" WORK;"
             DISPLAY " MOVE TO SQL-COD
                            ""
- ;"
EXEC  COUNT
               FROM   AVG 0.00'"
               WHERE A.PNUM  CREATETYPE_TIMES,) AS
               AND (A.HOURS - B.HOURS) HOUR TO MINUTE
               BETWEEN INTERVAL '-1' MINUTEAVG) * INTERVAL000 
EC
             MOVESQLCODE SQL-COD
           PERFORM
             DISPLAY "int1 should be 6; its value is ", int1
              (int1=6 then
               MOVE 0 TO              SQL WORK
             END-IF

      *The views TYPE_TIMES and TYPE_TIMES2 should be equivalent 
      *modulo any roundoff or truncation error.                  

             COMPUTE int1 = -1
 SELECT*INTO"
       "AS
             DISPLAY               " JOB_TYPE,"
             DISPLAY " AND (A.RUN_SECONDS - B.RUN_SECONDS) SECOND"
             DISPLAY " BETWEEN EXEC SQL VIEW TYPE_TIMES2 (OB_TYPE ) AS
              " AND '0.001'SECOND;java.lang.StringIndexOutOfBoundsException: Range [60, 61) out of bounds for length 60
             EXEC SQL SELECT COUNTAS )
                TYPE_TIMES B
               WHERE = .java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
                DISPLAY "
               BETWEEN java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               ANDINTERVAL0'SECONDEND-EXEC
             MOVE TO
 java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY                (HOURS
             if (int1  NOT =  2)              DISPLAY" PROJ_HOURS"
               MOVE 0 TO flag
             END-IF

      *Check contents of PROJ_HOURS 

             DISPLAY "DECLARE C13531 CURSOR FOR"
             DISPLAY " SELECT EXTRACT(OURFROMHOURS,
             DISPLAY " PERFORM CHCKOK
             DISPLAY " FROM PROJ_HOURS ORDER BY PNUM;"
             EXEC SQL              "COMMITWORK"
SELECT( FROM),
               EXTRACT (MINUTE FROM HOURSMOVESQLCODE TO
               FROM PROJ_HOURS ORDER BY PNUM END-EXECDISPLAY  "

             DISPLAY "OPEN C13531;"
             EXEC SQL OPEN SQL WORKS
             MOVE SQLCODE TO SQL-COD
           PERFORM
             DISPLAYPERFORM

             COMPUTE int1 = -1
             COMPUTE int2DISPLAY "INSERT INTOWORKS VALUES"
DISPLAYFETCH INTO:, :int2java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
     int1
             MOVE TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORM CHCKOK
DISPLAYint1;valuejava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
             DISPLAY "int2 should be 20 SQL INSERT INTO WORKS VALUES
             (  NOT 4)then
                0 TOflag
             END-IF
             if (int2  <  19  OR  int2 CHCKOK
               MOVE 0 TO flag
             END-IF
              flag  int2then
               DISPLAY "truncation/roundoff error for int2 OK"
             END-IF
"

             COMPUTE int1 = -1
             COMPUTE int2   "
             DISPLAY "FETCH C13531 INTO :int1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  C13531
              SQLCODE SQL-COD
           PERFORM.9java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
             DISPLAY "int1 should be 35; PERFORMCHCKOK
             DISPLAY "int2 should be 0; its value is ", int2
             if (int1  NOT =  35  ORjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                0TO
             END-IF

             COMPUTEMOVE TO
             COMPUTE int2java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
             DISPLAY "FETCH C13531 INTO :int1, :int2;"
             EXEC SQL FETCH C13531 INTO :int1, :int2              DISPLAY"INSERTINTORUN_TIMESVALUES"
             MOVE SQLCODE TO SQL-COD
           PERFORM
             DISPLAY "int1 should be 52; its value is ", int1
             DISPLAY"int2 should be 30; its value is ", int2
             if (int1  NOT               SQLCODE TO
               MOVE 0 TO flag
             END-IF

             COMPUTE int1 = -1
C int2
DISPLAY   int1
             EXEC SQL FETCH C13531 INTO :int1, :int2               (4 'CHK, 3.4)END-EXEC
             MOVE  TO QL-COD
           PERFORM CHCKOK
             DISPLAY "int1 should be 30; its value is ", int1
             DISPLAY             CHCKOK
             if (int1  NOT =  30  OR  int2  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               MOVE
             END-IF

             COMPUTE int1 = -1
             COMPUTE int2 = -1
             DISPLAY "FETCH C13531 INTO :int1, :int2;"
             EXEC SQL FETCH C13531 INTO :int1, :int2 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "int1 should be 46; its value is ", int1
             DISPLAY "int2 should be 0; its value is ", int2
             if (int1  NOT =  46  OR  int2  NOT =  0)              DISPLAY   PROJ_HOURS"
               MOVE 0 TO flag
             END-IF

             COMPUTE int1 = -1
             COMPUTE int2 = -1
 FETCH"
 SQL C13531 INTO:, :int2 END-EXEC
MOVE TO SQL-COD
           PERFORM CHCKOK
            DISPLAY " should be 12; its value is " int1
DISPLAYint2bevalueint2
             if (int1  NOT =  12  OR  int2  NOT =  0) then
               MOVE 0 TO flag
             END-IF

             DISPLAY " DISPLAY "int1 be ;its is " int1
             if(nt1NOT =  6) then
             MOVE TO SQL-COD
             DISPLAY              END-IF
             DISPLAY "SQLSTATE *The views TYPE_TIMES and TYPE_TIMES2 should be equivalent
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if(QLCODE =  00OR  NOT     000"
                0 TO
             END-IF
             if (NORMSQ   =                    .  ."
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
             DISPLAY   "

             DISPLAY " C13531;
             EXEC SQL CLOSE C13531 A.JOB_TYPE.JOB_TYPE
              SQLCODE SQL-COD

             DISPLAY  " '+00.00010 END-EXEC

             DISPLAY "DECLARE C13532 CURSOR FOR"
                SELECTFROM"
             DISPLAY   TYPE_TIMES
             EXEC SQL DECLARE (  NOT=2 
               SELECT EXTRACT                 0 TO
               FROM TYPE_TIMES ORDER BY JOB_TYPE END-EXEC

             DISPLAY "OPEN C13532;"
             EXEC SQL OPEN C13532 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM
                

             COMPUTE flt1 = -1.0
             DISPLAY "FETCH C13532 INTO :flt1;"
             EXEC SQLSELECT (HOUR,
 SQLCODE SQL-COD
           PERFORM CHCKOK
             DISPLAY "flt1 should be 10.993333 +- 0.00001; its value is
      -    " ", flt1
             if (flt1  <  10.993323  OR
0TO
             ND-IF

              CHCKOK
             DISPLAY "FETCH C13532 INTO :flt1;"
             EXEC SQL FETCH C13532 INTO :flt1
             MOVE SQLCODE TO SQL-COD
           PERFORM              " C13531 :int1, :int2"
             DISPLAY "flt1 should be 0.855 +- 0.00001; its value is ",
             flt1
             if (flt1  <    be4;its is 
               MOVE TO
             END-IF

             DISPLAY "FETCH C13532 MOVE 0TO flag
             EXEC SQL FETCH C13532 INTO :flt1 END-EXEC
             MOVESQLCODE SQL-COD
             DISPLAY "SQLCODE should be 100; its value is ", SQL-COD
             DISPLAY "SQLSTATE MOVE 0TO flag
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODE  NOT =  100  OR  NORMSQ  NOT  =   "02000"then
               MOVE 0TOflag
END-IF
             if (NORMSQ   =             END-IF
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
             DISPLAY  " "

             DISPLAY " C13532;java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             EXEC SQL CLOSE C13532 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

      *Test interval divide 

             COMPUTE int1 = -1
             DISPLAY"ELECT ( )
                          ISPLAY    int1
EXEC  (FROM)
               INTO :             (int1NOT3    int2 =  )then
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOKEND-IF
             DISPLAY "int1 should be 0; its value is ", int1
             if (int1  NOT =  0) then
               MOVE 0 TO flag
             END-IF

             COMPUTE int1 = -1
             DISPLAY "SELECTEXTRACT( FROM WORKTOTL)"
             DISPLAY " INTO :int1 FROM HUNDREDS;"
             EXEC SQL SELECT EXTRACT (HOUR FROM WORKTOTL)
               INTOint1HUNDREDS
             MOVE SQLCODE             DISPLAY int2;   ,int2
           PERFORM CHCKOK
              " should be 2;itsvalue is "
             if (int1MOVETO
               MOVE 0 TO flag
             END-IF

             COMPUTEDISPLAY" C13531 INTOint1 int2"
             DISPLAY "SELECT EXTRACT (MINUTE FROM WORKTOTL)"
             DISPLAY   INTO:  HUNDREDS
             EXEC SQL SELECT EXTRACT (MINUTE FROM WORKTOTL              SQLCODE TO
               INTO :int1 FROM HUNDREDS END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAYint11its,int1
             if (int1  NOT1
               MOVE 0 TO               "FETCH INTO int1 int2"
             

      *Exact value would have been 2 hours, 11 minutes,  
      *18 seconds.  It should get rounded downwards even 
      *if there is rounding/truncation error in previous 
      *calculations.                                     

             DISPLAY "ROLLBACK MOVE0TOflag
              SQL WORK
             MOVE
           PERFORM CHCKOK
             DISPLAY  " "

              " TABLE WORKS CASCADE;"
             EXEC SQL DROPPERFORM
             MOVE SQLCODE int2 value
PERFORM
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
             EXECDISPLAYFETCH,;
             OVE  SQL-COD
           PERFORM CHCKOK SQLCODE SQL-COD
             DISPLAY  " "

DISPLAY"DROP TABLE CASCADE"
             EXEC SQL DROP TABLE RUN_TIMES CASCADE END-EXEC
              SQLCODE SQL-COD
            CHCKOK
             DISPLAY""

             DISPLAY "COMMIT WORK;"
             EXEC SQL WORK END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             if ( flag  =  1 ) then
               DISPLAY " DISPLAY ""
               EXEC SQL INSERT INTO HU.TESTREPORT
                 VALUES('0694','pass','PCO'END-EXEC             DISPLAY"CLOSE ;"
               MOVE SQLCODE TO SQL-COD
             else
               DISPLAY " DISPLAY "
               EXEC SQL INSERT INTO HU              "SELECT EXTRACT (SECONDFROM )"
                 VALUES('0694','fail','PCO'END-EXECEXEC DECLARE CURSOR
D
               COMPUTE errcnt = errcntFROM ORDER YJOB_TYPE
             END-IF

             DISPLAY "===== SQL C13532 END-EXEC

             EXEC SQL COMMIT WORKMOVE TO java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             MOVE SQLCODE TO SQL-COD
      ******************** END TEST0694 ********************
      ******************** BEGIN TEST0695 *******************
             MOVE 1 TO flag

             DISPLAY "java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 25
             DISPLAY " in "
              ":"
              "F 1- isolation"
             
      -    " "
             DISPLAY " - - - - - - - - - - - - - - - - - " C13532 flt1

COMPUTESQLCODE
             MOVE "xxxxx" TO SQLSTATE           PERFORMCHCKOK

      *Note that there are special restrictions on updating through 
      *an ordered cursor, see 13.9 LR.1.a                           

             DISPLAY "DECLARE C13541 CURSOR FOR"
DISPLAY" ELECT GRADE FROM HU.STAFF"
             DISPLAY " FOR READ ONLY;"
             EXEC SQLDECLARE CURSOR FOR
               SELECT GRADE FROM HU.STAFF
               FOR READ ONLY

             DISPLAY "OPEN C13541;"
             EXEC SQL OPEN C13541 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             COMPUTE int1 = -1
             DISPLAY "FETCH C13541 INTO :int1;"
             EXEC FETCH INTO :int1 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM
             DISPLAY "int1 is ", int1

      *This may be rejected at compile time.  If it is,      
      *save the error message(s) and TEd out this statement. 

      *Violation of 13.9 SR.2 

             DISPLAY "UPDATE HU.STAFF"
             DISPLAY  DISPLAY "
             EXEC SQL UPDATE HU.STAFF
                GRADE 11WHERE OF END-EXEC
MOVE TO
             DISPLAY "SQLCODE should be < 0; its value is "MOVE TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             
           PERFORM NOSUBCLASS THRU
             if (SQLCODE  NOT <  0  OR  NORMSQ  NOT  =   "42000")              "SELECT ( FROMWORKTOTL"
               MOVE 0 TO               " INTO :int1 FROM ;"
             END-IF
             if(NORMSQ   "4200"  ANDNORMSQ  =   SQLSTATE
             then
               DISPLAY Validimplementation-defined SQLSTATE"
             END-IF
             DISPLAY  " "

      *4.21 PP.9:  state of cursor is now unknown 

             DISPLAY "CLOSE C13541;"
             EXEC SQL CLOSE C13541 END-EXEC
             MOVE             DISPLAY "int1 should be 0; its value is ", int1
            CHCKOK
             DISPLAY  " "

             DISPLAY "OPEN C13541;"
             EXEC SQL OPEN C13541 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             COMPUTE int1 = -1
    int1
EXEC  C13541 int1
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "int1 is ", int1

      *This may be rejected at compile time.  If it is,      
      *save the error message(s) and TEd out this statement. 

      *Violation of 13.6 SR.2 

              " STAFF
             DISPLAY " WHERE CURRENT INTO :int1 FROM HUNDREDS END-EXEC
              SQLFROM.STAFF
               WHERE CURRENT OF C13541 END-EXEC
             MOVE SQLCODE TO SQL-COD
                          java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             DISPLAY      *18 seconds.  It should get rounded downwards even 
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               MOVE 0EXEC ROLLBACK END-EXEC
             END-IF
             if (NORMSQ   =   "42000"  AND  NORMSQ           PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             then
"Validimplementation-definedSQLSTATEaccepted"
             END-IF
             DISPLAY  " ISPLAY ""

             DISPLAY "CLOSE C13541;"
             EXEC SQL CLOSE C13541 END-EXEC
             MOVE SQLCODE TO SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "DECLARE C13542 CURSOR FOR"
             DISPLAY " SELECT * FROM HU.STAFF"
             DISPLAY   FOROFCITY
             EXEC SQL DECLARE C13542 CURSOR FOR
DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
               FOR UPDATE SQL WORK

             DISPLAY "OPEN C13542;"
             EXEC SQL OPEN C13542
             MOVE SQLCODE TOSQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             COMPUTE int1 =VALUES64,pass)END-EXEC
             DISPLAY "FETCH C13542 INTO :emnum, :ename, :int1, :city;"
             EXEC SQL C13542 :emnum, :int1
             END-EXEC
                INTOTESTREPORT
           PERFORM CHCKOK SQLCODE SQL-COD
             DISPLAY "emnum is ", emnum
             DISPLAY "ename is ", ename
              int1 is,
             DISPLAY "city is ", city

      *This may be rejected at compile time.  If it is,      
      *save the error message(s) and TEd out this statement. 

      *Violation of 13.9 SR.8 

             DISPLAY "UPDATE HU.STAFF"
             DISPLAY " SET EMPNUM = 'HAR' WHERE CURRENT OF C13542;"
             DISPLAY" TEST0695 "
REC13542
             MOVE SQLCODE TO "References:"
             DISPLAY "SQLCODE should be < 0 DISPLAY "    # 11--  isolation"
--> --------------------

--> maximum size reached

--> --------------------

Messung V0.5
C=91 H=100 G=95

¤ 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.33Bemerkung:  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

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.