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

Quelle  dml147.cob   Sprache: Cobol

 
       IDENTIFICATION DIVISION.
       PROGRAM-ID.  DML147.
       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                                              
      *                                                              
      ****************************************************************



           EXEC SQL BEGIN DECLARE SECTION END-EXEC
       01  SQLCODE PIC S9(9) COMP.
       01  SQLSTATE        IDENTIFICATIONDIVISION
       01  uid PIC8java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
      *                                                              
          PIC
PIC  X2java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
0ename2
       01  ct PIC()DISPLAYSIGN.
       1sl(9  SIGN.
       01  gr PIC S9(9) DISPLAY SIGN LEADING SEPARATE  S9SIGN SEPARATE
       01  indic1 SECTION
       indic2(DISPLAY LEADING.
       01  int1norm2(9)DISPLAY LEADING.
             EXEC SQL VALUE
       01  norm1 PIC   PIC XOCCURS.
       0   PIC(9)  LEADING.
       01  ALPNUM-TABLE 9  SIGN.
               "01234ABCDEFGH56789IJKLMNOPQRSTUVWXYZ"       1 PIC6.
           5 PICOCCURS.
       01  NORMSQ0   PIC(9)DISPLAY LEADING.
       PROC DIVISION.
       
      *date_time declaration 
       01  TO-DAYAUTHIDjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
       01  THE-TIME PIC 9(8).
       01                SQLCODE

       01                SQLCODEjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36

        DIVISION.
       P0.

             MOVE "FLATER " TO uid
             CALL "AUTHID" USING uid
             MOVE "not RUN
             EXEC SQLjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             MOVE TO SQL-COD
             java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
              SQLCODE SQL-COD
              "9-byte ID"
DISPLAY: User   .  Useruidx
      -    " connected"
            STOP       *date_time print 
             
             MOVE 0 TO errcnt

             DISPLAY
           ACCEPT THE-TIME TIME
             DISPLAY
           "59-byte ID"
             DISPLAY "TEd Version #"
      *date_time print 
           ACCEPT TO-DAY FROM DATE
           ACCEPT THE-TIME FROM TIME
           DISPLAY "Date java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

             DISPLAY "References:"
             MOVE               --     -------- java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63

             DISPLAY              CREATE)"
 Roll
             DISPLAY "References:"
DISPLAY#-schema
             PERFORM

             
             MOVE "xxxxx" TO SQLSTATE ROLLBACK

                          MOVE SQL-COD
D  " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             MOVEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
 CHCKOK
             DISPLAY  " "

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

DISPLAY WORK
             EXEC SQL ROLLBACKSQLCODE  )
             MOVE 0  flag
