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

Quelle  dml164.cob   Sprache: Cobol

 
       IDENTIFICATION DIVISION.
       PROGRAM-ID.  DML164.
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SOURCE-COMPUTER.  xyz.
       OBJECT-COMPUTER.  xyz.
       DATA DIVISION.
       WORKING-STORAGE SECTION.


      * EMBEDDED COBOL (file "DML164.PCO")


      ****************************************************************
      *                                                              
      *                 COMMENT SECTION                              
      *                                                              
      * DATE 1996-04-17 EMBEDDED COBOL LANGUAGE                          
      * 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.
      *                                                              
      * DML164.PCO                                                    
      * WRITTEN BY:  David Flater                                    
      * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE
      *                                                              
      * This routine tests Intermediate SQL.                         
      *                                                              
      * REFERENCES                                                   
      *   FIPS PUB 127-2 14.2 Intermediate SQL                       
      *   ANSI SQL-1992                                              
      *                                                              
      ****************************************************************



           EXEC SQL BEGIN      * DML164.PCO                                                    
             *                                                              
       01  SQLSTATE PIC  X      *                                                              
       01  uid PIC      *   FIPS PUB 127-2 14.2 Intermediate SQL                       
       01  uidx  X(18).
       01  kywd3 PIC X
       01  kywd6 PIC (6)
       01  kywd9 PIC X(9).
       01  kywrd PIC X(20).
       01  wrd7      ****************************************************************
       01  wrd2 X20). 
       01  cnt1 PIC S9(9) DISPLAY       *                 COMMENT SECTION                              
       01  longst PIC  X(219).
             EXEC SQL END DECLARE SECTION END-EXEC
       01  norm1 PIC S9  SQLCODE (9) COMP.
       1norm2 S9)D SIGN LEADING .
       01  ALPNUM-TABLE VALUE IS
               "01234ABCDEFGH56789IJKLMNOPQRSTUVWXYZ".
           05  ALPNUM PIC X OCCURS 36 TIMES.
       01  NORMSQ.
           05  NORMSQX1      
       01  errcnt PIC      *  implementations for conformance to the SQL standards.        
      *date_time declaration 
       01  01  kywd9()      *  this program.
       0  HE-TIME98.
       01  flag PIC S9(9) DISPLAY SIGN LEADING1   PIC X(7.

       01  SQL-COD PIC0  longst  X29.

       PROCEDURE DIVISIONEXEC ENDDECLARE END-EXEC
       .

                   * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLEnorm2 S9  SIGN SEPARATE      *                                                              
             "" USING uid
             MOVE "not logged in, not" TO uidx
EXEC SELECT uidx END-EXEC
MOVE
             EXEC SQL ROLLBACK WORK END-EXEC      *   ANSI SQL-1992                                              
                   PROCEDURE
(NOT=uidx
               "ERROR User"uid
-     connected
            STOP RUN
             END-IF
             MOVE 0 TO errcnt not "TOuidx

             DISPLAY
           "SQL Test Suite, V6.0, Embedded COBOL, dml164.pco"
             DISPLAY
           9 ID
             DISPLAY "TEd Version #"
      *date_time print 
ACCEPTjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
           ACCEPTEND-IF
       1uid

      ******************** BEGIN TEST0867 *******************
             MOVE         PICjava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26

             DISPLAY " 0 kywrd PIC X(20).
             DISPLAY "LIKE enhancements: keywordsearch"
             DISPLAY  FROM
                  #8 -  enhancements
             DISPLAY " 1 MOVE1Oflag

             COMPUTE
             MOVE "xxxxx" TOLIKE

      *Carmelo:  in translations, replace varchars with strings of the
      *correct length. 

      *These queries are similar to what might be generated by a progr
      *to do keyword searches. 

      *Find how many records for Florida Keys 

             MOVE "Key" TO
             DISPLAY      *correct length. 

      *to do keyword searches. 
             DISPLAY "SELECT COUNT(*) java.lang.StringIndexOutOfBoundsException: Range [0, 42) out of bounds for length 0
             DISPLAY        0  norm2 PIC(9) DISPLAYSIGNjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 0
             " | |%"
" OR LOC_NAME LIKE %1NORMSQ
             DISPLAY  kywd3
 SELECT) :cnt1
 .     date_time
WHERELIKESELECT):java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
               0  THE-TIME '% |: |%java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
