Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/COBOL/Test-Suite/SQL P/dml100-186/     Datei vom 4.1.2008 mit Größe 72 kB image not shown  

Quelle  dml135.cob   Sprache: Cobol

 
       IDENTIFICATIONDIVISION
PROGRAM-ID.DML135.
       ENVIRONMENT DIVISION.
CONFIGURATION.
       SOURCE-COMPUTER.
       OBJECT-COMPUTER  xyz.
       DATA DIVISION.
       WORKING-STORAGE SECTION.


      * EMBEDDED COBOL (file "DML135.PCO")


      ****************************************************************
      *                                                              
      *                 COMMENT SECTION                              
      *                                                              
      * DATE 1994/8/30 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.
      *                                                              
      * 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                                              
      *                                                              
      ****************************************************************



           EXEC SQL BEGIN DECLARE SECTION END-EXEC
       01  SQLCODE            *  NIST assumes no responsibility for any party's use of        
       01  SQLSTATE PIC  X(5).
       01  uid PIC  X(18).
       01  uidx PIC  X(18).
       01  int1 PIC S9      * WRITTEN BY:  David W. Flater                                 
       01  int2 PIC S9(9)      *                                                              
       01  tchar      *                                                              
       01  longst 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      *   ANSI SQL-1992                                              
       01  emnum PIC  X(3).
       01  ename PIC  X(20).
       01  city PIC      ****************************************************************
              SQL END DECLARE SECTIONEND-EXEC
       01  norm1 PIC S9(9) DISPLAY SIGN LEADING SEPARATE.
       01  norm2 PIC S9(9) DISPLAY SIGN LEADING SEPARATE.
       01  ALPNUM-TABLE VALUE IS
               "01234ABCDEFGH56789IJKLMNOPQRSTUVWXYZ".
           5   PIC X OCCURS36 TIMES       1  SQLSTATE  X(5)
       0  NORMSQ01   PIC  X(18).
           05NORMSQX X  5 TIMES
       01  errcnt       1int2(9)DISPLAY LEADINGSEPARATE
      *date_time declaration 
       01  TO-DAY PIClongst4)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