PERFORM
              SQLSTATE0 value

      *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 SQL INSERT INTO
             java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
                Valid
             DISPLAY "SQLCODE should
             if (SQLCODE  NOT SQL WORK
MOVE flag
             END-IF
                         CHCKOK
           PERFORM NOSUBCLASS
             if (NORMSQ                     java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
               MOVE 0 TO flagMOVE TO
             END-IF"
 " WORK;"
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."MOVE  SQL-COD
             END-IF

             DISPLAY "ROLLBACK WORK;"
             EXEC SQL ROLLBACK WORK
             MOVE SQLCODE TO SQL-COD " FROM;
           PERFORMCHCKOK
             DISPLAY""

             DISPLAYCREATENOT_HERE
             DISPLAY " DISPLAY "SQLCODE should <0 its is ", SQL-COD
             EXEC SQL VIEWNOT_HERE
               SELECT * FROM                0 TO
               TO
           PERFORM CHCKOK
             DISPLAY  " "if   =   "4200 )

             DISPLAY "ROLLBACK WORK;"
            EXEC ROLLBACKW END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

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

ALTERjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
              " ;java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
EXEC SELECT *  :
               FROM NOT_HERE END-EXEC
             MOVE SQLCODE TO SQL-COD
             DISPLAY "SQLCODE should be < 0; its value is ", SQL-COD
             if (SQLCODE  NOT <  0) thenMOVESQLCODE SQL-COD
MOVE  flag
             END-IF
             DISPLAY "SQLSTATE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (NORMSQ  NOTPERFORM
               MOVE 0 TO
             END-IF
             if (NORMSQ      *This is a syntax error.  If it is rejected at compile time,  
             then" :nt1java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
               DISPLAY "Valid implementation-defined SQLSTATE SQL SELECTCOUNT()INTO:int1
END-IF

             DISPLAY "ROLLBACK WORK;"
             EXEC SQL ROLLBACK WORK              DISPLAY "SQLCODE should be valuejava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
LCODE SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "ALTER TABLE USIG"
             DISPLAY " ADD COLUMN NUL INT;"
             EXEC SQL ALTER TABLE USIG
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             MOVE SQLCODE TO SQL-COD
           PERFORMjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
             DISPLAY  " "

                           ROLLBACK
             EXEC ROLLBACK END-EXEC
             MOVE SQLCODESQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

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

                           SQLCODE SQL-COD
             DISPLAY " FROM USIG WHERE NUL IS NULL;"
               SELECT) int1
               java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             MOVE SQLCODE TO SQL WORK
             MOVE TO
            CHCKOK
MOVE flag
             END-IF
             DISPLAY "SQLSTATE should be 42000; java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
           PERFORM NOSUBCLASS THRU "SELECTCOUNT() :int1"
   ="200) then
               MOVE 0 TO flagEXEC SQL SELECT(*  :int1
             END-IF
             if (NORMSQ   =   "42000"  AND  NORMSQ  NOT  =   SQLSTATE)
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF

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

             DISPLAY "DROP TABLE USIG CASCADE;"
             EXEC DROP CASCADE
             MOVE SQLCODE TO SQL-COD SQLCODEjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORM CHCKOK
              50  int1

             DISPLAY "ROLLBACK WORK;"
             EXEC SQL ROLLBACK WORK END-EXEC
                SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             MOVE 50 TO int1
             DISPLAY "SELECT COUNT(*) INTOjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 33
             DISPLAY " FROM U_SIG;"
             EXEC SQL SELECT COUNT(*) INTO :int1DISPLAY "nt1should be2 is , int1
               FROM U_SIG END-EXEC             ifint1   2 then
             MOVE SQLCODE
           PERFORM
             DISPLAY"int1 should be 2; its value is ",int1
             if (int1  NOT =  2) then
               MOVE 0 TO flag
             END-IF

             DISPLAY "ROLLBACK WORK;"
             EXEC SQL
D
           PERFORM CHCKOK
DISPLAY"

             MOVE 50 TO int1
             DISPLAY "SELECT COUNT(*) INTO :int1"
 " FROM;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
             EXEC SQL
                USIG
             MOVE SQLCODE TO SQL-COD                SQL INSERT HUTESTREPORT
           PERFORM CHCKOK
              " should be ;itsvalue is "
             if                 = errcnt
               MOVE 0 TO "====================="
             END-IF

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


               DISPLAY " *** pass ** ":"
               EXEC SQL INSERT INTODISPLAY" 3.3.4.4 PP.2 -- Order of evaluation"
                 VALUES             DISPLAY " . - Format of joined arensjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
               MOVE TO
             else
DISPLAY       .pco *** java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
               EXECSQLCODE
                 VALUES('D "INSERT HU."
               MOVE SQLCODE TO SQL-COD
               COMPUTE errcnt = errcnt + 1
             END-IF

             DISPLAY "= DISPLAY"SELECT HU"

             EXEC SQL COMMIT END-EXEC
MOVESQL-COD
      ******************** END TEST0840 ********************
      ******************** BEGIN TEST0841 *******************
             SELECTHU

             DISPLAY " "
AY   of
             DISPLAY "References:"
             DISPLAY " F# " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY " 3.3java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
DISPLAY    .-Format >"
             DISPLAY " - - - - - - - - - - - - - - - - - - -"

             COMPUTE SQLCODE D " NATURAL JOIN HU.STAFF4"
             MOVE "xxxxx" TO SQLSTATE

             DISPLAY "DELETE FROM HU.SELECT EMPNUM FROM .STAFF3
EXEC DELETE HU END-EXEC
             MOVE SQLCODE TO SQL-COD INNERHU

             DISPLAY "INSERT INTO HU.STAFF4"
                           " ;
             DISPLAY " WHERE EMPNUM > 'E3';"
             EXEC SQL INSERT INTO HU CHCKOK
               SELECT * FROMMOVETO
               WHERE EMPNUM > 'E3' END-EXEC
             MOVE SQLCODE TO SQL-COD
PERFORM
             DISPLAY  " "

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

DISPLAY  "
             DISPLAY " SELECT EMPNUM FROM HU.STAFF3"
DISPLAY  JOIN
             DISPLAY " NATURAL INNER JOIN HU.STAFF4"
             DISPLAY " ORDER BY EMPNUM DESC;"
             EXEC SQL "" TO
               SELECT EMPNUM FROM HU.STAFF3  C14721 END-EXEC
               NATURAL LEFT JOIN HU.STAFF
              en    '", ,""
               ORDER BY EMPNUM DESCen  =" ")then

              "OPEN C14721;"
             EXEC SQL OPEN C14721 END-EXEC
              SQLCODETO SQL-COD
           PERFORM CHCKOK
             DISPLAY  ""

             MOVE "xxx TOen
 FETCH INTO;"
             EXEC SQL FETCH C14721 INTODISPLAYSQLSTATE20 isSQLSTATE
             MOVE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY              if(QLCODE =  100  ORNORMSQ  =   "2then
             if (en  NOT  =   "E5 "then
               MOVETO flag
             END-IF

              "xxx" TO
             DISPLAY "FETCH C14721 INTO :en;"
             EXEC SQL FETCH C14721
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "en should be MOVE TO SQL-COD
             if (en  =   " "then
               MOVE 0 TO flag
             END-IF

                           "SELECTEMPNUMFROMjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
             EXEC " INNER JOIN HU.STAFF4"
MOVE SQL-COD
             DISPLAY               SQL C14722 FOR
             DISPLAY "SQLSTATE should be 02000; its (HU.STAFF3 NATURAL LEFT JOIN HU.STAFF)
PERFORM THRU
             if (SQLCODEORDERBY EMPNUM ASC END-EXEC
               MOVE 0 TO flag
             END-IF
             if (NORMSQ   =   " EXEC OPEN END-EXEC
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IFPERFORM 
             DISPLAY  " "

DISPLAY C14721
             EXEC SQL              DISPLAY "FETCH INTOen
             MOVE TOSQL-COD
           PERFORM CHCKOK
             DISPLAY""

             DISPLAY "DECLARE C14722 CURSORFOR"
             DISPLAY " SELECT EMPNUM FROM"
             DISPLAY " (HU.STAFF3 NATURAL LEFT JOIN HU.STAFF)"
    JOIN
             DISPLAY " ORDER BY EMPNUM ASC;"
             EXEC SQL DECLARE C14722 CURSOR FOR
               SELECT EMPNUM FROM
               (HU.STAFF3
               NATURAL JOIN HU
               ORDER BY EMPNUM ASC END-EXEC

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

             MOVE "xxx" TO en
             DISPLAY "FETCH C14722 INTO :en;"
             EXEC SQL
             MOVE SQLCODE:java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
P CHCKOK
 en  ' '; its is,,""
             if (DISPLAYSQLSTATE0its,
               0TO
             END-IF

             MOVE "xxx"                 0 flag
              FETCH
             EXEC
M T 
           PERFORM CHCKOK
             DISPLAY "en should SQL END-EXEC
             if (en  NOT  =   "E5 "then
               MOVE    .INNER
END-IF

             DISPLAY "FETCH C14722 INTO :en;"
             EXEC SQL FETCH C14722 INTO :en.STAFF3  JOIN

             DISPLAY                 BYEMPNUM
             DISPLAY "OPEN C14723;"
           PERFORM  EXIT-NOSUBCLASS
             MOVE TO
                  flag
             END-IF
             MOVE" java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             then
               DISPLAYMOVESQLCODE SQL-COD
             END-IF
DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

                0 flag
             
             MOVE
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY " EXECSQL C14723 INTO enEND-EXEC
             DISPLAY " SELECT EMPNUM FROM"
             DISPLAY " HU.STAFF3 NATURAL LEFT JOIN"
                  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                FETCH END-EXEC
               DECLARE FOR
               SELECT
HUJOIN
               (             if en   E3
               ORDER BY EMPNUM END-EXEC

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

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

             MOVE "xxx" TO en
             DISPLAY" C14723 INTO :en;"
             EXEC SQL FETCH C14723 INTO             EXECSQLFETCH C14723 :enEND-EXEC
MOVE TOSQL-COD
           PERFORM CHCKOK
             DISPLAY"en should be 'E2 '    ",en, ""
             if (en  NOT  =   "E2 "then
               MOVE 0 TO flag
             END-IF

             MOVE "xxx" TO E4
DISPLAY   en
             EXEC SQL FETCH C14723 INTOEND-IF
             MOVE SQLCODE TOMOVExxx en
           PERFORM CHCKOK
             DISPLAY " should be ' '; its value is '", en ""
             if (en  NOT  =   "E3 "then
               MOVE 0 TO flag
             END-IF

             MOVE "xxx" TO en
             DISPLAY "FETCH C14723 INTO :en;"
             EXECSQL C14723INTO :en END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "en should be 'E4 if (en NOT = "E5 "
             if(  NOT  =  E4)then
               MOVE 0 TO flag
             END-IF

             MOVE "xxx en
             DISPLAY "FETCH C14723 INTO :en;"
             EXEC SQL              SQL FETCH INTO :enEND-EXEC
             MOVE SQLCODE SQL-COD
           PERFORM CHCKOK
              DISPLAY   20; its, SQLSTATE
             if (en  NOT  =   "E5 "then
               MOVE 0 TOjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             END-IF

             DISPLAY "FETCH C14723 INTO :en;"
              SQLFETCH C14723 :en
             MOVE SQLCODE TO SQL-COD
             DISPLAY "SQLCODE should be 100; its value is ", SQL-COD
             DISPLAY SQLSTATE be 02000; its value is ", SQLSTATE
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODE  NOT =  100  OR  NORMSQ  NOT  =   "02000"then
                0 TO
             END-IF
             f(NORMSQ  =   "0000 AND NOT = SQLSTATE)
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
             DISPLAY  " "

             DISPLAY"LOSEC14723"
             EXEC SQL CLOSE C14723 END-EXEC
              SQLCODE SQL-COD
           PERFORM CHCKOK
             ISPLAY "

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

              SQLCODE SQL-COD
               DISPLAY "
               EXECSQL INTO.TESTREPORT
                 ('081,pass,PCO) END-EXEC
               MOVE SQLCODE TO SQL-COD
             else
               DISPLAY " dml147.pco *** fail *** ('0841','','PCO') END-EXEC
               EXEC  INSERT .TESTREPORT
                 VALUES('0 java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
               MOVE SQLCODE TO SQL-COD
               COMPUTE errcnt = errcnt                 VALUES81,fail'
             END-IF

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

             EXEC SQL COMMIT WORK END-EXECDISPLAY"==================================="
             MOVE SQLCODE TO SQL-COD
      ******************** END TEST0841 ********************
      ******************** BEGIN TEST0842 *******************
             MOVE 1 TO flag

             DISPLAY " TEST0842 "
             DISPLAY " Multi-column joins"
             DISPLAY "References:"
             DISPLAY " F# 4 -- Joined table"
             DISPLAY " - - - - - - - - - - MOVE1 TO flag

             OMPUTE = -1
             MOVE "xxxxx" TO SQLSTATE

             DISPLAYDISPLAY"References:"
             DISPLAY" SALARY ,"
             DISPLAY " EMPNAME CHAR(20),"
             ISPLAYGRADE,"
             DISPLAY " EMPNUM CHAR(3));"
             EXEC SQL CREATETABLE STAFF66(
               SALARY   INTEGER,
               EMPNAME              MOVExxxxx SQLSTATE
               GRADEDISPLAY" TABLE STAFF66 ("
               EMPNUM  CHAR(3)) END-EXEC
             DISPLAY   "
RFORM
             DISPLAY  " "

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

             DISPLAY "INSERT INTO STAFF66"
             DISPLAY " SELECT GRADE*1000, EMPNAME, GRADE, EMPNUM"
             DISPLAY " FROM HU.STAFF3 WHERE EMPNUM > 'E2';"
             EXEC SQL INSERT INTO STAFF66
               SELECT GRADE*1000, EMPNAME, GRADE, EMPNUM
                HU.STAFF3 EMPNUM > 'E2'END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY" SELECT GRADE*1000,EMPNAME,G, EMPNUM"
      -    " 'E5';"             DISPLAY     . EMPNUM 'E2'';java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
              SQL HU SETE6 EMPNUM
             'E5' END-EXEC
             MOVESQLCODE
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "UPDATE HU.STAFF3 SET EMPNAME = 'Ali' WHERE GRADE =
      -    " 1
             EXEC SQL HU. SET EMPNAME Ali WHERE =
             12 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY""

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

                          '5'END-EXEC
             MOVE 0 TO gr
             MOVE"xxx" TO en
             MOVE 0 TO sl
             MOVE "xxxxxxxxxxxxxxx" TO ct
             DISPLAY "SELECT * INTO :ename, :gr, :en, :sl, :ct FROM"
             DISPLAY "STAFF66 INNER JOIN HU.STAFF3;"
             EXEC SQL SELECT * INTO          "12"
                NATURALINNER JOIN.STAFF3
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY             MOVE SQLCODETO SQL-COD
      -    " is '", ename, "'"
              "gr should 13; its value is ", gr
             DISPLAY "en should be 'E3 '; its value is
             DISPLAY "sl should be 13000; its value is ", sl
             DISPLAY "ct should be 'Vienna '; its value is '",
             ct,"'java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
             if (gr  NOT =  13  OR  sl  NOT =  13000) then
               MOVE TO
             END-IF
             ifename="Carmen "  OR  NOT 
              "E3 "thenDISPLAY " STAFF66NATURAL INNERJOIN HU.STAFF3;"
               OVETO
             END-IF
             if (ctNOT  =   " "then
               MOVE 0 TOflag
             END-IF

             DISPLAY "DECLAREC1731CURSORFOR"
             DISPLAY " SELECT EMPNUM, EMPNAME, SALARY FROM"
             DISPLAY " HU.STAFF3 NATURAL LEFT OUTER JOIN STAFF66"
             DISPLAY " WHERE EMPNUM > 'E1'"
             ISPLAYORDER BYEMPNUM;"
             EXEC SQL DECLARE C14731 CURSOR FOR
               SELECT EMPNUM, EMPNAME, SALARY FROM
               HU.STAFF3 NATURAL LEFT OUTER JOIN STAFF66
               WHERE EMPNUM > 'E1'
               ORDER BY EMPNUM ASC END-EXEC

             DISPLAY "OPEN C14731;"
             EXEC SQL OPEN C14731 END-EXEC
             MOVE SQLCODETO
           PERFORM CHCKOK
             DISPLAY  " "

             MOVE "xxx" TO en
             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename
             MOVE 0 TO indic1
indic1
             EXEC SQL               MOVE  flag
             MOVE SQLCODE TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORM CHCKOK
             DISPLAY "en should be 'E2 '; its value is '", en, "'"
             DISPLAY "ename should be 'Betty '; its value
      , "'"
             DISPLAY "indic1 should be -1; its value is ", indic1
             if (en  NOT  =   "E2 "  OR  indic1  NOT =  -1) thenEND-IF
               MOVE 0 TO flag
             END-IF
             if (ename  NOTDISPLAY" HU. "
               MOVE 0 TO flag
             END-IF

             MOVE "xxx" TO en             DISPLAY" ORDERBYEMPNUM ASC;"
             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename
             COMPUTE indic1,EMPNAME FROM
             MOVE 0  sl
             DISPLAY "FETCH C14731 INTO :en, :ename, WHERE EMPNUM>'E1'
                BY EMPNUM END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
EXEC SQL C14731
             DISPLAY "ename should be 'Carmen '; its value
      -    " is '", ename, "'"
             DISPLAY "sl should be 13000; its value is ", sl
             DISPLAY "indic1 should be 0; its value is ", indic1
 (en  NOT=" "  ORindic1 =  0) then
               MOVE 0 TO flag
             END-IF
             if (ename  NOT  =   "Carmen "  OR  sl  NOT = 
             13000) then
                0 TO
             END-IF

             MOVE "xxx" TO en
              "xxxxxxxxxxxxxxxxxxxx" TO
             MOVE 0 java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY "FETCH C14731 INTO :en, :ename, :sl:indic1;"
EXEC FETCH C14731 INTO:, :ename:sl END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY" should be 'E4 '; its value is ', en, ""'java.lang.StringIndexOutOfBoundsException: Range [66, 67) out of bounds for length 66
             DISPLAY ename be'Ali ';its
      -    " is '", ename, "'"
             DISPLAYindic1be;its is,indic1
             if (en  NOT  =   "E4 "  OR  indic1  NOT =  -1) then
               MOVE 0 TO flag
             END-IF
             if (ename  NOT  =   "Ali "then
               MOVEEND-IF
             END-IF

             MOVE "xxx" TO en
             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename
             MOVE 0 TO indic1
             DISPLAY "FETCHC14731INTO en :name, :sl:indic1;"
             EXECDISPLAY" C14731 INTO :en, :ename,:sl:indic1;"
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "en should be 'E6 '; its value is '", en, "'"
shouldbe'Ed '; its value
      -    " is '", ename, "'"
             DISPLAY " should be - its value ",indic1
             if (en  NOT  =   "E6 "  OR  indic1  NOT =  -1) then
               MOVE 0 TO flag
             END-IF
             if (ename  NOT-     ", ,""
               MOVE 0 TO flag
             END-IF

             DISPLAY "FETCH C14731 INTO :en, :ename, DISPLAY "indic1 be0 its value is" indic1
             EXECSQLFETCH C14731 INTOen :, :sl:indic1 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
           PERFORMNOSUBCLASS THRU
             if (SQLCODE  NOT =  100  OR  NORMSQ00 then
               MOVE 0 TO flag
             END-IF
             if (NORMSQ   =   "02000"  AND  
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
             DISPLAY  " "              "FETCH C14731 INTO :en, :ename, :l:;"

             DISPLAY "CLOSE MOVESQLCODE TOSQL-COD
             EXEC SQL CLOSE C14731 END-EXEC
             MOVE SQLCODE TO SQL-COD
           ERFORM
             DISPLAY  " "

             DISPLAY "DECLARE C14732 CURSOR FOR"
             DISPLAY " SELECT EMPNUM, EMPNAME, SALARY FROM"
             DISPLAY " STAFF66 NATURAL RIGHT OUTER JOIN HU.STAFF"
             DISPLAY " WHERE EMPNUM > 'E1'"
             DISPLAY " ORDER BY EMPNUM DESC;"
             EXEC SQL DECLARE C14732 CURSOR FOR
               ELECT, EMPNAME SALARY
               STAFF66 NATURAL RIGHT OUTER JOIN HU.STAFF
               WHERE > 'E1'
               ORDER BY EMPNUM DESC END-EXEC

             DISPLAY "OPEN C14732;"
             EXEC SQL OPEN C14732 END-EXEC
              SQLCODE TO SQL-COD
           PERFORMEND-IF
             DISPLAY  " "

             MOVE "xxx" TO en
             MOVE "xxxxxxxxxxxxxxxxxxxx ename
             COMPUTE indic1 = -1
             MOVE 0 TO sl
             ISPLAY C14732  :en :ename, :slindic1
             EXEC SQL FETCH C14732 INTO :en, :enameEXECSQLFETCH C14731 :en:, ::indic1END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "en should be 'E5 '; its value is '", en, "'"
DISPLAY " should be 'Ed '; its value
      -    " is '", ename, "'"
             DISPLAY "sl should be 13000; its value is ", sl
             DISPLAY "indic1 should be 0; its value is ", indic1
              (enNOT=   E5  OR  indic1 =  ) 
               MOVE 0 TO flag
             END-IF
             if (ename  NOT  =   "Ed "  OR  sl  NOT = 
             13000) then
               MOVE 0 TO flag
             END-IF

             MOVE "xxx" TO en
             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename
             COMPUTE indic1 = -1
             MOVE 0 TO sl
             DISPLAY "FETCH C14732 INTO :en, :ename, :sl:indic1;"
             EXEC SQL FETCH C14732 INTO :en, :ename, :sl:indic1 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "en should be 'E4 '; its value is '", en, "'"
             DISPLAY "ename should be 'Don '; its value
      -    " is '", ename, "'"
             DISPLAY"sl should be120; its value is ", sl
             DISPLAY "indic1 should be 0; its value is ", indic1               MOVETOflag
ifen  =   "E4 "  OR    NOT= 0)then
               MOVE 0 TO flag
             END-IF
             if (ename  NOTjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             12000) then
               MOVE 0 TO flag
             END-IF

             MOVE "xxx" TO en
             xxxxxxxxxxxxxxxxxxxx
             COMPUTE indic1 = -1
java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 25
             DISPLAY "FETCH C14732 INTO :en, (SQLCODENOT =100 OR NORMSQNOT =000")then
             EXEC SQL FETCH C14732 INTO :en, :ename, :sl:indic1 END-EXEC
             OVE TOSQL-COD
           PERFORM CHCKOK
             DISPLAY "en should be 'E3 '; its value is '", en, "'"
             DISPLAY "ename should be 'Carmen '; its value
      -    " is '", ename, "'"
             DISPLAY "sl should be 13000; its value is ", sl             DISPLAY  " "
             DISPLAY "indic1 should be 0; its value is ", indic1
             if (en  NOT  =   "E3 "  OR  indic1              "CLOSEC14731;"
               MOVE 0 TO flag
             END-IF
             if (ename  NOT  =   "Carmen "  OR  sl  NOT =             MOVESQLCODE SQL-COD
             13000) then
               MOVE 0 TO flag
             END-IF

             MOVE "xxx" TO en
              " TO ename
             MOVE 0 TO indic1" NATURAL RIGHTO JOIN HU.STAFF"
             MOVE 0 TO sl
             DISPLAY "FETCH C14732 INTO :en, :ename, :sl:indic1;"
             EXEC SQL FETCH C14732 INTO :en, :ename, :sl:indic1 END-EXEC
             MOVE SQLCODE TO SQL-COD NATURALRIGHT JOIN.STAFF
           PERFORM CHCKOK
             DISPLAY "enshould 'E2 '; its value is '", en""
             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
               MOVETO flag
             END-IF
             if (ename  NOT  =   "Betty "then
               MOVEen
             END-IF

              FETCH INTO :en, :ename sl;"
             EXEC SQL FETCH C14732 INTO :en             COMPUTE indic1 -
             MOVE SQLCODE TO SQL-COD
             DISPLAY "SQLCODE should be 100; its value is ", SQL-COD
              SQLSTATE be 000;its is ", java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
           PERFORM NOSUBCLASS EXIT-NOSUBCLASS
             if (SQLCODE  NOT =  100  OR  NORMSQ  NOTMOVE TO SQL-COD
               MOVE 0 TO flag
             END-IF
             if (NORMSQ   =   "02000"  AND  NORMSQ  NOT  =    DISPLAY" should be 'Ed '; its value
             then
               ISPLAYValid implementation-definedSQLSTATE accepted.
             END-IF
             DISPLAY  " "

             DISPLAY "CLOSE C14732;"
             EXECSQLCLOSEC14732
             MOVE SQLCODE TO SQL-COD
           PERFORMCHCKOK
             DISPLAY  " "

             DISPLAY "DECLARE C14733 CURSOR FOR"
              " SELECT FROM STAFF66RIGHTJOIN HU.STAFF"
             DISPLAY " END-IF
             DISPLAY" WHERE EMPNUM > 'E1'"
             DISPLAY " ORDER BY EMPNUM;"
             EXEC SQL DECLARE C14733 CURSOR FOR
               SELECT * FROM STAFF66 RIGHT JOIN
               USING (GRADE, EMPNUM, EMPNAME)
               WHERE EMPNUM > 'E1'
               ORDER BY EMPNUM END-EXEC

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

              "xxxxxxxxxxxxxxxxxxxx"  ename
             MOVE 0 TO grPERFORM
TOjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             MOVE "xxxxxxxxxxxxxxx" TO ct
              0TO
             DISPLAY "FETCH C14733 INTO :ename, :gr, :en, :sl:indic1,
      -    " :ct;"
             EXECSQL  INTO, grensl,
             :ct END-EXEC
             MOVE TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORMCHCKOK
             DISPLAY "ename should be 'Betty '; its value
      -    " is '", ename, "'"
             DISPLAY" should be 10; its value is ", gr
             DISPLAY "en should be 'E2 '; its value is '", en, "'"
             DISPLAY "indic1 should be -1; its value is ", indic1
             DISPLAY "ct should be 'Vienna '; its value is '",
             ct, "'"
             if (en  NOT             MOVE en
               MOVE0TO flag
             END-IF
             if (ename  NOTMOVE0T sl
             10) then
               MOVE 0 TO flag
             END-IF
             if (ct  NOT  =   "Vienna "then
               MOVE 0 TO flag
             END-IF

             MOVE              " should be 'E3' its value is '", en, "'"
             MOVE 0 TO gr
             MOVE "xxx" TO en
             MOVE "xxxxxxxxxxxxxxx" TO ct
             MOVE 0 TO sl
             DISPLAY "FETCH INTO ename,, :en, ::indic1,
      ":ct;"
             MOVE flag
             :ct END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "ename 13000) then
      -    " is '", ename, "'"
             DISPLAY "gr should be 13; its value is ", gr
             DISPLAY "en should be 'E3 '; its value is '", en, "'"
             DISPLAY "slshould be 13000;itsvalue is",sl
             DISPLAY "indic1 should be 0; its value is ", indic1
             DISPLAY "ct should be 'Vienna '; its value is '",
             ct "java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
             if (en  NOT  =   "E3 "  OR  indic1  NOT =  0) then
               MOVE 0 TO flag
             END-IF
             if (ename  NOT  =   "Carmen "  OR               DISPLAY" C14732 INTO :en, :ename, slindic1"
             13) then
               MOVE 0 TO flag
             END-IF
             if (ct  NOT  =   Vienna"OR sl NOT 130)
             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 java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
      -MOVE0TO
             EXEC SQL FETCH C14733 INTO
             :ct END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             ISPLAY' ;
      -    " is '", ename, "'"
             DISPLAY "gr should be 12; its value is ",  ",
             DISPLAY"en shouldbe ' ';itsvalue is '", , "'"
             DISPLAY "sl should be 12000; its value is ", sl
             DISPLAY "indic1 should be 0; its value is ", indic1
             DISPLAY "ct should be 'Deale '; its value is '",
             ct, "'"
             if (en  NOT  =   "E4 "  OR  indic1  NOT =  0) then
               MOVE 0 TO flag
             END-IF
             if (ename  NOT  =   "Don "  OR               MOVE  flag
1 java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
                0 flag
             END-IF
             if (ctjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 0
             then
               MOVE 0 TO flag
             END-IF

             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename
                           TO
             MOVE "xxx" TO en
             MOVE "xxxxxxxxxxxxxxx" TO "SELECT* STAFF66RIGHT HU.STAFF"
MOVE TO
             DISPLAY "FETCH C14733 INTO :ename, :gr, :en, :sl:indic1,
          " :ct;"
               SELECT  FROM RIGHT HU
              END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "ename should be 'Ed '; its value
      -    " is '", ename, M SQLCODE SQL-COD
             DISPLAY "gr should be 13; its value is "DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY "en should be 'E5 '; its value is '", en, "'"
 " should be 13 value is ,sl
             DISPLAY "indic1 should be 0; its value is ", indic1
             DISPLAY "ct should be 'Akron '; its value is '",
             ct
             if (en  NOTMOVETO
               MOVE 0 TO
             END-IF
             if (ename  NOT  =   "Ed "  OR  gr  NOT = 
             13) then
               MOVE 0 TO flag
             END-IF
             if (ct  NOT  =              PERFORM
             then
               MOVE 0 TO flag
             END-IF

             DISPLAY "FETCH C14733 INTO :ename, :gr, :en, :sl:indic1,
        ct
             EXEC SQL FETCH C14733 INTO :ename, :gr, :en, :sl:indic1,
             :ct END-EXEC
             MOVESQLCODE SQL-COD
             Y "SQLCODE 0;its ", SQL-COD
             DISPLAY "SQLSTATE should be 02000; its value is ", SQLSTATE
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODE  java.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 21
               MOVE 0 TO flag
             END-IF
             if (NORMSQ               OVE0 TOjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF""  en
             DISPLAY""

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

             DISPLAY "DECLARE C14734 CURSOR FOR"
             DISPLAY " SELECT * FROM HU.STAFF3 LEFT JOIN STAFF66"
             DISPLAY " USING (GRADE, EMPNUM)"
             DISPLAY " WHERE EMPNUM > 'E1'"
             DISPLAY " ORDER BY EMPNUM ASC;"
             EXEC SQL DECLARE C14734 CURSOR FOR
               SELECT * FROM HU.STAFF3 LEFT JOIN STAFF66
               USING (GRADE, EMPNUM)
                EMPNUM>''
               ORDER BY EMPNUM ASCDISPLAYctbe         ' itsvalue s '"java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70

             DISPLAY "OPEN C14734;"
             EXEC SQL OPEN C14734 END-EXEC
             MOVE SQLCODE TO SQL-CODif  NOT=  "Carmen "   gr =java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
           PERFORM CHCKOK  flag
             DISPLAY  " "

             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename
             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename2
             MOVE 0 TO gr
             MOVE "xxx" TO
             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;"
             EXECSQL C14734  :engr,:, :ct
               :slindic1:indic2
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOKMOVE TO
             DISPLAY en beE2 its ,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'itsvalue ',, 'java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
              "ctshouldbe ' '; its value is '",
             ct              " should be ;i value is " indic1
             DISPLAY "indic1 should be -1; its value is ", indic1
             DISPLAYif(  NOT  =" "  OR  NOT  0 java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
             if (  NOT=" gr NOT=java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
MOVE 
             END-IF
             if (ename  NOT (tNOT"Deale "  sl20)
               MOVE 0 TO flag
             END-IF
             if (ct  NOT  =   "Vienna "then
               MOVE 0 TO flag
             END-IF
              (  NOT  1ORindic2NOT= -) java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
               MOVE 0 TO flag
             END-IF

             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename
             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename2
             MOVE 0 TO gr
             MOVE "xxx" TO en
             MOVE "xxxxxxxxxxxxxxx" TO ct
             MOVE0TOsl
             MOVE 2 TO indic1
             MOVE 2 TO indic2
             DISPLAY" C14734 :, :gr, ename ct,
             DISPLAY":slindic1, :ename2indic2"
             EXEC SQL FETCH C14734 INTO :en, :gr, :ename, :ct,
               :sl:indic1, :ename2:              "rshould 1;itsvis" java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
             MOVE SQLCODE beits
           PERFORM CHCKOK
             "en E3 ;its is " en
             DISPLAY             , "'"
             DISPLAY "ename should be 'Carmen '; its value
      -    " is '", ename, "'"
             DISPLAY "ct should be 'Vienna '; its value is '",
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
             DISPLAY
             DISPLAY "indic2 should be 0; its value is ", indic2
             DISPLAY "ename2 should be 'Carmen '; its value
      -    " is '", ename2   C14733,:, :, ::indic1
             if (en  NOT  =   "E3 "  OR  gr" should 10 value ",
               MOVE 0 TO flag
             END-IF
             if(  NOT  =   " ")then
               MOVE 0 TO flag
             END-IF
             if (ctif   =   000   NORMSQ   )
               MOVEjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
             END-IF
             if (indic1  NOT =  0  OR  java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 25
               MOVE 0 TO flag

             if (sl  NOT =  13000  OR  ename2  NOT  =   "Carmen
      -    " "then
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             END-IF

             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename
             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename2
             MOVE 0 TO gr       MPNUM
             MOVExxx en
             MOVESELECTFROM.STAFF3  JOIN STAFF66
             MOVE TO
             MOVE 2 TO indic1
             MOVE 2 TO indic2
             DISPLAY "FETCH C14734 INTO :en, :gr, :ename, :ct,"
             DISPLAY " :sl:indic1, :ename2:indic2;"
             EXEC SQL FETCH C14734EXECSQL  END-EXEC
               :sl:indic1, :ename2:indic2 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM
                          MOVE "xxxxxxxxxxxxxxxxxxxx" TOjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
             DISPLAY "gr should be 12; its value is ", gr
             DISPLAY "ename should be 'Ali '; its value
      -    " is '", ename, "'"
             DISPLAY ct  ' ; its value is '",
             ct, "'"
DISPLAYindic1 be 0; its is
             DISPLAY "sl should be 12000; its value is ", sl
             DISPLAY "indic2 should be 0; its value is ", indic2
             DISPLAY "ename2 should be 'Don '; its value
      -    " is '", ename2, "'"
             if (en  NOT  =   "E4 "  OR  gr  NOT =  12) EXEC FETCHINTO, :, ename
               MOVE 0 TO flag
             DISPLAYshould" , ""
             if (ename  NOT  =   "Ali ")
MOVEjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             END-IF
             if (ct  NOT  =   "Deale "then
               MOVE 0 TO              if(nNOT   "2"OR    NOT0then
             END-IF
             if (indic1  NOT =  0  OR  indic2  NOT =  0) then
               MOVE 0 TO flag
             END-IFMOVETO
             if (sl  indic1  NOT =-1    indic2 =-1 java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
      -    " "then
                0 flag
             END-IF

 " ename
             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename2
              0 
java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             MOVE "xxxxxxxxxxxxxxx" TO ct
              0  sl
              2java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 29
             MOVE 2 TO indic2
             DISPLAY "FETCH C14734 INTO :en, :gr, :ename, :ct,"
             DISPLAY " :sl:indic1, :ename2:indic2;"
             EXEC -    is, , "'java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
" be ; ,indic1
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAYDISPLAYename2;
             DISPLAY "gr should be 13; its value is ", gr
             DISPLAY "ename should be 'Ed '; its value
      -    " is '", ename, "'"
DISPLAY             java.lang.StringIndexOutOfBoundsException: Range [57, 55) out of bounds for length 70
             ct, "'"
             DISPLAY "indic1 should be -1; its value is ", indic1                0 TO
             DISPLAY "indic2 should be -1; its value is ", indic2
             if (en  NOT  =   "E6 "  OR  gr  NOT =  13) then
               MOVE 0 TO flag
             END-IF
             if (ename  NOT  =   "Ed "then
               MOVE 0 TO flag
             END-IF
             if (ct  NOT  =   "Akron "then
               MOVE 0 TOMOVExxxxxxxxxxxxxxxxxxxx ename2
             END-IF
             if (             MOVE "xxx TOen
               MOVE 0 TO flag
             END-IF

             DISPLAY "FETCH C14734 INTO :en, :gr, :ename, :ct,"
             DISPLAY " :sl:indic1, :ename2:indic2;"
             EXEC SQL FETCH C14734 MOVE TO
               :sl:indic1, :ename2:indic2 END-EXEC
             MOVE SQLCODE TO SQL-COD
             DISPLAY "SQLCODE should be 100; its value is ", SQL-COD
             DISPLAY -" ,'java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODE  NOT =  100  OR  NORMSQ  NOT  =   "02000 DISPLAY "indic1  be0 its is  java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
               MOVE 0              " should be 0 its value is" indic2
             END-IF
             if (NORMSQ   =   "02000"  AND  NORMSQ  NOT  =   SQLSTATE)
then
               DISPLAY "ValidMOVE TO flag
             END-IF
             DISPLAY  " "

             DISPLAY "CLOSE C14734;"
             EXEC SQL CLOSE C14734 END-EXEC
              SQLCODE SQL-COD
PERFORM
             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19

      *Similar to above, except for explicit names of columns 

              "" TO
             MOVE "xxxxxxxxxxxxxxxxxxxx" TO ename2
             MOVE 0 TO gr
             MOVE "xxx" TO en
MOVE  ct
             MOVE 0 TO sl
             DISPLAY              0 TO
             DISPLAY " SALARY, STAFF66.EMPNAME"
             DISPLAY " INTO :en, :gr, :ename, :ct, :sl, :ename2"
             DISPLAY:, ::;
DISPLAY GRADE
             DISPLAY " WHERE sl:indic1, :ename2indic2 END-EXEC
             EXEC SQL SELECT EMPNUM, GRADE, HU.STAFF3MOVE  TO
,.EMPNAME
               INTO :en, :gr, :ename, ,gr
               FROM HU.STAFF3isename
 GRADE
               WHERE EMPNUM             ct '
             MOVESQLCODE
PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAYenbe ; its, en""
             DISPLAY "gr should be 13; its value is ", gr
             DISPLAY " MOVE0TO flag
      -    " is '", ename, "'"
if  NOT  ="Ed " java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
             ct, "'"
             DISPLAY "sl should be 13000; its value is ", sl
             DISPLAY "Ejava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
      -    " is '", ename2, "'"
             if (en  NOT  =   "E3 "  OR  gr  NOT =  13) then
               MOVE 0 TO flag
             END-IF
             if (ename  NOT               DISPLAY"FETCHINTO:,:,:enamectjava.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
               MOVE 0 TO flag
             END-IF
             if (ct  NOT  =java.lang.StringIndexOutOfBoundsException: Range [68, 30) out of bounds for length 68
               MOVE 0 TO flag
             END-IF
              sl  300ORename2NOT="
      -    " "then
               MOVE 0 TO flag
             END-IF

             DISPLAY "DECLARE C14735 CURSORjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             DISPLAY " SELECT EMPNUM, GRADE, HU.STAFF3.EMPNAME, CITY,"
             DISPLAY " SALARY, STAFF66.EMPNAME"
             DISPLAY"FROM HUSTAFF3 LEFT JOIN STAFF66"
             DISPLAY " USING (GRADE, EMPNUM)"
             DISPLAY " WHERE EMPNUM = 'E3';"
             EXECPERFORMCHCKOK
               SELECT EMPNUM, GRADE, HU.STAFF3.EMPNAME, CITY,
               SALARY, STAFF66.EMPNAME
               FROM HU      *Similar to above, except for explicit names of columns 
USING,)
               WHERE EMPNUM = 'E3' END-EXEC

              xxxxxxxxxxxxxxx
             EXEC SQL OPEN" ,,.STAFF3EMPNAME CITY"
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             MOVE              " EMPNUM = 'E3';"
             MOVE TO
             MOVE 0 TO gr
             MOVE "xxx" TO en
             MOVE "xxxxxxxxxxxxxxx" TO ct
             MOVE 0 TO sl
             DISPLAY "FETCH C14735 INTO :en, :gr, :ename, :ct, :sl,
      -    " :ename2;"
             EXEC SQL FETCH C14735 
             ename2
             MOVE              "rshouldjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
           PERFORM CHCKOK
             DISPLAY "en shouldjava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 20
             DISPLAY "DISPLAY"ename2beCarmen its
             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 ",E
             DISPLAY "ename2 should be 'Carmen '; its value
      -    " is '", ename2java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             -"")then
               MOVE 0 TO flag
             END-IF
             if (ename  NOT  =   "Carmen "then
               MOVE 0 TO flag
             END-IF
             if (ct  NOT  =   "Vienna "then
               MOVE 0 TO flag
             END-IF
             if (sl  NOT =  13000  OR  ename2  NOT  =   "Carmen
      -    " "then
MOVETO flag
             END-IF

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

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

             MOVE 0 TO int1
             SELECTint1
 FROM  RIGHT.;"
              "ename2"
               FROM STAFF66 NATURAL RIGHT JOIN HU.PROJ END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "int1 should be 18; its value is ", int1 java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
 " should be 13; itsvalueis" java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
               MOVE 0 TO flag
                           ct;value

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

             DISPLAY "if en NOT E3
             DISPLAY " SELECT EMPNUM, CITY, SALARY"
DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
      -    " (EMPNUM)"
 Ujava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
             DISPLAY " SELECT EMPNUM, CITY, SALARY"
             DISPLAY " FROM HU (sl = 300OR NOT =
      -    " (EMPNUM)"
DISPLAYORDER"
             EXEC SQL DECLARE C14736 CURSOR FOR
               SELECT EMPNUM, CITY, SALARY
               FROM HU.STAFF3 LEFT JOIN STAFF66 USING (EMPNUM)
              UNION
               SELECT EMPNUM, CITY, SALARY
               FROM HU.STAFF3 RIGHT JOIN STAFF66 USING (EMPNUM)
               

             DISPLAY "OPEN C14736;"
             EXEC SQL OPEN C14736 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             MOVE "xxx" TO en
             MOVE "xxxxxxxxxxxxxxx" TO ct
             MOVE 0 TO indic1
             DISPLAY "FETCH C14736 INTO :en, :ct, :sl:indic1;"
             DISPLAYFROM  JOIN
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "en should be 'E1 '; its value is '",               "F HU.STAFF3 RIGHTJOIN USING
             DISPLAY "ct should be 'Deale '; its value is '"DISPLAYORDERjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
             ct, "'"
             java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
 HU  JOIN USINGEMPNUM
             then
               MOVE 0 TO flag
             END-IF
             if  CHCKOK
               MOVE 0 TO flag
             END-IF

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

             MOVE "xxx" TO en
             MOVE "xxxxxxxxxxxxxxx" TO ct
MOVETO
             COMPUTE indic1 = -1
             DISPLAY "FETCH C14736 INTO :en, :ct, :sl:indic1;"
EXEC FETCH INTO :,:, :slindic1
             MOVE ct  value
PERFORM
             DISPLAY "en should be 'E3 '; its value is '", en, "'"
DISPLAYshould  '
             ct, "'"
DISPLAYsl100;its,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             END-IF
             if (sl  NOT =  13000  OR  indic1  NOT =  0) then
               MOVE 0 TO flag
             END-IF

             MOVE "xxx" TO en
              "xxxxxxxxxxxxxxx" TO
             MOVE 0 TO sl
             COMPUTE indic1MOVE0 sl
 FETCH  ctindic1
             EXEC SQL FETCH C14736 INTO :enDISPLAY "ETCHC14736INTO:,:,:indic1"
             MOVE SQLCODE TO SQL-COD
           PERFORM
             DISPLAY "en should be 'E4 '; its value is '", en, "'"
             DISPLAY "ct should be 'Deale '; its value is '",
             ct, "'"
             DISPLAY "sl should be 12000; its value is ", sl
             DISPLAY "indic1 should be 0 , "'"
             if (en  NOT  =   "E4 "  OR  ct  NOT  =   "Deale ")
             then
               MOVE 0 TO flag
             END-IF
             if (sl  NOT =  12000  OR  indic1  NOT =  0) then
               MOVEifsl =  30    indic1   ) then
             END-IF

             MOVE "xxx" TO en
MOVE" java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
                          MOVE "" java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             MOVE 0 TO indic1
             DISPLAY "FETCH C14736 INTO :en, :ct:indic1, :sl;"
             EXEC SQL FETCH C14736 INTO :en, : :,::"
             MOVE SQLCODE TO SQL-COD
           PERFORM 
" E5; " en
             DISPLAY "PERFORMCHCKOK
             DISPLAY "indic1 should be -1; its value is ", indic1
              (en  "E5 "then
               MOVE 0 TO flag
             END-IF
if  NOT   30  OR  NOT  -1 java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
               MOVE0TO flag
             END-IF

             MOVE "xxx" TO en
             MOVE "xxxxxxxxxxxxxxx" TO ct
             MOVE 0 TO indic1
             DISPLAY               (sl =  200OR  NOT =  0 then
             EXEC SQL FETCH C14736 INTO :enMOVE flag
             MOVE SQLCODE TO SQL-COD
PERFORM
             DISPLAYMOVExxxxxxxxxxxxxxx ct
DISPLAYct' ;itsvalue is '",
             ,"java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
             DISPLAY "indic1 should be -1; its value is ", indic1
             if (en             EXEC SQL  C14736 INTO :, :ctindic1 END-EXEC
             then
                0 flag
             END-IF
             if (indic1  NOT =  -1) then
               MOVEjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             END-IF

             DISPLAYFETCHINTOenct:;
             EXEC SQL FETCH C14736 INTO :en, :ct, :sl:indic1 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 THRU
             if (SQLCODE  NOT =  100  OR  NORMSQ  NOT  =   "02000"then
               MOVE 0 TO flag
             END-IF
             if (NORMSQ   =   "02000"  AND  NORMSQ  NOT  =   SQLSTATE)
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             
             DISPLAY  TO

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

              "TABLESTAFF66 ;"
             EXEC SQL DROP TABLE STAFF66 CASCADE END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY   NOT)

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


             if ( flag  =  1 ) then
               DISPLAY " *** pass *** "
                SQL INSERTINTOHUTESTREPORT
                 VALUES('0842','pass','PCO'END-EXEC
               MOVE SQLCODE TO SQL-COD
             else
               DISPLAY " dml147.pco *** fail *** "
               EXEC SQL INSERT INTO HU.TESTREPORT
                 VALUES('0842','fail','PCO'END-EXEC
MOVE java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
               COMPUTE errcnt = errcnt + 1
             END-IF

             DISPLAY                ""

               COMMIT
             MOVE SQLCODE TO SQL-COD
      ******************** END TEST0842 ********************
      **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
STOP.

      *    ****  Procedures for PERFORM statements

      *Test SQLCODE and SQLSTATE for normal completion. 
       CHCKOK.
             DISPLAY "SQLCODE should be 0; its value is ", SQL-CODPERFORM 
             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
             END-IF
             if (NORMSQ = "00000"  AND  NORMSQ NOT = SQLSTATE)
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             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 ""TO(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 
           END-IF

           MOVE 4 TO norm1
      *examining position 4 of char array NORMSQ 
      *valid characters are 0-9, A-Z 
           PERFORM java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
           if (NORMSQX(norm1)  =  ALPNUM(norm2)) then
EXEC COMMIT END-EXEC
           MOVE  SQL-COD
           END-PERFORM      ******************** END TEST0842 ********************
          
           STOP.
      *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()
           END-IF
           .

       EXIT-NOSUBCLASS.
           EXIT.

97%

p;*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%


¤ Dauer der Verarbeitung: 0.40 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 ist noch experimentell.