OR:
             MOVE SQLCODE  kywd3
           PERFORM
             DISPLAY "
1)then
                            
END-IF

             MOVE ".
             DISPLAY END-IF

              "UTHID"SING
DISPLAY LOC_ID :"
             DISPLAY " FROM TIDES.LOCATIONS"
              SQL USER :uidxFROM.ECCO
             DISPLAY " ORjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
              "ORLOC_NAME kywd9java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
             EXEC              SQL WORK
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 35
                 ' | : ||'              uid   ) then
  | %java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
TIDES
      ' |%
PERFORM
             DISPLAY "cnt1 should be 10; its valueOR LOC_NAME = :kywd9 END-EXEC
             ifE errcnt
               MOVE 0 TOPERFORM ,V6  COBOL,dml164"
Y"cnt1 b 0i is ",java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61

             MOVE "London" TO kywd6
java.lang.StringIndexOutOfBoundsException: Range [39, 20) out of bounds for length 39
             MOVE "England" TO wrd7
             DISPLAY" = 'England'"

             M "" TO
               'SELECT LOC_ID FROM TIDES.LOCATIONS MOVE"England" TO
               ' java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
'LOC_NAME LIKE'%'| ||' %''
               ' OR LOC_NAME = ?)'
'AND(LOC_NAMELIKE ''% '' || ? | ''%'''
               ' OR LOC_NAME LIKE ''%'' |java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
' LOC_NAME = )'
               INTO " TEST0867"
                . END-EXEC     '' |?DISPLAY References
MOVE 

             DISPLAY " DISPLAY " - - FROMFROM HU java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36

             DISPLAY "PREPARE S0867 FROM :longst;"
             EXECSQL      *correct length. 
             MOVE SQLCODE TOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
PERFORM
             DISPLAY  " "

             DISPLAY "DECLARE C0867 CURSOR FOR S0867;"
EXECSQL C0867 FOR END-EXEC

              "ALLOCATEDESCRIPTOR'D0867';"
             EXEC SQL ALLOCATE"FROMTIDESLOCATIONS"
             MOVE SQLCODE TO SQL-COD
 CHCKOK
             DISPLAY  " "

             DISPLAY             XEC DECLARE CURSOR S0867
DISPLAY" DESCRIPTOR '';"
             EXEC  ALLOCATE 'D0867' java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
           PERFORM CHCKOK
             DISPLAY  " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

                           OUNT)  cnt1
              TIDES
             DISPLAYMS TOSQL-COD
             DISPLAY " TYPE = 1,"
             DISPLAY " LENGTH = 6,"
             DISPLAY " DATA = :kywd6;"
             
               TYPE,
               LENGTH = 6,
                = :kywd6java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
             DISPLAY"DESCRIPTOR D0867 :java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
           PERFORM CHCKOK
                           "DATA 0TOflag

             DISPLAY  SET 'D0867 cnt1
 TO
             DISPLAY                LENGTH  ,
=1"
             DISPLAY " LENGTH = 6,"
              "DATA= :kywd6;"
             EXEC SQL SET  DISPLAY"FROMTIDES CHCKOK
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                 
DATA java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
D" TYPE 1"
           PERFORM CHCKOK
             DISPLAY  " "

             D  DATAkywd6
             3java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
             DISPLAY "SET DESCRIPTOR WHERELOC_NAME '% ' | :kywd9 || '%'
DISPLAY"TYPE =1 R LOC_NAME kywd9 java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
             "LENGTH= SQL-COD
             DISPLAY " DATA = :kywd6;"
EXEC SETjava.lang.StringIndexOutOfBoundsException: Range [23, 21) out of bounds for length 38
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               LENGTH java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 0
                kywd6
             D " LENGTH "
