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

SSL dml147.cob   Sprache: Cobol

 
 .
       PROGRAM-ID.  DML147  X(18.
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SOURCE-COMPUTER.  xyz.
       OBJECT-COMPUTER.  xyz.
       DATA DIVISION.
       WORKING-STORAGE SECTION.


      * EMBEDDED COBOL (file "DML147.PCO")


      ****************************************************************
      *                                                              
      *                 COMMENT SECTION                              
      *                                                              
      * DATE 1995/2/1 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.
      *                                                              
      * DML147.PCO                                                    
      * WRITTEN BY:  Joan Sullivan (mostly)                          
      * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE
      * Embedded COBOL by David Flater                                   
      *                                                              
      * This routine tests (1) the rolling back of schema            
      * manipulation, and (2) queries involving joins.               
      *                                                              
      * REFERENCES                                                   
      *   FIPS PUB 127-2 14.1 Transitional SQL                       
      *   ANSI SQL-1992                                              
      *                                                              
      ****************************************************************



           EXEC01en  X(3).
       0  ename(2).
       01  SQLSTATE PIC  X(5).
       01  uid PIC  X(18).
       01  uidx PIC  X(18).
       01  en PIC  X(3).
       01  ename PIC  X(20).
       01  ename2 PIC  X(20).
       01  ct PIC  X(15).
       01  sl       1   PIC  X(20).
       01  gr S99 DISPLAY  LEADING SEPARATE
       01  indic1 PIC S9(4) DISPLAY01   PIC S9) DISPLAY LEADING SEPARATE
       01  indic2PIC(4) DISPLAY SIGN LEADING.
       01  int1 PIC S9(9) DISPLAY SIGN LEADING SEPARATE.
 SQL END DECLARE END-EXEC
       01  norm101   PIC S9()  SIGN SEPARATE
       01  norm2 PIC S9 DISPLAY SIGN SEPARATE
       01  ALPNUM-TABLE IS
               "01234ABCDEFGH56789IJKLMNOPQRSTUVWXYZ".
           05  ALPNUM X OCCURS 36 TIMES
       01  NORMSQ.
                  1norm2 S9)DISPLAYSIGN SEPARATE
()DISPLAY LEADING SEPARATE
      *date_time declaration 
       0  TO-DAY 9().
       01  THE-TIME PIC 9(8).
       01  flag PIC S90  ALPNUM X OCCURS 36 TIMES

       1SQL-COD S9  SIGN SEPARATE

EDURE.
       P0.

                   *date_time declaration 
             CALL "" USING uid
             MOVE "not logged in, not" TO uidx
             EXEC SQL SELECT USER INTO :uidx FROM HU.ECCO END-EXEC
MOVE TO SQL-COD
             EXEC
MOVE TO SQL-COD
             if (uid  NOT  =   uidx) then
       PROCEDUREjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
      -    " connected"
            STOP
             END-IF
             MOVE 0 TO errcnt SQLCODE

             DISPLAY
MOVE TO
             DISPLAY
          5-byte
             DISPLAY "TEd "ERRORUser ",uid"expected ", "
      *date_time print 
           ACCEPT TO-DAY              END-IF
  FROM
           DISPLAY "java.lang.StringIndexOutOfBoundsException: Range [0, 24) out of bounds for length 20

      ******************** BEGIN TEST0840 *******************
             MOVE 1 TO flag

             DISPLAY " TEST0840 "
             DISPLAY " Roll back schema manipulation"
             DISPLAY "References:"
             DISPLAY " F# 3 -- Basic schema manipulation"
             DISPLAY" - -- - ---- - ---"

             COMPUTE SQLCODE = -1
             MOVE "xxxxx" TO SQLSTATE