0   PIC(.
       01  flag PICX3)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27

       0   PIC(9SIGN .

       PROCEDURE           PIC(9   LEADING.
       P0

             MOVE "TOuid
CALL" USING uid
             MOVE              PIC  36 IMESNORMSQ5NORMSQX 5 .
              SQL  INTO: HUjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
              SQLCODE
             EXEC SQLflag()DISPLAY LEADING.
              SQLCODE
             if
               DISPLAY .
-"java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
            STOP RUNMOVE ,  uidx
             END-IF
             MOVE 0 TO errcnt

             DISPLAY
           SQL,.,Embedded
              SQLCODE SQL-COD
           5-byte
             DISPLAY "TEd Version #"
      *date_time print 
           ACCEPT TO-DAY FROM DATE
           ACCEPT THE-TIME RUN
           DISPLAY               0 errcnt

      ******************** BEGIN TEST0692 *******************
             MOVE 1 TO flag

             DISPLAYDISPLAY
             DISPLAY TEd
             FROM java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
DISPLAYF  - SQL
DISPLAY3manipulation
             DISPLAY " Fjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 5 identifiers
 "F 1 -PRIMARYKEY enhancementjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
             DISPLAY " F F#5- "
             DISPLAY " F# 22 -- Explicit defaults"
             DISPLAY " F# 2 DISPLAY #1 -deleteactionsjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
             DISPLAY     #2   "

             COMPUTE SQLCODE = -1
             COMPUTE = -1

             DISPLAY "CREATE
DISPLAYPNUM(  KEY,java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
             DISPLAY " PNAME CHAR(20),DISPLAY"PNAME(20),java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
DISPLAYPTYPE6     'Code'"
             DISPLAY " BUDGET DECIMAL(9) DEFAULT 10000,"
DISPLAYCITY5    'Berlin'"
             EXEC CREATEProj
P     CHAR KEY
               PNAME    CHAR    CHAR
    CHAR 'Code,
               BUDGET   DECIMAL(9) DEFAULT 10000,
                    CHAR 'Berlin' 
             MOVE TO
           PERFORM
DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY "COMMIT;"
             EXECSQL COMMIT
             MOVE              SQLCODE SQL-CODPERFORM
 CHCKOK
             DISPLAY  " "

             DISPLAY    ,*  """"
             DISPLAY SQL  "PTypes"("", NUM
             DISPLAY " GROUP BY PTYPE;"
pes", NUM java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
SELECTCOUNT)FROM"Proj"
               GROUP BY PTYPE END-EXEC
             MOVE SQL END-EXEC
            CHCKOK
             DISPLAY  " "

             DISPLAY "COMMIT; PERFORMCHCKOK
             EXEC SQL  " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
                java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             SQL VIEWAS
             DISPLAY  " "

              CREATE
             DISPLAY " NUM >1END-EXEC
             DISPLAY " WHERE NUM > 1;"
              SQL VIEWAS
               SELECT *P CHCKOK
               WHERE NUM
             MOVE SQLCODE              EXEC SQL COMMIT
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             EXEC SQL COMMIT END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORMCHCKOK
             DISPLAY             DISPLAY" ""Proj"" ON DELETE CASCADE"

             DISPLAY "CREATE TABLE ""Works"" ("
             DISPLAY"EMPNUMCHAR(3)"
             DISPLAY " PNUM CHAR(3 SQL CREATE "Works java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
DISPLAY " ""Proj"" ON DELETE CASCADE,"
             DISPLAY " HOURS DECIMAL(5),"
             DISPLAY " PRIMARY KEY (EMPNUM,PNUM));"
             EXEC SQL                 "Proj" ONDELETE,
               EMPNUM   CHAR(3),
               PNUM(3)
               REFERENCES "Proj" ON DELETE CASCADE,
               HOURS    DECIMAL5)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
               PRIMARY KEY (EMPNUM,PNUM)) END-EXEC
             MOVE SQLCODE SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "COMMIT;"

             MOVE SQLCODE TO SQL-COD
                        MOVETO
             DISPLAY  ""

             DISPLAY "CREATE VIEW ""PStaff"" (PNUM, NUM) AS"
DISPLAYSELECTFROMWorks
             DISPLAY " WHERE HOURS >= 20"
             DISPLAY " GROUP BY PNUM;"
             EXEC SQLjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             "  BY ;"
W HOURSjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
               GROUP BY                HOURS0
             MOVE SQLCODE SQLCODESQL-COD
            CHCKOK
DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY "COMMIT;"
             EXEC SQL COMMIT END-EXEC
             MOVE TO
           PERFORM
             ISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY "INSERT INTO ""Proj"""
DISPLAYS  FROM"
EXEC INSERT Proj
               SELECT Hu END-EXEC
             SQLCODEjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORM
             DISPLAY              " '' FROB,)"

              SQL "" (PNUM, BUDGET
             DISPLAY" ('P7', '', DEFAULT);"
             EXEC SQL  TO
               VALUES FROB) 
             MOVE SQLCODE
           PERFORM              INSERT""" (, PNAME,BUDGET"
             DISPLAY  " " " ('P8' '', 15000);"

             DISPLAY "INSERT INTO ""Proj"" (PNUM, PNAME, BUDGET)"
             DISPLAY   P8
SQLINTO)
               VALUESSQLCODESQL-COD
             SQLCODESQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT
;
             EXEC SQL INSERT               " ('P9' 'ORB,DEFAULT);"
               VALUES,'' )END-EXEC
             MOVE SQLCODE TO                ('P9' FORB)END-EXEC
            
             DISPLAY   java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY "INSERT INTO ""Proj"" VALUES"
             DISPLAY " ('P10', 'ROBF', 'Docs', 1000, 'Sofia');"
             EXEC SQL INSERT INTO "Proj" VALUES
               ('P10''ROBF',              EXEC INSERT INTO "" VALUES
              SQLCODETO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO ""Works"""
             DISPLAY    * Hu
                         CHCKOK
               SELECT             DISPLAY""
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "DECLARE C13511 CURSORjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY " SELECT * FROM PTYPES ORDER BY DISPLAY " SELECT HuWorks
             EXEC DECLARE CURSOR FOR
               SELECTSELECT FROM.WorksEND-EXEC

             DISPLAY "OPEN C13511 PERFORM CHCKOK
             EXEC SQLOPEN END-EXEC
             MOVE SQLCODE TO 
           java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             MOVE "xxxxxx" TO tchar
             COMPUTE int1 = -1
             DISPLAY "FETCH C13511 INTO :tchar,
                C13511int1
SQLCODE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORM CHCKOK
DISPLAY   Test "
             "'"
             DISPLAYCOMPUTE  = -1
Test  int1  )then
                 java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19

             MOVE "xxxxxx" TO tchar
             COMPUTE int1 = -1
             DISPLAY "FETCH C13511 INTO :tchar, :int1;"
             EXEC SQL FETCHif(  NOT  =   Test  int1  2 then
             MOVE TO
           PERFORM
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
tchar
              " should be ;itsvalueis" java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
             if(  NOT   Design  NOT)then
               MOVE 0 TOMOVE TO
             END-IF

             MOVE "xxxxxx" TO tchar
             COMPUTE int1 = -1
DISPLAYFETCH:;java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
             EXEC SQL FETCH (  NOT   Design  NOT  3)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
              SQLCODEjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36

             DISPLAY               int1
             tchar "'"
              " should be 4 value is " int1
             if (tchar  NOT  =   "Code "  OR  int1  NOT =  4) then
               MOVETO


              "tcharshould be' '; itsvalueis',java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
               FETCH :, :int1
             MOVE=    int1
             DISPLAY                0 flag
             DISPLAY   tchar
PERFORM THRU
             if (SQLCODE SQLCODE 
                0  flag
END-IF
             PERFORM THRU
then
                Valid"
             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             DISPLAY  " "

             DISPLAY "CLOSE C13511;"
             EXEC   java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
MOVE  SQL-COD
           PERFORM             MOVE S TO
                java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

      *Grouped dynamic cursor over a grouped view 

             EXEC
             OVE SQLCODE SQL-COD
             MOVE TO SQL-COD
               SELECTCOUNTFROM ""' ||
               'GROUP BYNUMORDERBY NUM'
               ) END-EXEC' GROUP BY NUM ORDER BY NUM'
             MOVE TO
EXEC SELECT INTO FROM  END-EXEC
             MOVE TO

DISPLAY=" ""

             DISPLAY "=""",longst
E     longst
             MOVE TO
            CHCKOK
 CHCKOK

             DISPLAY "DECLARE CURSOR FOR S13512;java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
             EXEC             DISPLAY " C13512 CURSOR FOR S13512;"

             DISPLAY "OPEN C13512;"
             EXEC SQL OPEN " C13512;"
              SQLCODE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORM            CHCKOK
             DISPLAY  " "

             COMPUTE int1
             COMPUTE int2             EXEC SQL FETC INTO, :int2
             DISPLAY CHCKOK
EXEC  int1
             MOVE   ;value
           PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY               " C13512 INTO :int1 int2"
             DISPLAYint2 " java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
ifint1        NOT=2 java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
                0 O java.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29
             END-IF

             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             COMPUTE int2 =1
DISPLAYC13512
             EXEC SQLEXEC FETCH :, :int2
              SQLCODE
           PERFORM CHCKOKjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAYshouldjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
"int2 be 2; value is
             if (int1  M 0 TO
               MOVE 0 TO
             END-IF

             COMPUTE int1 SQLCODE SQL-COD
                1
             DISPLAY "FETCH C13512 INTO SQLSTATEshould 20 ,java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
             EXEC (  NOT0    NORMSQ00"
             MOVE SQLCODE 0 TO
           PERFORM CHCKOK
DISPLAYint1    ,int1
             DISPLAY "int2 should be 1; its value is java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
             if (int1  NOT =  4  OR  int2  NOT =  1) java.lang.StringIndexOutOfBoundsException: Range [0, 57) out of bounds for length 0
               MOVE             DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
END-IF

             DISPLAY "FETCH C13512 INTO :int1, :int2;"
             EXEC SQL FETCH C13512 INTO :int1, :int2 END-EXEC
             MOVE TO java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             DISPLAY "SQLCODE should be SQLCODE TO SQL-COD
             DISPLAY "QLSTATEshouldbe020;itsvalueis" java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
           
 (SQLCODE =  10  OR  NOT="200" then
               MOVE flag
             END-IF
              (   =   "20 NOT )
             then
                " "
             END-IF
             DISPLAY  " "

 "CLOSE C13512;"
             EXEC SQL CLOSE C13512 END-EXEC
             MOVETO
PERFORM
D  " "

      *Cascaded delete -- ditch all that costly Design work 

             DISPLAY "DELETE (tcharNOT="  " ORint1NOT = )then
             EXEC SQL DELETE FROM "Proj" WHERE PTYPE = 'Design' 
             END-EXEC
             MOVE SQLCODE xxxxxx
           PERFORM int1java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
             DISPLAY"

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

             MOVE "xxxxxx" TO tchar
             COMPUTE int1 = -1
DISPLAYFETCH INTO :tchar int1
             EXEC SQL              iftchar   Code  int1
             MOVE SQL-COD
           PERFORM CHCKOK
             DISPLAY "tchar should be ' EXEC SQLFETCH C13511 INTO:tcharint1END-EXEC
 "'"
             DISPLAY "int1 should be 2 SQLCODEshouldbe 0; "should,java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
             if (tchar  NOT   flag
                0TO
             END-IF

             MOVE "xxxxxx" TO tchar
             END-IF
             DISPLAY "FETCHjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             EXEC               SQLCODE
             MOVE SQLCODE   java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
 CHCKOK
             DISPLAY "tchar MOVESQLCODE TO SQL-COD
             tchar CHCKOK
             DISPLAY "int1 should be 4; its java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             if (tcharFETCH:;java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
               MOVE flag
END-IF

             DISPLAY "FETCH C13511 INTO :tchar, :int1;" CHCKOK
EXEC   tchar
             MOVE               " should be ;itsvalueis" 
             DISPLAY   10   s" java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
             DISPLAY "SQLSTATE should be 0200 java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
           PERFORM = 1
 (  NOT10OR  NOT020"
               MOVE 0 TO  FETCH :,int2
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             if  "int2 be 1;its value is,
             java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
               DISPLAY
             END-IF
DISPLAY"

             DISPLAY "CLOSE C13511;"
 C13511
             MOVE SQLCODE              " should be 0;itsvalue is" java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
PERFORM
             DISPLAY  " "

             DISPLAY "OPEN java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
EXEC OPEN java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
             MOVE SQLCODE 
           PERFORM CHCKOK
             DISPLAY  " "

             COMPUTE int1 = -1
             COMPUTE = -1
             DISPLAY C13512
              SQL INTO, int2
             DISPLAY;
            CHCKOK
DISPLAYshouldis
             DISPLAY "int2 should be 2; its value is ", int2 CHCKOK
             if(int1    OR NOT)then
               MOVE 0 TO flag
             END-IF

             COMPUTE int1              "DROP TABLE ""Proj"" CASCADE"
COMPUTE = -1
             DISPLAY              SQLCODE
             EXEC SQLDISPLAY   "
             MOVE SQLCODE TO
           PERFORM CHCKOK
             DISPLAYint1   ,java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
             DISPLAY "int2 should be 1; its value is ", int2               " "
              (  NOT=  4 OR  NOT  )then
               MOVE flag
             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19

             DISPLAY "FETCH C13512 INTO :int1,
             EXEC SQL FETCH C13512 COMMIT
              SQLCODE
             DISPLAY "SQLCODEPERFORMCHCKOK
             DISPLAY "SQLSTATE should be 020java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            NOSUBCLASS
             if (SQLCODE  NOT('6'pass
                0TO
             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             if (NORMSQ INSERT HU
             then('062,fail'PCO
               DISPLAY SQLSTATE
             END-IF
             DISPLAY  " "

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

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

      *TEd hook ababababa 
             DISPLAY "DROP TABLE ""Proj"" CASCADE;"
             EXEC SQL DROP TABLE "Proj" CASCADE 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 "DROP TABLE ""Works"" CASCADE;"
             EXEC SQL DROP TABLE "Works" CASCADE END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

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

             if ( flag              SQL  WORK END-EXEC
               DISPLAY" ** pass** "
               EXEC SQL      ******************** END TEST0692 ********************
                 VALUES('0692','pass','PCO'END-EXEC
               MOVE TO SQL-COD
             else
               DISPLAY " "                   "

                 VALUES('06 "References"
               MOVE SQLCODE TO SQL-COD
               COMPUTE errcnt = errcnt + 1
             END-IF

                   *TABLE_CAT.                                                   

             EXEC SQLDISPLAY  TABLE_SCHEM)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
             MOVE SQLCODE TO SQL-COD
      ******************** END TEST0692 ********************
      ******************** BEGIN TEST0693 *******************
             MOVE 1 TO flag

             DISPLAY " TEST0693 "
             DISPLAY:, :ttype, :int1 END-EXEC
             DISPLAYReferences
             DISPLAY "
             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 " - - DISPLAY tname should be 'ABLESCOLUMNS ;itsvalueis

             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 "CREATE TABLE CreationTimes ("
             DISPLAY " TABLE_SCHEM CHAR (50),"
             DISPLAY " TABLE_NAME CHAR(5),
             DISPLAY " CREATE_TIME TIMESTAMP);"             DISPLAYindic1 value
             EXECSQL TABLE (
               TABLE_SCHEM CHAR (50),
               TABLE_NAME (50),
               CREATE_TIME TIMESTAMP) END-EXEC
             MOVE SQLCODE TO (  NOT     VIEW
           PERFORM CHCKOKMOVETO flag
             DISPLAYEND-IF

             DISPLAY COMMIT
             EXEC SQL COMMIT END-EXEC
             MOVESQLCODE SQL-COD
           PERFORM CHCKOK
             DISPLAY             END-IF

                0 Oflag
             DISPLAY " SELECTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY " TABLE_TYPE, COLUMN_NAME, CREATE_TIME"
DISPLAY"FROMInfo_SchemTables"
             DISPLAY " NATURAL JOIN Info_Schem.Columns"
             DISPLAY " NATURAL JOIN CreationTimes;"
             EXEC SQL CREATE VIEW TablesColumns AS
               SELECT TABLE_SCHEM, TABLE_NAME              " :tname, :type,:, :int1:indic1;"
               TABLE_TYPE, COLUMN_NAME, CREATE_TIME
FROM.java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
               NATURAL CHCKOK
NATURAL  END-EXEC
             MOVE SQLCODE      ""tname

             DISPLAY  " "'"

             DISPLAY "COMMIT;"
             EXEC " "'"
SQLCODE
           PERFORM CHCKOK
DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

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

             DISPLAY "INSERTifcnameNOT="       "
   ','',
             DISPLAY 
 SQL CREATIONTIMES
               ('FLATER''CREATIONTIMES',
               TIMESTAMP 'END-IF
             MOVE SQLCODE TO SQL-COD
           PERFORM 9  indic1
  "

   CREATIONTIMES
             DISPLAY " "" TO java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
             EXECEXEC FETCH
(', TABLESCOLUMNS,) END-EXEC
             MOVE SQLCODE TO SQLCODE SQL-COD
           PERFORM
             DISPLAY  DISPLAY         value

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

             DISPLAY "SET TRANSACTION READ ONLY;"
EXEC SETREADEND-EXEC
             MOVE SQLCODE TO SQL-COD    " ',cname ""
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "DECLARE C13521 CURSOR FOR"
             DISPLAY"SELECT TABLE_NAME, TABLE_TYPE,COLUMN_NAME"
               0 TO
             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             DISPLAY " ORDER BY TABLE_NAME, COLUMN_NAME"
SPLAYFOR ;
             EXEC SQL DECLARE C13521END-IF
               SELECTifcname  =   TABLE_NAMEjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
               EXTRACT FROMCREATE_TIME
             E
               ORDER BY TABLE_NAME (indic1 =-)then
               FOR READ ONLY END-EXEC

             DISPLAY "OPEN C13521;"
             EXECjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
                           xxxxxxxxxxxxxxxxxx
            FETCH
    ,,: int1

             MOVE int1
             MOVE 99 TO                :, :ttype,int1
              xxxxxxxxxxxxxxxxxxtname
             MOVE "xxxxxxxxxx" TO ttype CHCKOK
             MOVE "xxxxxxxxxxxxxxxxxx" TO    'tname'
             DISPLAY "FETCH C13521"
                          DISPLAY       ;java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
             EXEC   NOT)
               INTO   flag
             MOVE SQLCODE (  NOT"java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
           PERFORM  NOTthen
MOVETO flag
      -    " '", tname "'"
             DISPLAY "ttype should be END-IF
             ttype "'"
             DISPLAY "cname should be 'CREATE_TIME '; its value if ( NOT = -1) then
      -    '"cname ""
             DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             DISPLAY "indic1 should be 0; its value is ", indic1 "xxxxxxxxxxxxxxxxxx TOtname
             if (tname  NOT  =   "CREATIONTIMES "then
               MOVE flag
             END-IF
             if (ttype  NOT=" TABLE"then
               MOVE 0 TO "FETCHC13521java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
             END-IF
             if (cname  NOT SQL C13521
               MOVE 0 TO INTO, :ttype,::indic1
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             if (int1  NOTDISPLAYtname TABLESCOLUMNSvalue
                 java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29


             MOVE               "'"
              99 TO
             MOVE "xxxxxxxxxxxxxxxxxx" TO tname    " ",cname
             MOVExxxxxxxxxx ttype
             MOVE "xxxxxxxxxxxxxxxxxx" TOif    ="java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
             DISPLAY
             DISPLAY " INTO :tname, :ttype (ttype NOT = "VIEW
             EXEC SQL
               INTOEND-IF
             MOVE SQLCODE TO SQL-COD
            CHCKOK
             DISPLAY "tname MOVE 0 TO flag
      -   "',tname ""
             DISPLAY "ttype should be 'BASE TABLE'; its value is '",
             ttype "' f(indic1 NOT = 1 java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
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 DISPLAY "FETCH C13521
             if (tname              " INTO :tname, :ttype :cname,:int1:indic1;"
               MOVE 0 TO SQL C13521
             END-IF
ifttype  =   BASE)then
               MOVE 0 TO flag
             END-IF
             if (cname  NOT  =   "TABLE_NAMEjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 36
                0 TO
             END-IF
dic1
               MOVE 0 TO flag NOSUBCLASSjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
             

             MOVE 99 TO int1
             MOVE TO indic1
             MOVE "xxxxxxxxxxxxxxxxxx"java.lang.StringIndexOutOfBoundsException: Range [0, 39) out of bounds for length 19
             MOVE "xxxxxxxxxx" TO ttype
             MOVE "xxxxxxxxxxxxxxxxxx" TO cname
             DISPLAYFETCH C13521"
             DISPLAY " INTO :tname, :ttype, :cname, :int1:indic1;"
             EXEC              END-IF
               INTO :tname, :ttype, :cname, :int1:indic1 END-EXEC
MOVE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "tname should be 'CREATIONTIMES '; its value is
-" '" "'
             DISPLAY "ttype should be 'BASE DISPLAY (FLATER' 'USIG')"
             ttype "'"
             DISPLAY "cname should be 'TABLE_SCHEM '; its value is
      -    " " cname
DISPLAYint1;its,int1
             DISPLAY "indic1 should be 0 MOVESQLCODE SQL-COD
             if  NOT  =   CREATIONTIMES
               MOVE 0 TO flag
END-IF
             if (ttype  NOT  =   "BASE TABLE"then
               MOVETO
             END-IF
if  NOT     TABLE_SCHEM
               MOVE 0 TO flag flag
             END-IF
if  NOT  indic1
               MOVE 0 TO flag
                .

             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             MOVE "xxxxxxxxxxxxxxxxxx" TO tname SQL END-EXEC
             MOVE            CHCKOK
             
             DISPLAY  CASCADE
DISPLAY:cname
             EXEC SQL FETCH C13521
               INTO :tname, :ttype, :            CHCKOK
             MOVE SQLCODE TO SQL-COD
           PERFORMEXECS COMMIT
DISPLAY "beTABLESCOLUMNS;its java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
      -    " '", tname "' if flag = 1 ) then
             DISPLAY "ttype should DISPLAY "***p *** "
             EXEC INSERT HU
             DISPLAY "cname should be 'COLUMN_NAME '; its value is
      -    " VALUES'069','','PCO') END-EXEC
             DISPLAY" should be -1;its is ", indic1
             if (tname  NOT  =   "TABLESCOLUMNS "then
               MOVE 0 TO flag
             END-IF
ifttype     VIEW then
               MOVE 0 TO flag
             END-IF
             if cname " "then
               MOVE 0 TO                 ('063,'''PCO
             END-IF
             if (indic1  NOTCOMPUTEerrcnt + 1
               MOVETO
             END-IF

             9 TO
             MOVE "
             MOVE "xxxxxxxxxx" TO END-EXEC
             MOVE "xxxxxxxxxxxxxxxxxx" TO cname
             DISPLAY "FETCH C13521"
             DISPLAY " :tname,:,:,:int1:indic1;"
             EXEC SQL FETCH C13521
               INTO :tname " TEST0694
             MOVE SQLCODE TO SQL-COD             DISPLAY"IntervalArithmeticand Casts
           PERFORM CHCKOK             DISPLAY "eferences:"
             DISPLAY "tname should be 'TABLESCOLUMNS '; its value is
      -    " '", tname "'"
             DISPLAY             DISPLAY " F 5 - DATETIMEdata types"
             ttype "'"
             DISPLAY "cname should be 'CREATE_TIME '; its value is
      -    DISPLAY  .-Extended
             DISPLAY "indic1 should be -1; its value is ", indic1
              tnameTABLESCOLUMNSjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
MOVEflag
             END-IF
             if (ttype  NOT  =   "VIEW "then
               MOVE 0 TO flagCOMPUTESQLCODE
             END-IF

               MOVE 0 TO flag      *you want: interval hour to minute 
             END-IF
             if (      *you have: exact numeric 
               MOVE 0 TO flag
             END-IF

             MOVE       *      This is how you do it:         
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             MOVE "xxxxxxxxxx" TO ttype
             MOVE "xxxxxxxxxxxxxxxxxx" TO      *    1.9 * INTERVAL '1.000000' SECOND                     
             DISPLAY "FETCH C13521"
             DISPLAY " INTO :tname, :ttype, :cname, :int1:indic1 "PNUM () NULL
             EXECDISPLAY  EMPNUM
INTO, , :, :int1END-EXEC
             MOVE CHAR,
           PERFORM CHCKOK
DISPLAYtname';its value is
      -    " '", tname "'"
             DISPLAY "ttype should be 'VIEW '; its value is '",
             ttype "'"EMPNUM)) END-EXEC
             DISPLAY" should be 'ABLE_NAME';its
      -    " '", cname CHCKOK
                          DISPLAY
             if (tname  NOTDISPLAYCOMMIT
               MOVE 0 TO SQL WORKjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
             END-IF
             if (ttype  NOT  =   "VIEW ")java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 25
               MOVE java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             END-IF
             if (cname  NOT  =   "TABLE_NAME "then
               MOVE 0 TO flag
             END-IF
             if (indic1 SQL VIEW (, HOURS AS
               MOVE 0 TO flag PNUM AVG) * INTERVAL:0  TO
             END-IF

             MOVEFROM GROUP BYPNUM END-EXEC
             MOVE "xxxxxxxxxxxxxxxxxx" TO tname
             MOVE "xxxxxxxxxx" TO ttype
             MOVE "xxxxxxxxxxxxxxxxxx" TOjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
             DISPLAY"FETCHC13521java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
              " :tname, :ttype, :cname, :int1:indic1;"
             EXEC SQL FETCH C13521
               INTO :tname, :ttype, :cname, :int1:indic1EXEC COMMITWORK END-EXEC
             MOVE SQLCODE SQLCODE SQL-COD
           PERFORM CHCKOK
             DISPLAY "tname should be 'TABLESCOLUMNS '; its value is
      -    " " "
             DISPLAY "ttype should java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
              'java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
             DISPLAY " DISPLAY"SELECT,"
      -    " '", cname "'"
DISPLAYindic1 be 1;  value s " indic1
             if (tname  NOT              " HOUR )"
               MOVE  CREATE  (PNUM)AS
             END-IF
             if ttype=VIEWjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
               MOVE 0 TO (CASTC (HOURSAS HOUR)
             END-IF
             if (cname  =   TABLE_SCHEMjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
                0  flag
             END-IF
             if (indic1            CHCKOK
               MOVE 0 TO flag
DISPLA

              9 TO java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
             MOVE "xxxxxxxxxxxxxxxxxx" TO tname
             MOVE "xxxxxxxxxx" TO ttype"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             MOVE "xxxxxxxxxxxxxxxxxx" TO cname
 FETCH"
             DISPLAY " INTO :tname, :ttype, :cname, :int1:indic1;"
EXECFETCH
               INTO :tname, :ttype, :cname, :int1:indic1 END-EXEC
              SQLCODE  SQL-COD
           PERFORM CHCKOK
             DISPLAY " should be 'TABLESCOLUMNS '; its valueis
      -    " '", tname "'"
             DISPLAY"ttype should 'VIEW ';its is '",
             ttype "'"
             DISPLAYcname  ' ' itsis
      -    " '", cname "'"
             DISPLAY "indic1 should be -1; its value is ", indic1
             if (tname  =   "TABLESCOLUMNS "then
               MOVE 0 TO SQLCODETO
             END-IF
             if (  NOT  =   "VIEW " then
               MOVE  " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             END-IF
             if (cname  NOT  =   "TABLE_TYPE "then
               MOVE 0TO
             END-IF
             ifindic1 =  1)then
               MOVE 0 TO flag
             END-IF

DISPLAYFETCH
             DISPLAY " INTO :tname, :ttype, :cname, :int1:indic1;"
             EXEC SQL FETCH C13521
               INTO:tnamettypecname int1END-EXEC
             MOVE SQLCODE TO SQL-COD
              "SQLCODEshould 100; its value is " SQL-COD
             DISPLAY "SQLSTATE should be 02000; its value is ", SQLSTATE
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODE  NOT =  100  OR  NORMSQ  NOT  =   "02000"then
               MOVE  flag
             END-IFSELECT ,
              (RUN_SECONDS '01.000000 SECOND
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
             DISPLAY""

             DISPLAY "INSERT INTO CREATIONTIMES VALUES"
DISPLAY  '' USIG
             EXEC CHCKOK
               ('FLATER''USIG', DEFAULT " WORK;"
             MOVE TO
             DISPLAY "SQLCODE should be < 0; its value is ", SQL-COD
             DISPLAYSQLSTATE 500;its ,SQLSTATE
           PERFORM NOSUBCLASS THRU
   <NORMSQ0" java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
               MOVE 0 TODISPLAYCREATE JOB_TYPE
             END-IF
             if (NORMSQ  java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
             then
                "Valid implementation-definedSQLSTATEaccepted"
             END-IF
             DISPLAY  " "

             DISPLAY "ROLLBACK;"
             EXECSQL END-EXEC
             MOVECAST (AVGRUN_SECONDS)  NUMERIC (8 )java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
PERFORM
             DISPLAY  " "

              SQLCODE TO
             EXEC SQLPERFORM
             MOVE SQLCODE
           PERFORM CHCKOK
             DISPLAY  " "

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

             if ( flag  =  1 ) then
               DISPLAY " *** pass *** "
               EXEC SQL "CREATEVIEWHUNDREDS(ORKTOTL)ASjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
                 VALUES('0693','pass','PCO'END-EXEC
               MOVE SQLCODE TO SQL-COD
else
               DISPLAY " dml135.pco *** fail *** "
               EXEC SQL INTO .TESTREPORT
                 VALUES('0 SUM (CAST ( AS INTERVAL DAY TOMINUTE) 00
               MOVE SQLCODE TO SQL-COD
               COMPUTE errcnt = errcnt + 1
             END-IF

DISPLAY "===============================

             EXEC SQL COMMIT WORK END-EXEC
             MOVE SQLCODE TO SQL-COD
      ******************** END TEST0693 ********************
      ******************** BEGIN TEST0694 *******************
             MOVE 1 TO flagEXEC COMMIT WORK END-EXEC

              " "
             DISPLAY " Interval Arithmetic and Casts"
             DISPLAY "References:"
             DISPLAY " "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY " F# 20 -- CAST functions"
             DISPLAY SQL WORKS
      -    " strings"
             DISPLAY " 6.15 FT.1 -- Syntax for subtracting two
      -    " datetimes"
DISPLAY   ---- -    -     --  "

             COMPUTE SQLCODE = -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 ("
              " EMPNUMCHAR3) OTNULL,
             DISPLAY " PNUM CHAR (3) NOT NULL,"
             DISPLAY" HOURSDECIMAL (),java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
             DISPLAY " UNIQUE(EMPNUM,PNUM));"
             EXEC SQL CREATE TABLE WORKS (
               EMPNUM CHAR (3) NOT NULL              "INSERTINTO VALUES"
 NOT,
               HOURS DECIMAL (5),
               UNIQUE(EMPNUM,PNUM)) END-EXEC
             MOVE SQLCODE SQL INTO RUN_TIMES VALUES
           PERFORM CHCKOK(0 '', 1.22) END-EXEC
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
             EXEC SQL COMMIT WORK END-EXEC
             MOVESQLCODE SQL-COD
           PERFORM CHCKOK
             DISPLAYDISPLAY"NSERTINTORUN_TIMES VALUES"

DISPLAY VIEW  (PNUM HOURS"
             DISPLAY " SELECT PNUM, AVG (HOURS) * INTERVAL '01:00' HOUR
      -"TOMINUTEjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
             DISPLAY " MOVE SQLCODE SQL-COD
SQLCREATE PROJ_HOURS(, HOURS) AS
               SELECT PNUM, AVG (HOURS) * INTERVAL '01:00' HOUR TO
             MINUTE
               FROM WORKS GROUP java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             MOVE SQLCODE TO SQL-COD
PERFORM
             DISPLAY  " "

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

DISPLAYCREATE( )AS
             DISPLAY " SELECT PNUM,"
             DISPLAY " AVG (CAST (CAST (HOURS AS INTERVAL HOUR)"
             DISPLAY " AS SQLCODE TO SQL-COD
             PERFORM
             DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
SELECT,
               AVG (CAST (CAST (HOURS AS "(, '', 23.74);java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
               AS HOUR TO MINUTE
               FROM GROUP BY PNUM
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
             EXEC SQL COMMIT WORK END-EXEC
                            " "
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "CREATE TABLE RUN_TIMES ("
             DISPLAY " JOB_ID INT NOT NULL UNIQUE,"
             DISPLAY " JOB_TYPE CHAR (3) NOT *Allowing the sign to move inside of the quotes: TC #2 5.3
             DISPLAY " RUN_SECONDS REAL);"
             EXEC SQL CREATE TABLE RUN_TIMES (
               JOB_ID INT NOT NULL UNIQUE,
               JOB_TYPE CHAR (3) NOT NULL,
               RUN_SECONDS REAL) END-EXEC
             MOVETO
           PERFORM CHCKOK
             DISPLAY""

              COMMIT
             EXEC SQL COMMIT WORK END-EXEC
             SQLCODE
           PERFORM CHCKOK
DISPLAY 

             DISPLAY "CREATE VIEW TYPE_TIMES "MINUTE
             DISPLAY              SQLSELECT(*) INTO :int1
             DISPLAY" AVG (RUN_SECONDS) * INTERVAL '1.0000'SECOND"
             DISPLAY " FROM RUN_TIMES GROUP BY JOB_TYPE;"
             EXECSQL VIEW  (JOB_TYPE RUN_SECONDSjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
               SELECT JOB_TYPE,
                (RUN_SECONDS '01.000'SECOND
               FROM
             MOVE SQLCODE TO               TO
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAYif  NOT   )
EXEC COMMIT END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "CREATE VIEW TYPE_TIMES2 (JOB_TYPE DISPLAY" COUNT(*  :int1
      -    "
DISPLAY  SELECT
             DISPLAY " CAST (CAST (AVG (RUN_SECONDS) AS NUMERIC (8,
      -    " 6))"
             DISPLAY " AS INTERVAL SECOND)"
             DISPLAY " FROM RUN_TIMES GROUP BY JOB_TYPE;"
EXECCREATE(,RUN_SECONDS
               SELECTDISPLAY" AND INTERVAL +0000 SECOND;"
               CAST (CAST (AVG (RUN_SECONDS) AS NUMERIC (8, 6))
                INTERVALSECOND
               FROMFROM A, TYPE_TIMES2
             MOVE SQLCODE A.JOB_TYPEB.OB_TYPE
           PERFORM CHCKOK
              " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY "COMMIT WORK;"
             EXEC SQLAND  '+00.000010 SECOND
             MOVE SQLCODE SQL-COD
           PERFORM CHCKOK
             DISPLAY  " PERFORMCHCKOK

             DISPLAY "CREATE VIEW HUNDREDS (WORKTOTL) AS"
DISPLAY"SELECT SUM (AST ( AS INTERVAL DAY TO
      -    " MINUTE)) / 100"
 "FROM;java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
             EXEC SQL CREATE VIEW HUNDREDS (WORKTOTL) AS
               SELECT SUM java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               FROM PROJ_HOURS END-EXEC
             MOVE" H )"
CHCKOK
             DISPLAY  " "

DISPLAY ;
             EXEC SQL COMMIT                EXTRACT HOUR HOURS
              SQLCODE SQL-COD
           PERFORM CHCKOK
              "

             DISPLAY "INSERT INTO WORKS"
             DISPLAY " SELECT * FROM HU.WORKS;"
             EXEC INSERT INTO
               SELECT * FROM HU.WORKS END-EXEC
             MOVE SQLCODE TO CHCKOK
            CHCKOK
             DISPLAY  " "

              VALUES
             DISPLAY " ('EX', 'P1' " C13531 int1;"
             EXEC SQL INSERT INTO WORKS VALUES
               ('EX'' EXECSQLFETCHC13531INTO:, :int2 END-EXEC
             MOVE SQLCODE SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY              "int1 should be 43 its value is ", int1
             DISPLAY " ('EX', 'P3', 25);"
EXEC INSERTWORKS
               ('EX''P3',  ifint1 = 3 
             MOVEMOVETO java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
           PERFORM
             DISPLAY  " "

             DISPLAYEND-IF
             DISPLAY " (0, if( = 1 AND int2 = 19) java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
             EXEC SQL INSERT INTO RUN_TIMES VALUES
               (0, 'DMP'java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY "INSERT INTO RUN_TIMES VALUES"
             DISPLAY " (1, 'DMP', .49) EXECSQLFETCH INTO :int1, :int2 END-EXEC
             EXEC SQL INSERTMOVE TO
 'DMP', 49 END-EXEC
             MOVE SQLCODE TO SQL-COD
            java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY  " "

             DISPLAY "INSERT INTO RUN_TIMES VALUES"
             DISPLAY " (2, 'CHK', MOVE TO flag
             EXEC SQL INSERT INTO RUN_TIMES VALUES
               (2, 'CHK', 5.2) END-EXEC
              SQLCODE SQL-COD
           PERFORM = -1
             DISPLAY  " "

    
             DISPLAY " (3, 'CHK', 4.04);"
             EXEC SQL INSERT INTO CHCKOK
               (3              be
MOVE SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO RUN_TIMES VALUES"
             DISPLAY " OMPUTEint2 = -1
                           "FETCHC13531INTO:, :int2;"
,'27
             MOVE SQLCODESQLCODESjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
PERFORM
             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 COUNT(*) INTO :int1"
              "FROMPROJ_HOURS A, PROJ_HOURS2 B"
             DISPLAY " WHERE A.PNUM = B.PNUM"
             DISPLAY " java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 19
             DISPLAY " BETWEEN INTERVAL '-1' MINUTE AND INTERVAL '+1'
      -    " MINUTE;"
             EXEC             DISPLAY" C13531 INTO :int1, :int2;"
               FROM PROJ_HOURS A, PROJ_HOURS2 B             EXECSQL FETCH int1
                             SQLCODESQL-COD
               AND (A.HOURS -  DISPLAYint1,
               BETWEEN              " should be 0; its is ", java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
             END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM 
 should6  value"
 i  NOT
               MOVE 0  SQLCODE


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

             COMPUTE (  NOT  1    NORMSQ="20)then
             DISPLAYMOVE flag
             DISPLAY " FROM TYPE_TIMES A, TYPE_TIMES2 B"
DISPLAY"WHEREA.OB_TYPE = BJOB_TYPE"
             DISPLAY " AND (A.RUN_SECONDS - B.RUN_SECONDS) SECOND"
             DISPLAY " BETWEEN INTERVAL '-00.000010' SECOND"
                          
             EXEC SQLDISPLAY"
               FROM TYPE_TIMESCLOSE"
               WHERE = B
MOVE TO
               BETWEEN INTERVAL '-00.000010 PERFORM CHCKOK
ANDINTERVAL0'SECOND
             MOVE SQLCODEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
           PERFORM DISPLAY" EXTRACT (SECOND FROM RUN_SECONDS)
             DISPLAY "int1 should be 2; its value is ", int1 "FROMTYPE_TIMES ORDER BY JOB_TYPE;"
             ifint1 = )then
MOVE flag
             END-IF

      *Check contents of PROJ_HOURS 

             DISPLAY CHCKOK
             DISPLAY "DISPLAY ""
             DISPLAY " EXTRACT (MINUTE FROM HOURS)"
             DISPLAY " FROM PROJ_HOURS ORDER BY PNUM;"
             EXEC SQL DECLARE C13531 CURSOR FOR
                EXTRACT FROM HOURS),
               EXTRACT (MINUTE FROM HOURS)
               FROM PROJ_HOURS ORDER              MOVESQLCODE TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36

             DISPLAY "OPEN C13531 MOVE flag
E
             MOVE SQLCODE
RFORM
             DISPLAY  " "

             COMPUTE int1 = -1
             COMPUTE int2 = -1
DISPLAYFETCHINTO,:;"
             EXEC SQL FETCH C13531 INTO :int1, :int2 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
 should 3  value ",int1
                0 flag
             if (int1
0flag
             END-IF
               TO
 java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             END-IF
             if (flag0 flag
               DISPLAY "truncation/roundoff
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             DISPLAY

             COMPUTE int1CLOSE;
             COMPUTE int2 = -1
             DISPLAY "FETCH C13531 INTO :int1, :java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 36
             EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK "EXTRACTDAYFROMWORKTOTL"
"int1 should be 35;its valueis", int1
             DISPLAY "int2 should be 0; its value is ", int2              SQL SELECTEXTRACTDAY  WORKTOTL
            ifint1   =  5OR  NOT=0 java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
               MOVE 0 TO flag
             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19

             COMPUTE int1 = -1
             COMPUTE int2 = -1
             DISPLAY "FETCH C13531 INTO :int1, :int2;"
             EXEC SQL FETCH C13531 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             MOVE SQLCODE TO SQL-COD  HOUR
           PERFORM CHCKOK
             DISPLAY "int1 should be 52; its value is ", int1 : FROM  END-EXEC
             DISPLAY" should be 30; itsvalueis" int2
             if (int1  NOT =  52  ORDISPLAYint1  valueint1
                0  flag
             END-IF

             COMPUTE int1 = -1
             COMPUTE int2 = -1
              FETCH :,:;java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
             EXEC SQL FETCH C13531" int1FROM;"
MOVE  SQL-COD
           PERFORM CHCKOK
             DISPLAY "int1 should be 30; its value is ", int1
             DISPLAY "int2 should be 0; its value is ", int2
             if (int1  NOT " should be 11; value is " java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
               MOVE 0 TO flag
             END-IF

             COMPUTE int1 = -
             COMPUTE int2 = -1
DISPLAYC13531:,:;
             EXEC SQL FETCHEND-IF
             MOVE SQLCODE
           PERFORM CHCKOK
             DISPLAY "int1 should be 46; *18 seconds. It should get rounded downwards even
             DISPLAY "int2 should be 0; its value is ", int2      *if there is rounding/truncation error in previous 
             if (int1  NOT =  46  OR  int2  NOT =  0) then
                  flag
             EXEC ROLLBACK END-EXEC

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

              " C13531 INTO :int1,:int2"
             EXEC SQLM SQLCODETO
             MOVE TO
             DISPLAY "SQLCODE should be 100; its value is ", SQL-COD
             DISPLAY "SQLSTATE should be 0 TABLERUN_TIMES ;java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
           PERFORM NOSUBCLASS THRUMOVE TO SQL-COD
PERFORM
               MOVE 0               "
             END-IF
             if (NORMSQ   =   "02000"  AND  NORMSQ COMMIT
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
             DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

 C13531
             EXEC SQL CLOSE C13531 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
"

             DISPLAY "DECLARE C13532 CURSOR FOR"
             DISPLAY  SELECT RUN_SECONDS
             DISPLAY " FROM TYPE_TIMES ORDER BY JOB_TYPE;"
              SQL C13532 FOR
               SELECT EXTRACT (SECOND
                TYPE_TIMESB  END-EXEC

             DISPLAY "OPEN C13532;"
EXECOPENjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
              SQLCODESQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             COMPUTE flt1 = -1.0
             DISPLAY "FETCH C13532 INTO :flt1;"
             EXEC SQL FETCH C13532 INTO :flt1 END-EXEC
             MOVE SQLCODE
           PERFORM CHCKOK
             DISPLAY "flt1 should be 10.993333 +- 0.00001; its value is
      -    " ", flt1
             if (flt1  <  10.993323  OR  flt1  >  10.993343) thenDISPLAYReferences
               MOVE 0 TO flagDISPLAY    #1 -Transaction
END-IF

             COMPUTE flt1 = -1.0
DISPLAYFETCH INTO:;"
             EXEC SQL FETCH C13532 INTO :flt1 END-EXEC
               = -1
 
             DISPLAY "flt1 should be 0.855 +- 0.00001; its value is ",
             flt1
             if (flt1  <  0.85499  OR  flt1  >  0              S STAFF
               MOVE 0 TO flag  C13541
             END-IF

             DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             EXEC SQL FETCH C13532
             MOVE SQLCODE TO
             DISPLAY "SQLCODE should be 100; its value is ", SQL-COD
             DISPLAY SQL C13541java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
           PERFORM NOSUBCLASS THRU CHCKOK
             if (SQLCODE  NOT =  100  OR  NORMSQ  NOT  =   
               MOVE 0 TO flag
             END-IF
             if (NORMSQ      *Violation of 13.9 SR.2 
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
              "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             SET =1  CURRENT C13541
             EXEC SQL CLOSE C13532               SQLCODE SQL-COD
              SQLCODE SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

      *Test interval divide 

             COMPUTE int1 = -1
             DISPLAY"SELECT EXTRACT DAY WORKTOTL)java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
DISPLAYINTOHUNDREDS
             EXEC SQL SELECT    =0    NOT)
               INTO :int1 " accepted.java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
             MOVE SQLCODE       *4.21 PP.9:  state of cursor is now unknown 
            java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
int1
             if PERFORM
               MOVE 0 TO flag
             END-IF

             COMPUTE int1 = -1
             DISPLAY "SELECT EXTRACT (HOUR FROM WORKTOTL)"
             DISPLAY "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             EXEC SQL SELECT EXTRACT (HOUR FROM WORKTOTL)
               INTO :int1             DISPLAY"FETCHC13541 INTO:int1;"
             MOVE              SQLFETCH INTOEND-EXEC
           PERFORM CHCKOK
             DISPLAY "int1 should be 2; its value is ", int1
             if (int1  NOT =  2) then
               MOVE 0 TO flag
             END-IF

             COMPUTE int1 = -1
             DISPLAY "SELECT EXTRACT (MINUTE FROM WORKTOTL)"
             DISPLAY       *Violation of 13.6 SR.2 
             EXEC SQL SELECT EXTRACT (MINUTE FROMDISPLAY"DELETEFROMHU."

             MOVE SQLCODE TOEXEC DELETE  HU
           PERFORM CHCKOK
             DISPLAY "int1 should be 11; its value is ", int1
             if (int1  NOT =  11) then
               MOVE 0 TO flag
END-IF

      *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 WORK;"
              SQL WORK
             MOVE
            CHCKOK
             DISPLAY  " "

             DISPLAY "DROP TABLE WORKS CASCADE;"
             EXEC SQL               DISPLAY    .
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
D   java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

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

             DISPLAY "DROP TABLE RUN_TIMES CASCADE;"
             EXEC SQL DROP" UPDATE GRADE, ;"
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  ""

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

             if ( flag 
               DISPLAY " *** pass *** "
               EXEC SQL INSERT INTO HU
                 ('09''','PCO' java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
               MOVE  FETCH INTO, :ename, :city
             else
               DISPLAY " dml135.pco *** fail *** "
               EXECSQLINSERT HU.
                 VALUES('0694','fail','PCO'END-EXEC
               MOVE TO
               COMPUTE errcnt = errcnt + 1
             END-IF

             DISPLAY "======== DISPLAY"int1 " int1

             EXEC SQL COMMIT WORK END-EXEC
             MOVE SQLCODE TO SQL-COD
      ******************** END TEST0694 ********************
      ******************** BEGIN TEST0695 *******************
             MOVE 1 TO flag

 TEST0695
             DISPLAY " < SET EMPNUM = 'HAR' WHE CURRENT OF END-EXEC
             DISPLAY"
DISPLAYF 1Transaction
             DISPLAY " 13.1 LR.2.b -- in
      -    " "
             DISPLAY " - - - - - - - - - - - - - - - - - - -"

             COMPUTE SQLCODE = -1
             MOVE "xxxxx" TO SQLSTATE

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

             DISPLAY "DECLARE C13541 CURSOR FOR"
             DISPLAY " SELECT GRADE FROM HU.STAFF"
             DISPLAY " FOR READ ONLY;"
             EXEC SQL DECLARE C13541 CURSOR FOR
               SELECT GRADE FROM HU.STAFF
               FOR READ ONLY END-EXEC

             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 SQL FETCH C13541 INTO :int1 END-EXEC
             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.9 SR.2 

             DISPLAY "UPDATE HU.STAFF"
             DISPLAY " SET GRADE = 11 WHERE CURRENT OF C13541;"
             EXEC SQL UPDATE HU.STAFF
               SET GRADE = 11 WHERE CURRENT OF C13541 END-EXEC
             MOVE SQLCODE TO SQL-COD
             DISPLAY "SQLCODE should be < 0; its value is ", SQL-COD
             DISPLAY "SQLSTATE should be 42000; its value is ", SQLSTATE
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODE  NOT <  0  OR  NORMSQ  NOT  =   "42000"then
               MOVE 0 TO flag
             END-IF
             if (NORMSQ   =   "42000"  AND  NORMSQ  NOT  =   SQLSTATE)
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
             DISPLAY  " "

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

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

             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 SQL FETCH C13541 INTO :int1 END-EXEC
             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 

             DISPLAY "DELETE FROM HU.STAFF"
             DISPLAY " WHERE CURRENT OF C13541;"
             EXEC SQL DELETE FROM HU.STAFF
               WHERE CURRENT OF C13541 END-EXEC
             MOVE SQLCODE TO SQL-COD
             DISPLAY "SQLCODE should be < 0; its value is ", SQL-COD
             DISPLAY "SQLSTATE should be 42000; its value is ", SQLSTATE
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODE  NOT <  0  OR  NORMSQ  NOT  =   "42000"then
               MOVE 0 TO flag
             END-IF
             if (NORMSQ   =   "42000"  AND  NORMSQ  NOT  =   SQLSTATE)
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
             DISPLAY  " "

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

             DISPLAY "DECLARE C13542 CURSOR FOR"
             DISPLAY " SELECT * FROM HU.STAFF"
             DISPLAY " FOR UPDATE OF GRADE, CITY;"
             EXEC SQL DECLARE C13542 CURSOR FOR
               SELECT * FROM HU.STAFF
               FOR UPDATE OF GRADE, CITY END-EXEC

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

             COMPUTE int1 = -1
             DISPLAY "FETCH C13542 INTO :emnum, :ename, :int1, :city;"
             EXEC SQL FETCH C13542 INTO :emnum, :ename, :int1, :city
             END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "emnum is ", emnum
             DISPLAY "ename is ", ename
             DISPLAY "int1 is ", int1
             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;"
             EXEC SQL UPDATE HU.STAFF
               SET EMPNUM = 'HAR' WHERE CURRENT OF C13542 END-EXEC
             MOVE SQLCODE TO SQL-COD
             DISPLAY "SQLCODE should be < 0; its value is ", SQL-COD
--> --------------------

--> maximum size reached

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

Messung V0.5
C=91 H=99 G=94

¤ Dauer der Verarbeitung: 0.14 Sekunden  (vorverarbeitet)  ¤

*© 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.