PERFORM" java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
D"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

 "cnt1 java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 26
              WHERE ''|  |'''
              SETVALUE
             DISPLAY " DISPLAY" = ;"' ORLOC_NAME = ? 4 nt1
    ,
             DISPLAY" DATA =:wrd7;"
             SQL' cnt1
               TYPE = 1,
LENGTHFROM.ECCO
                            SQLCODE
                SQL-COD
           PERFORM CHCKOK
 7

             cnt1"
             MOVE 5 TO cnt1
             DISPLAY "SET DESCRIPTOR 'D0867' VALUE :cnt1 java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
              " TYPE = 1,"
             DISPLAY " LENGTH = 7,"
             DISPLAY " DATA = :wrd7;"
             EXEC SQL SET DESCRIPTOR 'D0867' VALUE :cnt1
               TYPE = 1,
                = 7
               DATA = :wrd7"ETDESCRIPTOR'' cnt1"
             MOVE TO
            CHCKOK
             DISPLAY  " "

             DISPLAYEXEC SET D0867:cnt1
             MOVETO
             DISPLAYSETVALUE
                  ,
             DISPLAY " LENGTH = 7,"
             DISPLAY " DATA = :wrd7;"
             EXEC SQLDISPLAY""
               TYPE = 1,
               LENGTHDISPLAY  ;
                =:rd7
             MOVE SQLCODE TO               " DESCRIPTORD0867VALUEcnt1java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
           PERFORMDECLARE
             SQL   S0867

TYPE
             EXEC               ALLOCATE
             MOVE TO
java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             DISPLAY  " "

             DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
"C0867INTOcnt1java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
            CHCKOK             EXEC   ""
             DISPLAY;
           PERFORM CHCKOKDISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
iscnt1
              (cnt1=22 then
               MOVE 0 TODISPLAY "EXEC C0867 INTO: END-EXEC
             END-IF

             DISPLAY               SQL 'D0867'VALUE
 END-EXEC
             MOVE                 = 6
             DISPLAY "SQLCODE SQLCODE SQL-COD
             DISPLAY "SQLSTATE should be 02000; its END-IF
   EXIT-NOSUBCLASS
             SQL cnt1
                0TO
             END-IF
            NORMSQ0NORMSQ)
             then
 SQLSTATE"DESCRIPTOR''nt1
             END-IFDISPLAY    ,
             DISPLAY  " "

              "OMMITWORK;
              SQL  ,
             MOVE SQLCODE TO kywd6
            CHCKOK
             DISPLAYEND-IF

             if               " =java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 17
               DISPLAY " *** pass DISPLAY ""
EXEC INSERT.
                 VALUESDISPLAY" WORK;"
MOVESQL ''VALUE
             else = 6
DISPLAYdml164  * *java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
                SQL  HU
                   "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
     SQL-COD
               COMPUTE                 **pass
             END-IF

             DISPLAYDISPLAYTYPE

              SQLEND-EXEC
                
             EXEC SQL SET DESCRIPTOR 'D0867' VALUE :cnt1
      ******************** BEGIN TEST0868 *******************
             MOVE 1 TO  INSERT .TESTREPORT1

             DISPLAY " TEST0868"
             DISPLAY " More "
             DISPLAY   
             DISPLAYDISPLAY  ;
- -        ---     -"

             COMPUTE"===DISPLAY"LENGTH
 MMIT 

      *Find how many data sets are redundant 

             MOVE      ******************** END TEST0867 ********************
              D  wrd7
             java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
DISPLAY"WHERENOTUNIQUE ("           PERFORM
"References"
             DISPLAYDISPLAYF#   
" = ADEG_LONGITUDE;java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
             EXEC SQL SELECT   java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
              "LENGTH=7"
               WHERE      *Find how many data sets are redundant  SQL DESCRIPTOR:cnt1
               SELECT
               WHERE = A.DEG_LATITUDEFROM "
UDE)ERFORM
             MOVE SQLCODE    FROM
           PERFORM CHCKOKDISPLAYEXEC   ''java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
             DISPLAY "DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             if "ETCHC0867INTO cnt1"
 TO
             END-IF

      *True on zero rows. 

  
             DISPLAY "SELECT COUNT(*) INTO DISPLAY" should value
                  WORKS
             DISPLAY               MOVE
             DISPLAY "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                          DISPLAY"QLSTATE 000; " 
DISPLAY     =')"
                           D WHEREBjava.lang.StringIndexOutOfBoundsException: Range [51, 50) out of bounds for length 51
                            END-IF
               (SELECT EMPNUMEXEC (INTO
M =BEMPNUM
               AND GRADE = 13
               (      0"NOT java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
END-IF
           PERFORM CHCKOK
DISPLAYcnt1itscnt1
             MOVE SQL-COD TO
               MOVE 0 TO flag  "
             END-IF

             DISPLAY "END-IF
             EXEC SQL WORK
              SQLCODE
            CHCKOK
               TO

             if ( flag  =  1                MOVE TO SQL-COD
                                * *** "
               EXEC SQL INSERT INTO HU SQL DISPLAY*pass
                 VALUES(08,pass8,failjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
               MOVE SQLCODE
                          else
DISPLAY " dml164.co* ** java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
               EXEC SQL INSERT INTO HU
'08,',' END-EXEC
               MOVE SQLCODE TO SQL-COD
               COMPUTE errcnt = errcnt + 1
             END-IF

             DISPLAY "========================= COMPUTEerrcnt = errcnt +1

             EXEC SQL COMMIT WORK END-EXEC
             MOVE SQLCODE TO SQL-COD "TEST0868"
      ******************** END TEST0868 ********************
      ******************** BEGIN TEST0869 *******************
             MOVE 1 TO flag

             DISPLAY " DISPLAY " - - - - - - - - - - - - - - - - - - -"
      ******************** BEGIN TEST0869 *******************
             DISPLAY":"

             DISPLAY " - - - "                  "

             COMPUTE = -1
 " java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

 "TABLEBILLS_SENT (
             DISPLAY " BILLID INT PRIMARY KEY,"
EXEC COUNT) :
 "FROMTIDESLOCATIONSA
               BILLID INT PRIMARY KEY DISPLAY  BILLIDPRIMARY
               BILLAMOUNT DECIMAL(7,SELECTFROM.LOCATIONS
             MOVE TOSQL-COD
           ANDDEG_LONGITUDE DEG_LONGITUDEEND-EXEC
DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             "WORK"
             EXEC SQLMOVE TO flag
             MOVE             
PERFORM
             DISPLAY  " "

             DISPLAY "CREATE TABLE PAYMENTS ("
             DISPLAY    INT
             DISPLAY " PAYID INT PRIMARY KEY,"
DISPLAY   DECIMAL(,2);java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
EXEC CREATE              AND  3
               BILLID"
               PAYIDjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
PAYAMOUNT,)) java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
             MOVE EMPNUM B
 AEMPNUM
   "

               = 'Deale'END-EXEC INT
             EXECSQL               SQLCODE SQL-COD
MOVE TOISPLAY should ;ts" java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
           PERFORM CHCKOK
             DISPLAY  "PERFORM CHCKOK

             D "COMMIT WORK;"
    CORRESPONDING  PAYMENTS
             EXECEXEC   END-EXEC  TO
               EXCEPTDISPLAY "
             
           CHCKOK
             DISPLAY                  *DISPLAYVIEWFROM

DISPLAY
             EXEC COMMIT END-EXEC
             MOVE SQLCODETO
           PERFORM
                "dml164pco ** fail ***"

             DISPLAY NSERT            HCKOK
             DISPLAY  ,100;
             EXEC
00.0END-EXEC
             MOVE SQLCODE TO errcnt SQL COMMIT 
           PERFORM CHCKOK
                          DISPLAY"=========================java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70

DISPLAY                
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
   INTO
               ,00)END-EXECDISPLAY           table
             MOVE SQLCODE TO SQL-COD CHCKOK
            CHCKOK
             DISPLAY  " "    -  -- --             " INTOILLS_SENTVALUES ("

             DISPLAY "INSERT INTO BILLS_SENT VALUES ("
             DISPLAY" ,50.0;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
             EXEC SQL INSERT INTO BILLS_SENT              SQLCODE SQL-COD
               2, 50.00) END-EXEC
             MOVE SQLCODE TO SQL-CODDISPLAY "CREATE TABLE BILLS_SENT ("
           PERFORM CHCKOK
             DISPLAY                  BILLAMOUNT)             "INSERTINTOBILLS_SENT(java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54

DISPLAYINSERTPAYMENTS
             DISPLAY " 0, 0, 100.00);"
             EXEC SQL INSERT INTO PAYMENTS VALUES (
               ,0 100.00) END-EXEC
             MOVE SQLCODE            CHCKOK
           PERFORM CHCKOK
             DISPLAY  " "

DISPLAYINSERT   (
             DISPLAY " 1, 1, 40.00);"
             SQL  VALUES
               1, 1, 40.00) END-EXEC
             MOVEPERFORM
           ERFORM
             DISPLAY  " "

             DISPLAY "INSERT INTO PAYMENTS VALUES ("
              "1,2, 000;"
             EXEC SQLDISPLAY PAYID ,
               1, 2, 40.00) END-EXEC
             MOVE  java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORM CHCKOK
             1  0)

              COMMIT
              SQL WORKjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
             MOVE SQLCODE TO SQL-COD
            java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
                java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

              0 java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
             DISPLAY "SELECT BILLID INTO :cnt1"
             ISPLAY   ;
              SQL BILLID:java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
               FROM NO_PAY END-EXEC
             MOVE SQLCODE java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
hould 2 its is,cnt1
             if(nt1 =  2) java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
               MOVE 0 TO flagEXECSQL VIEW NO_PAY SELECT *FROMjava.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
             END-IF

DISPLAYCOMMIT
             EXEC SQL COMMITPERFORM
             MOVE SQLCODE TO SQL-COD
           PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
DISPLAY             DISPLAY"SELECT :"

DISPLAY NO_PAY
             DISPLAY " PORTVAL INT);"
             EXEC              SQLCODE TO
               PORTVAL) java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             MOVE SQLCODE SQL-COD
             DISPLAY "
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
             EXEC SQLDISPLAY  ,100)"
                SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "PERFORMCHCKOK
             DISPLAY " PORTVAL EXEC COMMIT WORKEND-EXEC
EXEC CREATE SQLCODE 
               PORTVAL INT) END-EXEC
M SQLCODE
           PERFORM CHCKOK
             DISPLAY  " "

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

DISPLAY" CORRECT_AND_LOSSY PORTVAL"
             DISPLAY " AS SELECT * FROM CORRECT_OUTPUT INTERSECT ALL"
DISPALYPORTVALLOSSY_OUTPUT
             EXEC SQL CREATE VIEW CORRECT_AND_LOSSY (PORTVAL)
               AS SELECT * FROM CORRECT_OUTPUT INTERSECT
                  SELECT PORTVAL FROMjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 36
             MOVE SQLCODE
           PERFORM CHCKOK
             DISPLAY  " "

             " "0 0 0.0;"
             EXEC SQL COMMIT WORK END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORMCHCKOK 0100END-EXEC
             DISPLAY  " "

             DISPLAY " INTO LOSSY_OUTPUT CHCKOK
             EXEC SQL INSERT INTO LOSSY_OUTPUT VALUES java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

           PERFORM" WORK;"
             EXEC COMMIT END-EXEC

             DISPLAY "INSERT INTO LOSSY_OUTPUT VALUES (2);"
             EXEC SQL INSERT INTO LOSSY_OUTPUT VALUES (2) END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO LOSSY_OUTPUT VALUES (1);"
             EXEC SQL INSERT INTO LOSSY_OUTPUT VALUES (1) END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO LOSSY_OUTPUT VALUES (1);"
             EXEC SQL INSERT INTO LOSSY_OUTPUT VALUES (1) END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO LOSSY_OUTPUT VALUES (3);"
             EXEC SQL INSERT INTO LOSSY_OUTPUT VALUES (3) END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

                           "CREATE VIEW CORRECT_AND_LOSSY PORTVAL)"
             SQL LOSSY_OUTPUT()END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO LOSSY_OUTPUT VALUES (4);"
             EXEC SQL,,4.0 END-EXEC
              SQLCODE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORM CHCKOK             
               ""

             DISPLAY "INSERT INTO LOSSY_OUTPUT VALUES (1);"
             EXEC SQL INSERT INTO LOSSY_OUTPUT VALUESP CHCKOK
             MOVE SQLCODE TO SQL-COD
            CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO LOSSY_OUTPUT VALUES (3);"
              SQL   "
             MOVE SQLCODE TO SQL-COD
           PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY" java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY "INSERT INTO LOSSY_OUTPUT VALUES (2);"
             EXEC SQL INSERT INTO LOSSY_OUTPUT              MOVEEXECSQLINTO VALUES END-EXEC
              0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
           PERFORM CHCKOK
DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

      *Changes:  two more 1s; a 3 changed to a 4 

             DISPLAY"INSERTINTO CORRECT_OUTPUTVALUES(1)"
              SQL  CORRECT_OUTPUT () 
             MOVE SQLCODE "cnt1should bejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO CORRECT_OUTPUT VALUES (1);"
             EXEC SQL INSERT INTO CORRECT_OUTPUT VALUES (1) END-EXEC
             MOVE SQLCODE TO                " "
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAYEXEC INSERT INTO VALUESSQL TABLE (
RT CORRECT_OUTPUT (2)END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO CORRECT_OUTPUT VALUES (1);"
EXEC              CHCKOK
             MOVE SQLCODE TODISPLAY   "
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO CORRECT_OUTPUT MOVE SQLCODE TO SQL-COD
             EXEC SQL INSERT INTO CORRECT_OUTPUT VALUES (1) END-EXEC
             MOVE SQLCODE
           ERFORM
             DISPLAY  " "

             DISPLAY "INSERT INTO CORRECT_OUTPUT VALUES (1);"
             EXEC SQL INSERT              SQLCODE SQL-COD
             MOVE TO 

  "

              " CORRECT_OUTPUT VALUES(3;
             EXEC PERFORM 
             MOVE SQLCODE TO SQL-COD
DISPLAY " VIEW CORRECT_AND_LOSSY (PORTVAL)"
               " "

             DISPLAY "INSERT INTO CORRECT_OUTPUTDISPALY ROMLOSSY_OUTPUT"
             EXEC SQL INSERT INTO CORRECT_OUTPUT
java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 36
            CHCKOK
             DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

DISPLAY INSERT   (;java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
             EXEC SQL INSERT             DISPLAY" "
             MOVE SQLCODE TO SQL-COD
           
             DISPLAY "INSERT INTO VALUES (2);"

           PERFORM
XECINSERTCORRECT_OUTPUT() END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO CORRECT_OUTPUT VALUES (4);"
             EXEC SQL INSERT INTO CORRECT_OUTPUT VALUES (4) END-EXEC
             MOVE SQLCODEDISPLAY""
                      PERFORM
             DISPLAY  " "

             "NSERTINTOC 2;java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
             EXEC  INSERT CORRECT_OUTPUT (2) END-EXEC
             MOVE SQLCODE TO  ""
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY " EXECSQL INSERT INTO CORRECT_OUTPUT VALUES (1) END-EXEC
             MOVE TO
             " CORRECT_OUTPUT EXCEPTPERFORMCHCKOK
                          DISPLAY   java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
              SQL C0869  SELECT FROM
CORRECT_OUTPUT ALL SELECT LOSSY_OUTPUT
                MOVE TOSQL-COD

N C0869
             EXEC SQL OPEN C0869 END-EXEC
             MOVE SQLCODE TO
           PERFORMDISPLAYINSERTINTOLOSSY_OUTPUT (;
java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 25

             MOVE 0 TO cnt1
             DISPLAY "FETCH C0869 INTO :cnt1;"
              SQL C0869:              "NSERT 1;
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "cnt1 should be 1; its value is "              "INSERTINTOCORRECT_OUTPUT (1);"
             if "INSERT INTO LOSSY_OUTPUT VALUES (4);"
               MOVE 0 TO flag
             END-IF

MOVE TO
             DISPLAY "FETCH C0869 INTO : PERFORMCHCKOK
EXECFETCH java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
 TO
           PERFORM CHCKOK
             DISPLAY "cnt1 should be 1; its value is ", cnt1
 (cnt1   =  1) then
               MOVE 0 TO flag
END-IF

OVE  nt1
             DISPLAY "FETCH C0869 INTO :cnt1;"
              SQLEXEC    3)java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
             MOVE SQLCODE SQL-COD
           PERFORM CHCKOK
             DISPLAY "cnt1 should be 4; its value is ", cnt1
             if (cnt1  NOT =                 " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
               TOflag
             END-IF

             DISPLAY "FETCH C0869 INTO :cnt1;"
EXEC FETCH INTO cnt1
             MOVE SQLCODE TO PERFORM
              " should be 10; itsvalueis" SQL-COD
             DISPLAY "SQLSTATE DISPLAY" INTOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
           PERFORM THRUjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
             if (SQLCODE  NOT =  10              SQLCODE SQL-COD
               MOVE 0 TO flag
             END-IF
ifNORMSQ   0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             then
               DISPLAY INTO VALUES
              SQLCODE 
             DISPLAYPERFORM

             DISPLAY "CLOSE C0869;"
             EXEC
                          DISPLAY " INTO java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
           PERFORM CHCKOK
             DISPLAY" java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             MOVE 0PERFORM
DISPLAYSELECT* cnt1
             DISPLAY " FROM CORRECT_AND_LOSSY"
             DISPLAY " WHERE PORTVAL = 1;"
             EXEC SQL SELECT COUNT(*) INTO :cnt1             EXEC INSERT INTO CORRECT_OUTPUT VALUES1)END-EXEC              SQL INTOCORRECT_OUTPUT (2) END-EXEC
               FROM CORRECT_AND_LOSSY
                PORTVAL 1
             MOVE SQLCODE TO              
           ERFORM
             DISPLAY "cnt1 should be 5; its value "ORDER;"
              (cnt1=5 then SQLCODE SQL-COD
               MOVEPERFORM
                BY PORTVAL

              0TO cnt1
              " COUNT(*INTO:nt1java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
             DISPLAY"FROM "
AY   ;java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
             EXEC SQLDISPLAY ""
               FROM CORRECT_AND_LOSSY INSERTCORRECT_OUTPUT               O cnt1
               WHERE PORTVAL = 2 END-EXEC
             MOVESQLCODE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
M CHCKOK
             DISPLAY "cnt1 should PERFORM CHCKOK
              " should "  CORRECT_OUTPUT(1java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
               MOVEXEC INSERT ORRECT_OUTPUT ()END-EXEC
             END-IF

             MOVEPERFORM
             DISPLAY "SELECT COUNT(*) INTO
DISPLAY   CORRECT_AND_LOSSY
             DISPLAY " WHERE PORTVAL = 3;"
             EXEC SELECT()INTO java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
               FROM CORRECT_AND_LOSSY
                PORTVAL 3END-EXEC
             MOVE SQLCODE CHCKOK
RFORM " ORRECT_OUTPUTVALUES(1)
              SQL INTO VALUES1)END-EXEC
             if (cnt1  NOT =  1) then CHCKOK
               MOVE 0 TO flag
             END-IF

             MOVE 0 TO
                           " CORRECT_OUTPUTVALUES4;java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
             DISPLAY " FROM CORRECT_AND_LOSSY"
             DISPLAY " WHERE PORTVAL = 4;"
              SQL COUNT)INTO VALUES(4 java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
               FROM CORRECT_AND_LOSSY
WHERE = 4 END-EXEC
             MOVE SQLCODE TO SQL-COD
KOK
             DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             if (cnt1  NOT =  1) then
               MOVE 0 TO flag
             END-IF

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

             DISPLAY "DROP VIEW CORRECT_AND_LOSSY if SQLCODE NOT=10ORNORMSQNOT= 0000)then
              SQL VIEWCORRECT_AND_LOSSY END-EXEC
             MOVE SQLCODE
           PERFORMif(NORMSQ   020" NORMSQNOT java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
                            ORRECT_OUTPUT                "ValidSQLSTATE "

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

             DISPLAY "DROP TABLE BILLS_SENT CASCADE;"
             EXEC SQL DROP TABLE BILLS_SENT CASCADE
             MOVE SQLCODE TO SQL-COD

             DISPLAY  " "

" WHERE PORTVAL = 1;"
              SQL WORKEND-EXEC
             MOVE cnt1=) 
                          MOVE flag
             DISPLAY  " "

             DISPLAY" TABLE PAYMENTS CASCADE;"
             EXEC SQL DROP CHCKOK
              SQLCODE SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

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

              " TABLE CORRECT_OUTPUT CASCADE;"
             EXEC             MOVESQLCODE SQL-COD
             MOVE SQLCODE CHCKOK
            CHCKOK
             DISPLAY  " "

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

             DISPLAYDROPLOSSY_OUTPUT             DISPLAY ()INTOjava.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
             EXEC SQL  DISPLAY   =3"
MOVE  SQL-COD
            CHCKOK
             DISPLAY  " "

             DISPLAYCOMMIT
             EXEC SQL COMMIT java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 36
           PERFORM CHCKOK
             DISPLAY  " "

              ( flagthen
               DISPLAY DISPLAY 
               EXEC SQL INSERTDISPLAY "
                 VALUES             OVE TO
                            DISPLAYSELECTINTO"
             else
               "dml164. *** *** "
               EXEC SQL INSERT INTO
                 VALUES('0869','fail','PCO'END-EXEC
               MOVE SQLCODE TO SQL-COD CORRECT_AND_LOSSY
COMPUTE = + 1
             END-IF

             DISPLAY " " should 1;its is java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60

                
             MOVE               WHERE PORTVAL = 1END-EXEC
      ******************** END TEST0869 ********************
      **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
           STOP.

      *    ****  Procedures for PERFORM statements

      *Test SQLCODE and SQLSTATE for normal completion. 
       CHCKOK.
             java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
DISPLAYSQLSTATE000; valuejava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
             PERFORM NOSUBCLASSDISPLAY" SQLCODET java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             DISPLAY
               MOVE 0 TO flag " ;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
             END-IF
             if (NORMSQ = "00000"  AND  NORMSQ NOT = SQLSTATE)
then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
             .

                    " should be 2 itsvalueis",

      *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 CHCKOK SQL ( INTO

           MOVE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      *subclass begins in position 3 of char array NORMSQ 
      *valid subclass begins with 5-9, I-Z, end of ALPNUM table 
           PERFORM      * DML185.PCO                                                    
           if (NORMSQX(norm1)  =  ALPNUM      * This routine tests Transitional SQL.                         
             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   =   ) thenDROP ;"
             GO TO EXIT-NOSUBCLASS               TO
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17

DISPLAYcnt11  java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 35
      *examining position 4 of char array NORMSQ 
      *valid characters are 0-9, A-Z 
 norm2 1 BYE             DISPLA
           if DROP
       1 PICSIGN
           END-IF
           END-PERFORM
          
           MOVEMOVE ," uidx
      *valid characters are 0-9, A-Z 
      *examining position 5 of char array NORMSQ 
           PERFORM VARYING SQLCODETO SQL-COD
           (ORMSQX)=  )
             MOVE "0" TO NORMSQX(norm1)
           END-IF"
           java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
   
      *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)  =  " DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
MOVE TO2
           END-IF
.

       EXIT-NOSUBCLASS
           EXIT.

95%


¤ Dauer der Verarbeitung: 0.25 Sekunden  ¤

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