DISPLAY" TABLE NOT_THERE (C1 CHAR (10);"
             EXEC SQL CREATE TABLE NOT_THERE (             DISPLAY" back schema manipulation"
              " F#3 --Basic schema manipulation"
           PERFORM CHCKOK
             DISPLAY

      *14.4 GR.3:  Any changes to schema are cancelled by a rollback 

             DISPLAY" WORK;"
             EXEC SQL ROLLBACK WORK END-EXEC
              SQLCODE TO
           PERFORM CHCKOK
             ISPLAY"

      *This is a syntax error.  If it is rejected at compile time,  
      *this portion of the test is passed. 

             DISPLAY "INSERT INTO NOT_THERE VALUES ('1234567890');"
             EXEC           PERFORM
             END-EXEC
             MOVE SQLCODE TO SQL-COD
             DISPLAY "SQLCODE "ROLLBACK;"
             if (  NOT <0 then
               MOVETO
            CHCKOK
DISPLAY" should be 4200;its is ", SQLSTATE
           PERFORM NOSUBCLASS      *This is a syntax error.  If it is rejected at compile time,  
             java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               MOVE 0 TO flag
             END-IF
             if (NORMSQ   =   "42 END-EXEC
             then
DISPLAY" implementation-defined SQLSTATE accepted."
             END-IF

             DISPLAY "ROLLBACK WORK;"
             EXEC ROLLBACK END-EXEC
             MOVE SQLCODE TO                0 TO
PERFORM
             DISPLAY  " "

             DISPLAY "CREATE VIEW NOT_HERE AS"
DISPLAY"SELECT*FROMUSIG;"
             EXEC SQL CREATE VIEW NOT_HERE AS
               SELECT * FROM USIG END-EXEC
             MOVE SQLCODE SQL-COD
           PERFORM CHCKOK
             DISPLAY  ""

             DISPLAYROLLBACK
             EXEC SQL ROLLBACK WORK END-EXEC
              SQLCODETO
           PERFORM CHCKOK
             DISPLAY  " "

      *This is a syntax error.  If it is rejected at compile time,  
      *this portion of the test is passed. 

             DISPLAY "SELECT COUNT (*) INTO :int1"
             DISPLAY" NOT_HERE;
 
               FROM   
             MOVE " VIEW AS"
DISPLAYSQLCODE be ; valueSQL-COD
             if (SQLCODE  NOTEXEC CREATE  AS
MOVE flag
             END-IF
             DISPLAY "SQLSTATE should be 42000; its value is ", SQLSTATE
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (NORMSQ  NOT  =   "42000"then
               MOVEMOVESQLCODE SQL-COD
             END-IF
              (NORMSQ0" AND NORMSQ NOT=SQLSTATEjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
               SQL ORK
               DISPLAY "Validjava.lang.StringIndexOutOfBoundsException: Range [25, 17) out of bounds for length 25
             END-IF

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

             DISPLAY " TABLE USIG"
             DISPLAY " ADD COLUMN NUL INT;"
             EXEC             DISPLAY   FROMNOT_HERE"
               ADD               SQLSELECT COUNT()INTOint1
               TO
           PERFORM CHCKOK
             DISPLAY  " "                0TO

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

      *This is a syntax error.  If it is rejected at compile time,  
      *this portion of the test is passed. 

             DISPLAY "SELECTCOUNT (*)INTO :nt1"
             DISPLAY " FROM USIG WHERE NUL IS NULL;"
EXEC  *  
               FROM USIG WHERE             
             MOVE SQLCODE TO SQL-COD
 < 0; its is ", SQL-COD
             if (SQLCODE  NOT <  0) then
               MOVE             MOVE SQ TO
             END-IF
             DISPLAY "SQLSTATE should be 42000; its value is "
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (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 " WORK;"
             EXEC SQL ROLLBACK SQL WORK
             MOVE TO SQL-COD
           PERFORM
             DISPLAY  " "

             DISPLAY "DROP TABLE USIG CASCADE;"
             EXEC SQL      *This is a syntax error.  If it is rejected at compile time,  
MOVE TO
           PERFORM CHCKOK
             DISPLAY  "EXECSQLSELECT COUNT (* INTO:int1

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

             MOVE 50 TO int1
             DISPLAY *INTO
             DISPLAY " NOT = 400 then
             SQL COUNT*INTOjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
               FROM             
             MOVE SQLCODE TO SQL-COD
           PERFORM
             DISPLAY "int1 should be 2; its value is ",               SQL WORK
             if (int1  NOT =  2) then
               MOVE0 flag
             END-IF

             DISPLAY "ROLLBACK WORK;"
             EXEC SQL ROLLBACK WORK SQL TABLE USIG END-EXEC
             MOVE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

MOVE TO
             DISPLAY "SELECTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY " FROM USIG; MOVESQLCODETO java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             EXEC SQL SELECT COUNT(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               FROM USIG END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY" be 2;itsvalue" java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
              (  NOT=) then
               MOVE 0 TO flag
             END-IF

              int1 java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
             EXEC SQL ROLLBACKTO
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
           PERFORM CHCKOK
             DISPLAY  " "

             if ( flag  =  1 )              MOVE SQLCODE TO SQL-CO
               DISPLAY " * " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
               EXEC SQL INSERT INTO HU.TESTREPORT
                 VALUES('0840',' DISPLAY"FROM USIG"
               MOVE SQLCODE TO SQL-COD
             else
               FROM END-EXEC
EXEC  INTO.TESTREPORT
                 VALUES('0840','fail','PCO'END-EXEC
               MOVE SQLCODEDISPLAYint12  valueint1
COMPUTEerrcnt + 1
             END-IF

             DISPLAY"============================java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70

             EXEC SQLDISPLAY" WORK;"
             MOVESQLCODE SQL-COD
      ******************** END TEST0840 ********************
      ******************** BEGIN TEST0841 *******************
            CHCKOK

             DISPLAY " TEST0841 "
             DISPLAY " Multiple-join
             DISPLAYReferences
             DISPLAY " F# 4 -- Joined table"
             DISPLAY java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
DISPLAY"75--Formatof < table>allowsp"
             DISPLAY " - - - - - - - - - - - - - - - - - - -"

             COMPUTE SQLCODE = -1
             MOVE "xxxxx" TO SQLCODE SQL-COD

             DISPLAY "DELETE FROM HU. "       dml147  *** fail"
             EXEC SQL DELETE FROM HU.STAFF4 END-EXEC
             MOVE  TO SQL-COD

             ISPLAYINTOSTAFF4
    * FROM.STAFF3 WORK
             DISPLAY " WHERE EMPNUM > SQLCODE TO
             EXEC SQL INSERT INTO HU.STAFF4
                * FROM HU.STAFF3
               WHERETEST0841
             MOVE             DISPL " Multiple-joinanddefaultorder of joins"
           PERFORM CHCKOK
DISPLAY "

      *testing that joins are done left to right 
      *same as next query where parentheses are explicit 

             DISPLAY "DECLARE C14721 CURSOR FOR"
             DISPLAY              "75 - of
             DISPLAY " NATURAL LEFT JOIN
             ISPLAYINNERSTAFF4
             DISPLAY " ORDER BY EMPNUM DESC;"
             EXEC SQL DECLARE C14721 CURSOR FOR
              SELECTHU
               NATURAL LEFT JOIN               SQL FROM.STAFF4
               NATURAL JOIN HU.STAFF4
               ORDER BY EMPNUMjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

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

              "xxx"  en
             DISPLAY "FETCH C14721 INTO PERFORM CHCKOK
             EXEC SQL FETCH C14721 INTO :en
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
                           "DECLARE C14721CURSOR FORjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
                           " NATURALLEFT JOIN HU.STAFF"
               MOVE 0 TO flag
             END-IF

             MOVExxx en
             DISPLAY "FETCH C14721 INTO :en;"
             EXEC SQLFETCH INTO :en
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
DISPLAY" should be 'E4';its value isen 'java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
             if (en  NOT   E4 java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
               DISPLAY java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
             END-IF

MOVE TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             EXEC SQL FETCH"
             MOVE SQLCODE"" 
             DISPLAY "SQLCODE should be 100; its value is DISPLAY" C14721 :en
              " should be 020; itsvalue ", SQLSTATE
           PERFORM NOSUBCLASS THRU SQLCODEjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
 (  NOT    NOT0000") then
               MOVE 0 TO flag
             END-IF
             if (NORMSQ                   0 TO
             then
MOVE en
             END-IF
             DISPLAY  " "

             DISPLAY "CLOSE C14721;"
             EXEC SQL CLOSE C14721 END-EXEC
 SQLCODE
           PERFORM CHCKOK  NOT   E4
             DISPLAY  " "

             DISPLAY "DECLARE C14722 CURSOR FOR"
             DISPLAY    "
             DISPLAY " (HU.STAFF3 NATURAL LEFT JOIN HU.STAFF)"
             DISPLAYNATURAL
             DISPLAY " ORDER SQLCODE TO SQL-COD
EXEC DECLARE CURSOR
               SELECT EMPNUM FROM
NATURAL
               NATURAL INNER JOIN            NOSUBCLASS EXIT-NOSUBCLASS
                

             DISPLAY "OPEN C14722;"
             SQLC14722
                          java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
           PERFORMCHCKOK
             DISPLAY  " "

             MOVE "xxx DISPLAY "CLOSE;"
 C14722 :;"
             EXEC SQL FETCH C14722 INTO :en SQLCODE SQL-COD
             MOVE SQLCODE   
           PERFORM CHCKOK java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
             DISPLAY "enNATURALINNER HU.STAFF4"
             if (en  NOT  =   "E4 "then
               MOVE 0 TO flag
             END-IF

             MOVE "xxx" TO INNERJOIN.STAFF4
             DISPLAY "FETCH C14722 INTO :en;"
             EXEC SQL FETCH C14722 INTO :en END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "en should be 'E5 '; its value is '", en, "
             if (en  NOT  =   "E5 "then
               MOVE 0 TO flag
             END-IF

             DISPLAY "FETCH C14722 INTO en;"
             EXEC SQL FETCH C14722 INTO :en END-EXEC
           ERFORM
             DISPLAY "SQLCODE should DISPLAY" shouldbeE4its value '",en '
              " should be 0200; value is ",SQLSTATE
           PERFORM               MOVE 0TO flag
             if (SQLCODE  NOT 
               MOVE TO
             END-IF
             ifDISPLAY" C14722 INTO :en;"
             then
               DISPLAY "Valid OVESQLCODE OSQL-COD
             END-IF
             DISPLAY  " "

             DISPLAY "CLOSE C14722;"
             EXEC CLOSEC14722
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "DECLARE C14723 CURSOR FOR"
             DISPLAY " SELECT EMPNUM FROM"
             DISPLAY " HU.STAFF3 NATURAL LEFT JOIN"
             DISPLAY " (HUSTAFF NATURAL JOIN HU.STAFF4)"
             DISPLAY " END-IF
             java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               SELECT EMPNUM FROM
               HU NATURALLEFT
               (HU.STAFF NATURAL INNER JOIN HU.
               ORDER  END-EXEC

             DISPLAYOPEN"
             EXEC SQL OPEN NOSUBCLASSTHRU
              SQLCODE SQL-COD
           PERFORM CHCKOKMOVE0TO
Y  " "

              "xxx TOen
             DISPLAY "FETCH C14723 INTO :en;"
             EXEC
               TO
           PERFORM
             DISPLAY                ""
             if (en  NOT  =   "E1 "then
               MOVE TO
             END-IF

             MOVE "xxx" TO en
             DISPLAY "FETCH C14723 INTO :
              FETCH: 
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "en should be 'E2 '; its value is '", en, "'"
             if (enNOT=  "E2 "then
               MOVE 0 TO flag
             END-IF

             MOVE "xxx" TO en
             DISPLAY "FETCH C14723 INTO :en;"
            EXECSQL C14723 INTO :en
             MOVE SQLCODEEXECSQL C14723 CURSOR
           PERFORM CHCKOK
             DISPLAY " .STAFF3 NATURAL LEFT JOIN
             if(  NOT  =" "then
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
             C14723

             MOVE " java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
              FETCH
                 INTO 
             MOVE SQLCODE TO               SQLCODE SQL-COD
           PERFORM en' ;itsvalueis'  'java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
             DISPLAY "en should be 'E4 '; its value is '", en
                " "then
                             "FETCH C14723INTO:;"
             

              "" TO
             DISPLAYDISPLAYen E3its,, 'java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
             EXEC SQL FETCH C14723 INTO :en END-EXEC
             MOVE SQLCODE TO
           PERFORM CHCKOK
             DISPLAY "en should be 'E5 '; EXEC FETCH C14723 java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
 en"then
               MOVE 0 TO en=" " then
             END-IF

             DISPLAYMOVE"TOen
EXEC C14723 
             MOVE SQLCODE TO SQL-COD TO
             DISPLAY "SQLCODE should be 100; its value is ", SQL-COD
             "SQLSTATEshouldbe 000; its value is ", java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
           PERFORM NOSUBCLASS THRU flag
             if (SQLCODE  NOT =  100             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
               EXEC FETCH INTO END-EXEC
             END-IF
             if (NORMSQ   " shouldjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 72
             then
               DISPLAYMOVE  flag
i       "20"NORMSQ
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17

             DISPLAY "CLOSE C14723;"
             EXEC SQL CLOSE C14723 " ;java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             MOVE SQLCODEMOVE TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
D  " "
             DISPLAY

             DISPLAY "ROLLBACK WORK;"
             EXEC SQL ROLLBACK WORK
MOVE TOSQL-COD

             if (  INSERT HU
               DISPLAYVALUES4'''''
               EXEC SQL INSERT INTO HU.TESTREPORT
VALUESpass
               MOVE SQLCODE TO SQL-CODSQL INTOHU
else
               DISPLAY " dml147.pco *** fail *** "
               EXEC SQL INSERT INTO HU.TESTREPORT
                 ('04''','PCO)END-EXEC
               MOVE SQLCODE
               COMPUTE errcnt = errcnt + 1
             END-IF

              ===============java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70

             EXEC SQL      ******************** BEGIN TEST0842 *******************
             MOVE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      ******************** END TEST0841 ********************
      ******************** BEGIN TEST0842 *******************
 flag

             DISPLAY C SQLCODE -
             DISPLAY " Multi-column joins"
              
             DISPLAY SINTEGER
             DISPLAY " - - - - - - - - - - - - - - - D "     DECIMAL

             COMPUTE SQLCODEEXECSQL TABLE java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
MOVE "" TO

              CREATE
             DISPLAY " SALARY INTEGER,"
             DISPLAY " EMPNAME CHAR(20),"
              "GRADE DECIMAL,
              CHCKOK
             EXEC SQL CREATE TABLE STAFF66 (
               SALARY   INTEGER,
               EMPNAME CHAR(20),
               GRADE   DECIMAL,
               EMPNUM  CHAR(3)) END-EXEC
             MOVE SQLCODE
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
             EXEC SQL COMMIT WORK END-EXEC
             MOVE SQLCODE TO SQL-COD
FROM WHERE 'java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
             DISPLAY  " "

             DISPLAY "INSERT INTO STAFF66"
               SELECT  RADE
             DISPLAY"FROMHUSTAFF3WHERE > E2'"
             EXEC SQL INSERT INTO STAFF66
               SELECT GRADE*1000, EMPNAME, GRADEEXEC SQL UPDATEHU.STAFF3 EMPNUM = '' WHEREEMPNUM =
               FROM HU  TO SQL-COD
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

                          EXEC SQ UPDATESTAFF3 ='' GRADE
      -    " 'E5';"
             EXEC SQL   java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
'
             MOVE SQLCODE TO xxxen
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY   NATURAL
- ;java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
             EXEC SQLSTAFF66 INNER HU END-EXEC
             12 END-EXEC
MOVE TO
           PERFORM CHCKOK
DISPLAY  beisgr

      *7.5 SR 6 d 
      *Table STAFF66 has 3 rows, only 1 matching on all columns 

             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename
             MOVE 0 TO "
             MOVE "xxx" TO en
             MOVE 0 TO sl
             MOVE 0  flag
             DISPLAY "SELECT * INTO :ename, :gr, :en, ( NOT Carmen"    en  =
                   JOIN
M 0  flag
               STAFF66 NATURAL INNER JOIN  NOTVienna
             MOVE flag
           PERFORM CHCKOK
             DISPLAY" 143 java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 48
      -    " is '", ename, "'"
             DISPLAY "gr should be 13; its D "    ORDER  ASC
             DISPLAY "en should be 'E3 '; its value is '", en, "'"
             DISPLAY "sl should be 13000; its value is ", sl
             DISPLAY "ct should be 'Vienna '; its value is '",
             ct, "'"
             if (gr  NOT =  13  OR  sl  NOT =  13000) then  SQL-COD
               MOVE 0 TO flag
             END-IF
             if (
             DISPLAY "FETCH C14731 INTO :en, :ename, :sl:;"
                0TO
             MOVE SQL-COD
             if (ctjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
               MOVE 0 -    " is '", ename
             

             DISPLAY "DECLARE C14731 CURSOR FOR"
             DISPLAY             
              " HUSTAFF3NATURALLEFTOUTERJOINSTAFF66java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
                    A"
             EXEC SQL DECLARE C14731 CURSOR FOR
M , SALARY
               HUMOVETO
                  ''
ORDER ASC

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

                          if     E3    NOTthen
             MOVE "xxxxxxxxxxxxxxxxxxxx" TOEND-IF
             MOVE 0 TO indic1
MOVE flag
             EXEC SQL FETCH
MOVE ename
           PERFORM CHCKOK
:ename
              SQLC14731 en, ::indic1
      -    " is '", ename, "'"
             DISPLAY enE4 ', ""
             if (en  NOT  =DISPLAY" shouldbe Ali'  value
               MOVE 0 TO  " should -1 its value " java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
             END-IF
             if (ename  NOT  =   "Betty "then
               MOVE 0 TO flag
             

             MOVE "xxx" TO
             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename
             COMPUTE indic1 = -1
             MOVE   :,:name
              FETCH ::indic1
             EXECjava.lang.StringIndexOutOfBoundsException: Range [36, 18) out of bounds for length 36
             MOVE SQLCODE TO  Editsjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
           PERFORM CHCKOK"indic1shouldbe -; is" java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
             DISPLAY "en should be 'E3 '; its value is '", en, "'"
             DISPLAY "ename should be 'Carmen '; its value
      -"is',ename 'java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
             DISPLAY "sl should be 13000; its value is ", sljava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
DISPLAY should ;itsvalue ,
             if (en  NOT  =   "E3 "  OR               FETCHC14731 :,:nameindic1
               MOVE 0 TO flag
             END-IF
             if (ename  NOT  =   "Carmen "  OR  sl  NOT NOSUBCLASS EXIT-NOSUBCLASS
             130)
               MOVE 0 TO flag
             END-IF


             MOVE
             MOVE 0 TO indic1
DISPLAYC14731:indic1
             
  java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORM CHCKOK
             DISPLAY "en should be 'E4 '; its P CHCKOK
             DISPLAY "ename should be 'Ali '; itsjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      -    " is '", ename, "'"
             DISPLAY "indic1 should be -1; its value is ", indic1
             if (en  NOT  S EMPNUM, FROM
               MOVE EMPNUM
             END-IF
             if (ename  NOT  =   "Ali "then
               MOVE 
             

             MOVE "xxx"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             MOVE "xxxxxxxxxxxxxxxxxxxx"MOVE"TOename
             MOVE 0 TO indic1
             DISPLAY "FETCH C14731 INTOD "FETCHINTO, ename:;"
               FETCH INTO, enamesl 
             MOVE SQLCODE TO SQL-COD
           PERFORM java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY "en should be 'E6 '; its value is '",             DISPLAY enameEd v
             DISPLAY "ename should be 'Ed '; its value
      -    " is '", ename, "'"
             if    =" "  OR  NOT0then
    00 its
 0 java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
                           (  NOTE4  ORindic1  0) java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
             if (ename  NOT  =   "Ed "then
               MOVE 0 TO flag
             END-IF

             DISPLAY "FETCH C14731 INTO :en, :ename, :sl:indic1;"
             END-IF
             MOVE SQLCODE TO SQL-COD
             DISPLAY " MOVE"" TO ename
             DISPLAY "SQLSTATE should be 02000;
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
if     0  OR       "200 then
               MOVE 0 TO flag
             END-IF
             if (NORMSQ   =   "02000"  AND  NORMSQM SQLCODE 
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
java.lang.StringIndexOutOfBoundsException: Range [20, 14) out of bounds for length 25

DISPLAY java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             EXEC SQL CLOSE C14731 END-EXEC
               TO
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "DECLARE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY " MOVE"xxxxxxxxxxxxxxxxxxxx
             DISPLAY  STAFF66 UTERSTAFF
             DISPLAY " WHERE EMPNUM > 'E1'"
             DISPLAY " ORDER BY EMPNUM DESC;"
             EXEC SQL DECLARE C14732 CURSOR FOR
               SELECT EMPNUM, EMPNAME, SALARY FROM
               STAFF66  OUTER HU
               WHERE EMPNUM > 'E1'
               ORDER BY EMPNUM DESC END-EXECDISPLAY  beis'java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66

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

             MOVE "xxx" TO java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             MOVE "xxxxxxxxxxxxxxxxxxxxDISPLAY" C14732en,::indic1
               =1
             MOVE 0 TO sl
             DISPLAY "FETCH C14732 INTO :en, :ename, :sl:indic1;DISPLAY" should20;  valueSQLSTATE
             EXEC SQL FETCH C14732PERFORM THRU
              SQLCODE
           PERFORM CHCKOK
             DISPLAY "en should be 'E5 '; its value is '",END-IF
             ename its
      -    " is '", ename, "'"
             DISPLAY "sl shouldDISPLAY "Valid SQLSTATE."
             DISPLAY " END-EXEC
             if (en  NOT  =   "E5 "  OR  indic1  NOT java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY*  HU
             
             if (     WHERE
             13000) then
               MOVE 0 TO flag
             END-IF

             MOVE "xxx" TO en
             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename
             COMPUTE indic1 = -1
             MOVE 0 TO slDISPLAYOPENjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
             DISPLAY "FETCH C14732 INTO :en, :ename, :sl:indic1;"
             EXEC SQL FETCH C14732 INTO :enjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             MOVETO
            CHCKOK
             DISPLAY "TO en
             DISPLAY "ename should be 'Don '; its value
      -    " is '", ename, "'MOVE indic1
             DISPLAY "sl should be 12000; its value is ", sl
             DISPLAY "indic1 should be 0; its value is EXEC FETCHC14733 :ename :, :, ::indic1java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
             if (en  NOT  =   "E4 "  OR  indic1  NOT  SQLCODE SQL-COD
                          PERFORM java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             END-IF
             if (ename  NOT  =   "Don "                gr
             12000) then
               MOVE 0 TO flag
             END-IF

 "xxx" TO
             MOVE "xxxxxxxxxxxxxxxxxxxx" TO  TO
             COMPUTE indic1 = -1
              0 TO
             DISPLAY "FETCH C14732java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
             EXECjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             MOVE SQLCODE TO SQL-COD
           PERFORM
DISPLAYen ' ;java.lang.StringIndexOutOfBoundsException: Range [66, 43) out of bounds for length 66
             DISPLAY "ename should be 'Carmen '; its value
      -    " is '", ename, "'"
             DISPLAY "sl should be 13000; its value is ", sl
              C14733: :gr :sl
             if (en-     :ct
                0 TOflag
             END-IF
             if (ename  NOT  =   "Carmen "  OR  sl  NOT = 
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
                     java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
             END-IF

             MOVE "xxx"""
             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename
             MOVE 0 TO indic1
             MOVE 0 TO sl
 FETCH,::;
             EXEC SQL FETCH C14732 INTO :en, :ename, :sl:indic1 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOKctNOT" =00java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             DISPLAY "ename should be 'Betty '; its value
      -    " is '", ename, "'"
             DISPLAY "indic1 should be -1; its value is ", indic1
             if (en  NOT  =   "E2 "  OR  indic1  NOT =  -1) then
               MOVE 0 TO flag
             END-IF
             if (ename  NOT  =   "Betty "then
               MOVE   flag
             END-IF

             DISPLAY "FETCH C14732 INTO :en, :ename, :sl:indic1;"
             EXEC SQL FETCH C14732 INTO"ename should be 'Don ' itsvalue
             MOVE SQLCODE TO SQL-COD
isSQL-COD
             DISPLAY "SQLSTATE should be 02000; its value is ", SQLSTATE " E4' is en java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODE  NOT =  1java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
                0TO
             END-IF
             if (NORMSQ   =   "0 2)then
             then
               DISPLAY               MOVE TO
             END-IF
             DISPLAY  " "

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

             DISPLAY "DECLARE C14733 CURSOR MOVE0 gr
             DISPLAY   FROM JOIN
             DISPLAY " USING ( 0TO sl
             DISPLAY " WHERE EMPNUM > 'E1'"
             DISPLAY " ORDER BY EMPNUM;"
             EXEC -"ct"
SELECT* STAFF66 JOIN.STAFF
               USING (GRADE, EMPNUM:ct
               WHERE EMPNUM > 'E1'
               ORDER BY EMPNUM END-EXEC

             DISPLAY "OPEN C14733;"
             EXEC SQL OPEN C14733 END-EXEC
             OVE TO
           PERFORM CHCKOK
             DISPLAY  ""

             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename
             MOVE 0 TO gr
             MOVE "xxx"              DISPLAYsl000; its" java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
             MOVE "xxxxxxxxxxxxxxx" TO"'"
              0  indic1
             DISPLAY                OVE flag
      -    " :ct;"
             EXEC SQL FETCH C14733 INTO :ename, :gr, :en, :sl:indic1,
             :ct END-EXEC
             MOVE SQLCODE TO SQL-COD
            CHCKOK
             DISPLAY "ename should be 'Betty '; its value
      -    " is '", ename, "'"
             DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY "en should be 'E2- ":;"
             DISPLAY "indic1 should be -1; its value is ", indic1
             DISPLAY "ct should be 'Vienna '; its value is '",
             ct, "'"
             if (en  NOT  =   "E2 "  OR  indic1  NOT =  -1) then
               MOVE 0 TO flag  TO
             DISPLA" should be10 valueisjava.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 68
             if (ename  NOT  =   "Betty "  OR  gr  NOT java.lang.StringIndexOutOfBoundsException: Range [0, 69) out of bounds for length 50
             10) then
               MOVE 0 TO flag
             END-IF
             if (ct  NOT  =   "Vienna "then
M 0 flag
             END-IF

             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename
             MOVE 0 TO gr
             MOVE xxxTO
             MOVE "xxxxxxxxxxxxxxx" TO ct  "
             MOVE
             DISPLAY "FETCH C14733 INTO :ename, :gr, :en, :sl:indic1,
      -    " :ct;"
             EXEC SQL FETCH C14733 INTO :ename, :gr, :en, :sl:indic1,
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "ename should be 'Carmen '; its value
      -    " is '", ename, "'"
             DISPLAY "gr should be 13; its value is ", gr
             DISPLAY "en should be 'E3 '; its value is '", en, "'"
             DISPLAY "sl should be 13000; its value is ", sl
             DISPLAY "indic1 should be 0; its value is ", indic1WHERE  E1
              " should be 'Vienna ; valueis'"",
             ct, "'"
             if (en  NOT  =   "E3 "  OR  indic1  NOT =  0) then
               MOVE 0 TO flag
             END-IF
              (ename   " "OR  NOT 
             13) then
               MOVE 0TOjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             END-IF
             if (ct  NOT  =   "Vienna "  OR  sl  NOT =  13000)
             then
               MOVE 0 TO flag
             END-IF

             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename
             MOVE 0 TO gr
             MOVE "xxx" TO en
             MOVE "xxxxxxxxxxxxxxx" TO ct
             MOVE 0 TO sl
             DISPLAY "FETCH C14733 INTO :ename, :gr, :en, :sl:indic1,
        FETCH INTO, :gr ename,
             EXEC SQLsl:, :ename2 END-EXEC
             :ct END-EXEC
              SQLCODE SQL-COD
           PERFORM CHCKOK" should be ' '; value is'" en,""
             DISPLAY "ename should be 'Don '; its value
      -    " is '", ename, "'"
             DISPLAY "gr should be 12; its value is ", gr
             DISPLAY "en should be 'E4 ; is" en""
             DISPLAY "sl should be 12000; its value is ",DISPLAY  e Vienna,
DISPLAYindic10 ts ,indic1
             DISPLAY "ct should be 'Deale '; its value is '",
             ct, "'"
             if (enNOT=   E4    indic1 =0)then
               MOVE 0 TO flag
             END-IF
             ifename     "on "OR  
             12) then
               MOVE 0 TO                0 TO flag
             END-IF
             if(    =   "Deale ORsl NOT = 1200java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
             then
               MOVE 0 TO flag
             END-IF

             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename
             MOVE 0ifindic1 =-        1then
             MOVE "xxx" TO en
             MOVE "xxxxxxxxxxxxxxx" TO ct
             MOVE 0 TO sl
             DISPLAY "FETCH C14733 INTO :ename, :gr, :en, :sl:indic1,
      -    " :ct;"
             EXEC SQL FETCH C14733 INTO :ename, :gr, :en, :sl:indic1,
             :ct END-EXEC
             MOVE SQLCODE TO   
           PERFORM CHCKOK FETCHINTOen,:,:"
                ::indic1:;java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
      -    " is '", ename, "'"
             DISPLAY " shouldbe3 value "gr
             DISPLAY "en should be 'E5 '; its value is '", en, "'"
             DISPLAY "sl should be 13000; its value is ", sl
             DISPLAY "indic1 should be 0; its value is ", indic1
             DISPLAY "ct should be 'Akron '; DISPLAY should be'' itsvalueis', en, "'"
ctjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
             if (en  NOT  =   "E5 "  OR  indic1  NOT =  0) then
               MOVE 0 TO flag
             END-IF
             if (ename  NOT  =   "Ed "  OR  gr  NOT = 
             13) then
               MOVE 0 TO flag
             END-IF
             if (ct  NOT  =   "Akron "  OR  sl  NOT =  13000)
             then
               MOVE 0 TO flag
             END-IF

             DISPLAY "FETCH C14733 INTO :ename, :gr, :en, :sl:indic1,
      -    " :ct;"
             EXECSQLFETCH INTO :ename gren:sl,
             :ct END-EXEC
             MOVE SQLCODE TO SQL-COD
             DISPLAY SQLCODE be0;its is SQL-COD
             DISPLAY "SQLSTATE should be 02000; its value is ", SQLSTATE
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODE  NOT =  100  OR  NORMSQif ename"Carmen " java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
               MOVE 0 TO flag
             END-IF
              (NORMSQ"200"  AND NORMSQ  NOT  =SQLSTATE
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
             DISPLAY  " "

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


             DISPLAY " SELECT * FROM HU.STAFF3 LEFT JOIN STAFF66"
             DISPLAY " USING (GRADE, EMPNUM)"
             DISPLAY " WHERE EMPNUM > 'E1'"
             DISPLAY"ORDERBYEMPNUM ASC;"
             EXEC SQL "" TO
                *  HUSTAFF3LEFTJOIN 
               USING (GRADE, EMPNUM              0 sl
               WHERE EMPNUM > 'E1'
               ORDER BY EMPNUM ASC END-EXEC

             DISPLAY "OPEN C14734;"
               OPENC14734
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

MOVE ename
             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename2
             MOVE 0 TO gr
             MOVE "xxx" TO en
             MOVE "xxxxxxxxxxxxxxx" TO ctDISPLAY" shouldbeDeale' its
             MOVE 0 TO              "indic1 should0 value ",indic1
             MOVE 2 TO indic1
             MOVE 2 TO indic2
             DISPLAY "FETCH C14734 INTO :en, :gr, :ename, :ct,"
             DISPLAY " :sl:indic1, :ename2:indic2;"
              SQL C14734 INTO :en:gr:, :ct,
               :sl:indic1, :ename2:indic2 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "en should be 'E2 '; its value is '",en'java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
             DISPLAY "gr should be 10; its value is ", gr
             DISPLAY "ename should be 'Betty '; its value
      -    " is '", ename                0 TO flag
             DISPLAY "ct should be 'Vienna '; its value is '",
             ct, "'"
             DISPLAY "indic1 should be -1; its value is ", indic1
             DISPLAY "indic2 should be -1; its value is ", indic2
              (n    =   E2   ORgr =  1) 
               MOVE 0 TO flag
             END-IF
             if (ename  NOT  =   "Betty "then
               MOVE 0 TO flag
             END-IF
             if (ct  NOT  =   "Vienna "then
               MOVE 0 TO flag
             END-IF
             if (indic1NOT  OR  NOT  )then
               MOVE 0 TO flag
             END-IF

             MOVEMOVE TOflag
             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename2
             MOVE 0 TO gr
             MOVE "xxx" TO en
             MOVE " MOVE"xxxxxxxxxxxxxxxxxxxxTO
             MOVE 0 TO sl
             MOVE 2 TO indic1             MOVETOgr
             MOVE 2 TO indic2
             DISPLAY "FETCH C14734 INTO :en, :gr, :ename, :ct,"
             DISPLAY " TO en
             EXEC SQL FETCH C14734 INTO :en, :gr, :ename, :ct,
               :sl:indic1, :ename2:indic2 MOVETO
             MOVEMOVE TO indic1
           PERFORM CHCKOK
             DISPLAY "en should be 'E3 '; its value is '", en, "'"
             DISPLAY "gr should be 13; its value is ", gr
             DISPLAY "ename should be 'Carmen '; its value
      -   " '", ename"
             DISPLAY "ct should be 'Vienna '; its value is '",
             ct, "'"
             DISPLAY "ndic1should be 0;itsvalueis " java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
             DISPLAY "sl should be 13000; its value is ", sl
             DISPLAY "indic2 should be 0; its value is ", indic2
             DISPLAY "ename2 should be 'Carmen ';its value
      -    " is '", ename2, "'"
             if (en  NOT  =   "E3 "  OR  gr  NOT =  13) then
               MOVE 0 TO flag
             END-IF
             if (ename  NOT  =   "Carmen ")               "ct shouldbe'Akron'; its value is '",
               MOVE 0 TO flag
             END-IF
             if (ct  NOT  =   "Vienna "then
               MOVE flag
             END-IF
             if (indic1  NOT =  0  OR  indic2  NOT =  0) then
               MOVE 0 TO flag
             END-IF
             if (sl  NOT =  13000  OR  ename2  NOT  =   "Carmen
      -    " "then
               MOVE 0 TO flag
             END-IF

             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename
              "" TOename2
             MOVE 0 TO gr
 "
             MOVE "xxxxxxxxxxxxxxx" TO ct
             MOVE 0 TO sl
             MOVE 2 TO indic1
             MOVE 2 TO indic2
             DISPLAY "FETCH C14734 INTO :en, :gr, :ename, :ct,"
             DISPLAY " :sl:indic1, :ename2:indic2;"
             EXEC SQL FETCH C14734 INTO :en, :gr, :ename, :ct,
               :sl:indic1, :ename2:indic2 END-EXEC
              SQLCODE SQL-COD
           PERFORM CHCKOK
             DISPLAY "en should be 'E4 '; its value is '", en, "'"
             DISPLAY "gr should be 12; its value is ", gr
             DISPLAY "ename should be 'Ali '; its value
      -   " is ',ename "'
             DISPLAY "ct should be 'Deale '; its value is '",
             ct, "'"
             DISPLAYindic1should ; value",indic1
             DISPLAY "sl should be 12000; its value is ", sl
DISPLAYindic2 ;its , java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
             DISPLAY "ename2 should be 'Don '; its value
      -    " is '", ename2, "'"
             if (en  NOT  =   "E4 "  OR  gr             
               0TO
             END-IF
             if (ename  NOT  =   "Ali "then
               MOVE 0 TO flag
             END-IF
             if (ct  NOT  =   "Deale "then
               MOVE 0 TO flag
             END-IF
             if (indic1  NOT =  0  OR  indic2  NOT =MOVE TO
                          PERFORM CHCKOK
             END-IF
             if (sl  NOT =  12000  OR  ename2  NOT  =   "Don
      -    " "then
               MOVE 0 TO flag
             END-IF

                          MOVExxxxxxxxxxxxxxxxxxxx ename
             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename2
             MOVE 0 TO gr
             MOVE               "xxxxxxxxxxxxxxx"TO
             MOVE "xxxxxxxxxxxxxxx" TO ct
MOVE sl
             MOVE 2 TO indic1
             MOVE 2 TO indic2
             DISPLAY "FETCH C14734 INTO :en, :gr, :ename, :ct,"
              " sl:indic1, :ename2indic2"
             EXEC SQL FETCH C14734 INTO :en, :gr, :ename, :ct              " USING(GRADE, EMPNUM)"
: : java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
             MOVESQLCODE SQL-COD
           PERFORM CHCKOK
             DISPLAY "en should be 'E6 SALARY STAFF66.java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
             DISPLAY "gr should be 13; its value is "", gr
             DISPLAY "ename should be 'Ed '; its value
      -    " is '", , "'"
             DISPLAY "ct should be 'Akron '; its USING (, EMPNUM)
             ,""
             DISPLAY "indic1 should be -1; its TO SQL-COD
                        PERFORM CHCKOK
             if (en  NOT  =   "E6 "  OR  gr  NOT =              " should be 'E3'; its value is '",, '
  O java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             END-IF
              (ename  =  "then
               MOVE 0 TO flag
             END-IF
             if (ct  NOT  =   "Akron "then
               MOVE 0 TO flag
             ND-IF
             if (indic1  NOT =  -1  OR  indic2  NOT =  -1) then
               MOVE 0 TO flag
             END-IF

              "FETCH C14734 en gr :, :ct,"
             DISPLAY " :sl:indic1, :ename2:indic2;"
             EXEC SQL FETCH C14734 INTO :en, :gr, :ename, :ct,
               :sl:indic1, :ename2:indic2 END-EXEC
             MOVE SQLCODE TO SQL-COD
             DISPLAY "SQLCODE should be 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             if(  NOT =1000  OR  ename2  NOT  =   Carmen         
             END-IF
             if (NORMSQ   =   "02000"  AND  NORMSQ  NOT  =   SQLSTATE)
             then
               DISPLAY "Valid implementation-defined SQLSTATE
             END-IF
             DISPLAY  " "

             DISPLAY "CLOSE C14734;"
             EXEC SQL CLOSE C14734 END-EXEC     . LEFT STAFF66
             MOVE SQLCODE TO SQL-COD    EMPNUM
           ERFORM java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY  " "

      *Similar to above, except for explicit names of columns 

                (GRADE EMPNUM
             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename2
             MOVE 0 TO gr
             MOVE "xxx" TO en
             MOVE"xxxxxxxxxxxxxxx" TO ct
             MOVE 0 TO sl
             DISPLAY "ELECTEMPNUM,GRADE HUSTAFF3.EMPNAME,CITY,java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
             DISPLAY " SALARY, STAFF66.EMPNAME"
             DISPLAY " INTO :en, :gr, :ename, :ct, :sl, :ename2"
             DISPLAY " FROM HU.STAFF3 LEFT JOIN STAFF66"
             DISPLAY " USING (GRADE, EMPNUM)"
DISPLAYWHERE
             EXEC SQL SELECT EMPNUM, GRADE              "xxxxxxxxxxxxxxxxxxxx"  ename2
               SALARY, STAFF66.EMPNAME
               INTO :en, :gr, :ename, :ct, :sl, :ename2
               FROM HU.STAFF3 LEFT JOIN STAFF66
               USING (GRADE, EMPNUM)
               WHERE EMPNUM = 'E3' END-EXEC
             MOVE SQLCODE TO SQL-COD
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 25
             DISPLAY             : END-EXEC
             DISPLAY" be 13; its value is ", gr
             DISPLAY "ename should be 'Carmen '; its value
      -    " is '", ename, "'"
             DISPLAY "ct should be 'Vienna '; its value is '",
             ct, "'"
             DISPLAY "sl should be 13000; its value is ", sl
              " should be 'Carmen '; its value
      -    " is '", ename2, "'"
             if (en  NOT  =   "E3 "  OR  gr  NOT =  13) then
               MOVE 0 TO flag
             END-IF
             if (ename, ""
               MOVE 0 TO flag
             ND-IF
             if (ct  NOT  =   "Vienna "then
               MOVE 0 TO flag
             END-IF
             if (sl  NOT =  13000  OR  ename2  NOT  =   "Carmen
      -   " " then
               MOVE 0 TO flag
             END-IF

             DISPLAY "DECLARE C14735 CURSOR FOR"
             DISPLAY " SELECT EMPNUM, GRADE, HU.STAFF3java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 29
             DISPLAY " SALARY, STAFF66.EMPNAME"
             DISPLAY " FROM HU.STAFF3 LEFT JOIN STAFF66"
             DISPLAY " USING (GRADE, EMPNUM)"
             DISPLAY " WHERE EMPNUM = 'E3';"
             EXEC SQL DECLARE C14735 CURSOR FOR
               SELECT EMPNUM, GRADE, HU.STAFF3.EMPNAME, CITY,
               SALARY, STAFF66.EMPNAME
               FROM HU               MOVE 0 TO flag
               USING (GRADE, EMPNUM)
               WHERE EMPNUM = 'E3' END-EXEC

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

             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename
             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename2
             MOVE 0 TO gr
             MOVE "xxx" TO en
             MOVE "xxxxxxxxxxxxxxx" TO ct
             MOVE 0 TODISPLAY "SELECT COUNT (*) INTO :int1"
             DISPLAY "FETCH C14735 INTO :en, :gr, :ename, : DISPLAY "  FROM STAFF66NATURAL JOIN HU.ROJ
          ":ename2;java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
             EXEC SQL FETCH C14735 INTO :en, :gr, :ename, :ct, :sl,
             :ename2 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "en should be 'E3 '; its value is '", en, "'"
             DISPLAYgr1   ,gr
             DISPLAY "ename should be 'Carmen '; its value
      -    " is '", ename, "'"
             DISPLAY" should be 'Vienna '; its is '",
             ct, "'"
             DISPLAY "sl should be 13000; its value is ", sl
             DISPLAY "ename2 should be 'Carmen '; its value
      -    " is '", ename2, "'"
             if(  NOT=" "  OR  gr  NOT =  13) then
               MOVE 0 TO flag
             END-IF
             if (ename              " FROM HU.STAFF3 LEFT JOIN STAFF66 USING
               MOVE 0 TO flag
             END-IF
             if (ct  NOT  =             DISPLAY" NION"
               MOVE 0 TO flag
             END-IF
ifNOT100    ename2  =   "Carmenjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
      -    " "then
                             " BY EMPNUM;"
             END-IF

             DISPLAY "CLOSE C14735;"
             EXEC SQL CLOSE C14735 END-EXEC
             MOVE SQLCODE TO SQL-COD
            
             DISPLAY  " "

      *REF: 7.5 GR 1 d ii  This is a cartesian product 

             MOVE 0 TO int1
             DISPLAY "SELECT COUNT (*) INTO :int1"
             DISPLAY " FROM STAFF66 NATURAL RIGHT JOIN HU.PROJ;"
             EXEC SQL SELECT COUNT (*) INTO :int1
               FROM STAFF66 NATURAL RIGHT JOIN HU.PROJ END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY             DISPLAY  " "
             if (int1  NOT =  18) then
               MOVE 0 TO flag
             END-IF

      *FULL OUTER JOIN of tables with unique data in the joined column

             DISPLAY "DECLARE C14736 CURSOR FOR"
             DISPLAY " SELECT EMPNUM, CITY, SALARY"
              " HU.STAFF3LEFTJ STAFF66 USING
      -    " (EMPNUM)"
             DISPLAY " UNION"
             DISPLAY " SELECT EMPNUM, CITY, SALARY"
             DISPLAY    ROM STAFF66
      -    " (EMPNUM)"
              " BY EMPNUM;"
             EXEC SQL DECLARE C14736 CURSOR FOR
               SELECT EMPNUM, CITY, SALARY
               FROM HU.STAFF3 LEFT JOIN STAFF66 USING (EMPNUM)
               UNION
               SELECT EMPNUM, CITY, SALARY
               FROM.STAFF3RIGHT STAFF66 ()
               ORDER BY EMPNUM END-EXEC

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

             MOVE "xxx" TO en
             MOVE "xxxxxxxxxxxxxxx" TO ct
             MOVE 0 TO indic1
             DISPLAY "FETCH C14736 INTO :en, :ct MOVE "xxxxxxxxxxxxxxx" TO java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
             EXEC SQL FETCH C14736 FETCHen:sl"
                          EXEC FETCHC14736 :en :t, ::indic1
           PERFORM CHCKOK
             DISPLAY "en should be 'E1 '; its value is '", en, "' PERFORM CHCKOK
              ct Deale  ,
             ct, "'"
             DISPLAY "indic1 should be -1; its value is ", indic1
             if (en  NOT  =   "E1 "  OR  ct  NOT  =   "Deale ")
             then
               MOVE 0 TO flag
             END-IF
             if (indic1 (en  =" "java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 72
               MOVE 0TO
             END-IF

              "xxx"  en
             MOVE "xxxxxxxxxxxxxxx" TOEND-IF
             MOVE 0 TO indic1
             DISPLAY "FETCH C14736 INTO :en, :ct, :sl:indic1;"
             EXEC SQL FETCH C14736 INTO :en, :ct, :sl:              0  sl
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
                          EXEC SQL C14736 en ct: END-EXEC
             DISPLAY" should be 'Vienna '; its is '",
             ct, " CHCKOK
             DISPLAY "indic1 should be -1; its value is "             "ct should be 'Vienna '; its value is',
             if (en  NOT  =   "E2 "              " should be 1300 value is ", java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
             then
               MOVE 0 TO flag
             
             if (indic1  NOT =  -1) then
               MOVE 0 TO flag
             END-IF

             MOVE "xxx" TOMOVExxxxxxxxxxxxxxx ct
             MOVE "xxxxxxxxxxxxxxx" TO ct
               TO
             COMPUTE indic1             DISPLAY" C14736 INTO:en,:, :sl:;"
             " en ct sl:;"
             EXEC SQL FETCH C14736 INTO :en, :ct, :sl:indic1 CHCKOK
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "en should be 'E3 '; its value is '", en, "'"
             DISPLAY "ct should be 'Vienna '; its value is '",
ct
             DISPLAY "sl should be 13000; its value is ", sl
             DISPLAY "indic1 should be 0; its value is ", indic1
             if (en  NOT  =   "E3 "  OR  ct  NOT  =   "Vienna ")
             then
               MOVE 0 TO flag
             END-IF
              (  NOT100OR  NOT=0 then
               MOVEjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
              "xxxxxxxxxxxxxxx TOct

MOVE"xx TOen
             MOVE "xxxxxxxxxxxxxxx" TO ct
             MOVE 0 TO sl
             COMPUTE indic1 = -1
             DISPLAY "FETCH C14736INTO en,ct slindic1;java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
             EXEC           PERFORMCHCKOK
             MOVE SQLCODE             DISPLAY "n should be 'E5 ';its value is'",en, "'"
           java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY "en should be 'E4 '; its value is '", en,if  NOT=   E5
             DISPLAY "ct should be 'Deale '; its value is '",
             ct, "'"
             DISPLAY "sl should be 12000; its value is ",               (sl=100    indic1= )then
             DISPLAY "indic1 should be 0; its value is ", indic1  TO
             if (en  NOT  =   "E4 "  OR  ct  NOT  =   "Deale ")
             then
               MOVE 0 TO flag
             END-IF
if  NOT10    indic1)java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
                0 TO
             END-IF

             MOVE "xxx CHCKOK
              "" TO
              " should be Akron '  value
             MOVE 0 TO indic1ct '"
             DISPLAY "FETCH C14736 INTO :en, :ct:indic1, :sl;"
EXECFETCH en:, :sl
             MOVE SQLCODE TO
           PERFORMMOVE TO
             DISPLAY "en should be 'E5 '; its value is '", en, "'"
             DISPLAY "sl should be 130 0 TO flag
             DISPLAY "indic1 should be -1; its value is ", indic1
             if (en   " C14736 :, :ct, :sl:indic1"
               MOVE 0 TO flag
             END-IF
             if (sl  NOT =  13000  OR  indic1  NOT =  -1) then
                           NOSUBCLASS EXIT-NOSUBCLASS
             END-IF

             MOVE "xxx" TO en
             MOVE "xxxxxxxxxxxxxxx" TO ct
             MOVE 0 TO indic1
             DISPLAY "FETCH C14736 INTO :en, :ct, :sl:indic1;"
             EXEC SQL FETCH C14736 INTO :en, :ct, :sl:indic1END-IF
             MOVESQLCODE SQL-COD
           PERFORM CHCKOK
             DISPLAY "en should be 'E6 '; its value is '",               SQL WORK
             DISPLAY "ct should be 'Akron '; its value is '",
             ct, "'"
             DISPLAY "indic1 should be -1; its value is ", indic1
             if (en  NOT  =   "E6 "  OR  ctDISPLAY"ROP CASCADEjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
             then
               MOVE 0 TO flag
             END-IF
             if(indic1 =  -1 then
               MOVE 0 TO flag
             END-IF

              " C14736 INTO :en, :ct,:sl:indic1;"
             EXEC SQL FETCH C14736 INTO :en,
             MOVEEXECSQL  .TESTREPORT
             DISPLAY "SQLCODE should be 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 0 TO flag
             END-IF
             if (NORMSQ   =   "02 SQLCODE TO SQL-COD
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
DISPLAY"

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

             DISPLAY " * **** Procedures for PERFORM statements
             EXEC SQL DROP      *Test SQLCODE and SQLSTATE for normal completion. 
             MOVE SQLCODE TO SQL-COD
           PERFORMCHCKOK
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
             EXEC SQL COMMIT WORK END-EXEC
             MOVEjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
           PERFORM CHCKOK
             DISPLAY  " "


             if ( flag      *subclass begins in position 3 of char array NORMSQ 
               DISPLAY " *** pass *** "
               EXEC SQL INSERT INTO HU.TESTREPORT
                 VALUES('0842','pass','PCO'END-EXECMOVE0  NORMSQX
               MOVE SQLCODE TO SQL-COD
             else           
               DISPLAY " dml147.pco *** fail *** "
               EXEC SQL INSERT INTO HU.TESTREPORT
                 VALUES('0842','fail','PCO'END-EXEC
GOEXIT-NOSUBCLASS
               COMPUTE errcnt = errcnt + 1
             END-IF

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

              SQLCOMMIT WORK
             MOVE SQLCODETO
      ******************** END TEST0842 ********************
      **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
            RUN

      *    ****  Procedures for PERFORM statements

      *Test SQLCODE and SQLSTATE for normal completion. 
       CHCKOK.
             DISPLAY "SQLCODE should be 0; its value is ", SQL-COD
             DISPLAY "SQLSTATE should be 00000; its value is ", SQLSTATE
             PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODE NOT =  0  OR   NORMSQ NOT = "00000"then
               MOVE 0 TO flag
java.lang.StringIndexOutOfBoundsException: Index 4 out of bounds for length 0
             if (NORMSQ = "00000"  AND  NORMSQ NOT = SQLSTATE2
             then
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             END-IF
             .

       NOSUBCLASS.

      *This routine replaces valid implementation-defined       
      *subclasses with 000.  This replacement equates valid     
      *implementation-defined subclasses with the 000 value     
      *expected by the test case; otherwise the test will fail. 
      *After calling NOSUBCLASS, NORMSQ will be tested          
      *                          SQLSTATE will be printed.      

           MOVE SQLSTATE TO NORMSQ

           MOVE 3 TO norm1
      *subclass begins in position 3 of char array NORMSQ 
      *valid subclass begins with 5-9, I-Z, end of ALPNUM table 
           PERFORM VARYING norm2 FROM 14 BY 1 UNTIL norm2 > 36
           if (NORMSQX(norm1)  =  ALPNUM(norm2)) then
             MOVE "0" TO NORMSQX(norm1)
           END-IF
           END-PERFORM
           
      *Quit if NORMSQ is unchanged.  Subclass is not impl.-def. 
      *Changed NORMSQ means implementation-defined subclass,    
      *so proceed to zero it out, if valid (0-9,A-Z)            
           if (NORMSQ   =   SQLSTATE) then
             GO TO EXIT-NOSUBCLASS
           END-IF

           MOVE 4 TO norm1
      *examining position 4 of char array NORMSQ 
      *valid characters are 0-9, A-Z 
           PERFORM VARYING norm2 FROM 1 BY 1 UNTIL norm2 > 36
           if (NORMSQX(norm1)  =  ALPNUM(norm2)) then
             MOVE "0" TO NORMSQX(norm1)
           END-IF
           END-PERFORM
          
           MOVE 5 TO norm1
      *valid characters are 0-9, A-Z 
      *examining position 5 of char array NORMSQ 
           PERFORM VARYING norm2 FROM 1 BY 1 UNTIL norm2 > 36
           if (NORMSQX(norm1)  =  ALPNUM(norm2)) then
             MOVE "0" TO NORMSQX(norm1)
           END-IF
           END-PERFORM
   
      *implementation-defined subclasses are allowed for warnings 
      *(class = 01).  These equate to successful completion 
      *SQLSTATE values of 00000. 
      *Reference SQL-92 4.28 SQL-transactions, paragraph 2 

           if (NORMSQX(1)  =  "0"  AND  NORMSQX(2)  =  "1"then
             MOVE "0" TO NORMSQX(2)
           END-IF
           .

       EXIT-NOSUBCLASS.
           EXIT.

96%


¤ Diese beiden folgenden Angebotsgruppen bietet das Unternehmen0.76Angebot  ¤

*Eine klare Vorstellung vom Zielzustand






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 ist noch experimentell.