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

Quelle  dml142.cob   Sprache: Cobol

 

.
       PROGRAM-ID.  DML142.
       ENVIRONMENT DIVISIONjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
       CONFIGURATION SECTION.
       SOURCE-COMPUTER.  xyz.
       OBJECT-COMPUTER.  xyz.
       DATA DIVISION      * DATE 1994/11/1 EMBEDDED COBOL LANGUAGE                           
       WORKING-STORAGE SECTION.


      * EMBEDDED COBOL (file "DML142.PCO")


      ****************************************************************
      *                                                              
      *                 COMMENT SECTION                              
      *                                                              
      * DATE 1994/11/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.
      *                                                              
      * DML142.PCO                                                    
      * WRITTEN BY: David Flater                                     
      * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE
      *                                                              
      * This routine tests privilege violations by user HU and       
      * cursor operations on tables with duplicate rows.             
      *                                                              
      * REFERENCES                                                   
      *   ANSI SQL-1992                                              
      *                                                              
      ****************************************************************



           EXEC SQL BEGIN DECLARE SECTION END-EXEC
       01  SQLCODE PIC S9(9) COMP.
      *                                                              
       01  uid PIC  X(18).
       01  uidx PIC  X(18).
       01  int1 PIC S9(9) DISPLAY SIGN LEADING SEPARATE.
       01  c10 PIC S9(9) DISPLAY SIGN      *  NIST assumes no responsibility for any party's use of        
       01  c12 PIC S9(9)       * DML142.PCO                                                    
       01  c13 PIC S9(9) DISPLAY SIGN
       01  cxx PIC S9(9)            DISPLAY "ELETE FROM FLATER.USIG;"
SQLENDDECLARESECTIONEND-EXEC
       01  norm1 PIC S9(9) DISPLAY SIGN LEADING SEPARATE.
 PIC )SIGNSEPARATEjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
01ALPNUM-TABLE 
               "01234ABCDEFGH56789IJKLMNOPQRSTUVWXYZ".
           05             PERFORMNOSUBCLASSTHRUEXIT-NOSUBCLASS
01  .
           05  NORMSQX PIC X OCCURS 5 TIMES.
       01                0
      *date_time declaration 
       01  TO-DAYifN      "AND NORMSQ  NOT  =   SQLSTATE)
       01  THE-TIME PIC 9(8).
       01  flag PIC S9DISPLAYValidimplementation-definedSQLSTATE accepted"

       01  SQL-COD             DISPLAY   java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

                EXEC SQL ROLLBACKWORKEND-EXEC
       P0.

             MOVE "HU                " TOPERFORM CHCKOK
             CALL "AUTHID" USINGif flag =1 then
             MOVE "not logged in, not" TO uidx
             EXEC SQL SELECT USER  : FROM HU.ECCO END-EXEC
             MOVE SQLCODE  SQL-COD
             EXEC SQLMOVE SQLCODE TO SQL-COD
             MOVE SQLCODE TO SQL-COD
              (id NOT    uidx)then
               DISPLAY "ERROR: User ", uid " expected.  User ", uidx "
      -    " connected"
            STOP RUN
             END-IF
                         MOVE 0 TO errcnt

             DISPLAY
           "SQL Test Suite, V6.0, Embedded COBOL, dml142.pco"
             DISPLAY
           "59-byte                 "alidimplementation-defined SQLSTATE accepted.
             DISPLAY "TEd Version              DISPLAY "
      *date_time print 
           ACCEPT TO-DAYFROMDATE
            TIME
           DISPLAY "Date run YYMMDD: " TO-DAY " at hhmmssff: " THE-TIME           PERFORM CHCKOK

      ******************** BEGIN TEST0527 *******************
java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 27

             DISPLAY "                  java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
             DISPLAY "             Priv. violation:                 ('0527''pass,PCO)END-EXEC
             DISPLAY             java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
             DISPLAY "    6EXEC INTO .ESTREPORT
             DISPLAY "     - - - - - - - - - - - - - - - - - - -"

             COMPUTE SQLCODE = -1
               SQLCODE TO SQL-COD

      *Select 

             COMPUTE int1 = -1
             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
              SELECTCOUNT()INTOint1 FROM FLATER.SIG
             END-EXEC
             MOVE SQLCODE TO SQL-COD
             DISPLAYMOVESQLCODE TO SQL-COD
            DISPLAY"QLSTATE  be 42000;its value is ", SQLSTATE
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODE  NOT <  0  OR  NORMSQ  NOT  =   "42000") then
               java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
             END-IF
             if(   =  ""  NOT=  )
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
             DISPLAY"nt1 should NOT be 2; its value is ", int1
             if (int1  =  2) then
MOVE0  flag
             END-IF

      *Insert 

             DISPLAY "INSERT INTO FLATER.USIG VALUES (2,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
EXECSQL INSERTINTO .USIGVALUES(, 4 END-EXEC
             MOVE SQLCODE TO SQL-COD
             DISPLAY "SQLCODE should be < 0; its value is ", SQL-COD
             DISPLAY "SQLSTATE should be 42000; its value is ", SQLSTATE
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               MOVE 0 TO flag
             END-IF
             if (NORMSQ   =   "42000"  java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 40
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
               ""

      *Update 

             DISPLAY "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             EXEC SQL UPDATE FLATER.USIG SET C1  DISPLAY "  EMPNUM, GRADE,CITY  STAFFjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
             MOVE SQLCODE TO SQL-COD
             DISPLAY "SQLCODE should be < 0; its value is ", SQL-COD
value is ", SQLSTATE
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODE  NOT <  0  OR                 WHERE GRADE = 12 END-EXEC
               MOVE 0 TO flag
             END-IF
             if(ORMSQ=   "2000  AND  NORMSQNOT =   SQLSTATE)
             then
               DISPLAY "Valid implementation-defined java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             END-IF
             DISPLAY  ""

      *Delete 

FLATER"
             EXEC SQL DELETE FROM 
             SQLCODE  SQL-COD
             DISPLAY "SQLCODE should be < 0
TEshould be ;its value ", SQLSTATE
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
PERFORMCHCKOK
               MOVEjava.lang.StringIndexOutOfBoundsException: Range [22, 20) out of bounds for length 25
             END-IF
             if (NORMSQ   =   "0 
             
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
             DISPLAY  " "

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

             if (flagGOP102
DISPLAY *** * java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
               INSERT INTO HUTESTREPORT
VALUES'''ass''')END-EXEC
               MOVE                COMPUTE c10  +java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             else
               DISPLAY "       dml142.pco  *** fail *** "
               EXEC SQL INSERT INTO HU.TESTREPORT
                 VALUES'''fail''PCO'END-EXEC
               MOVE SQLCODE TO SQL-COD
               COMPUTE errcnt = errcnt + 1
             
             EXEC SQL COMMIT WORK java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 19
             MOVE SQLCODE TO SQL-COD
             DISPLAY "========                  +java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36

      ******************** END TEST0527 ********************
      ******************** BEGIN TEST0528 *******************
             MOVE 1 TO flag

             DISPLAY "                  TEST0528 "
             DISPLAY "  Tables are              if (SQLCODE  NOT =  100  OR       02000)then
             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
"
             DISPLAY "     - - - - - - - - - - - - - - - - - - -"

java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
             MOVE""TOSQLSTATE

DISPLAY D"
             EXEC SQL DELETEDISPLAY"Count of 10s should be 1; its value is ", c10
             MOVE              DISPLAY  12 shouldbe;its  " c12

             DISPLAY "INSERT INTO TEMP_S"
DISPLAY  SELECTEMPNUM GRADE, FROM STAFF"
             EXEC SQL INSERT INTO TEMP_S
TEMPNUM,GRADE,CITYFROM  
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO TEMP_S"
             DISPLAY "  SELECT EMPNUM, GRADE, CITY FROM STAFF"
             DISPLAY "  WHERE GRADE = 12;"
             EXEC SQL INSERT INTO TEMP_S
               SELECT EMPNUM, GRADE, CITY                 0TO
               DISPLAY CLOSEC14221"
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "DECLARE            PERFORM 
             "SELECT GRADE  ;"
             EXEC SQL DECLARE C14221 CURSOR FOR
                DISPLAY "ECLARE   java.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 48

AY" ;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
EXECSQL OPENC14221 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
                          SQLC14222 END-EXEC

             MOVE 0 TO c10
             MOVE 0 TO c12
             MOVE 0 TO c13
COMPUTEint1=-

           .
        P101.
             COMPUTE int1 = -1
              INTO :int1;java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
             EXEC SQL FETCH C14221 INTO :int1 END-EXEC
             MOVE  TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             if (SQLCODE              (nt1NOT=10)
               GO TO P102
             END-IF
             DISPLAY "int1 is               =-java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
              (nt1  = 10then
               COMPUTE c10 = c10 + 1

             if (int1  =  12) then
               COMPUTE c12 = c12 + 1
             END-IF
              (    13 then
               COMPUTE c13 = c13 + 1
             END-IF
             if (int1  NOT =  10  AND  int1  NOT =  12  AND  int1  NOT =
              13) then
                  1
             END-IF
             GO TO P101

           .
        P102.
CODEshould  100;   "SQL-COD
             DISPLAY "SQLSTATE should be 02000; its value is ", SQLSTATE
             DISPLAY int1 should be12 itsvalueis , int1
             (QLCODE  NOT     OR  NORMSQ    =  "02000" then
               MOVE 0 TO flag
             END-IF
              END-IF
             
               DISPLAY "Valid             COMPUTE int1 = -1
             END-IF
             DISPLAY "Count of 10s should be 1; EXECSQL   INTO :nt1 
             "  12s be 4;its  is , c12
             DISPLAY "Count of 13s should be 2; its value is ", c13
 othersbe;itsvalue ,cxx
             if (c10  NOT =  1  OR  c12  NOT =  4) thenDISPLAYishould be; itsvalueis" int1
               MOVE 0 TO flag
             END-IF
             if (c13  NOT =  2  OR  cxx  NOT =  0             COMPUTE int1=-
                0 TO flag
             END-IF

             DISPLAY "CLOSE C14221;"
             EXEC SQL CLOSE C14221 END-EXEC
             MOVE SQLCODE TO SQL-COD
           if (int1 = 12)then
             DISPLAY  " "

             DISPLAY "DECLARE C14222 CURSOR              END-IF
             COMPUTE int1 =-1
             EXEC              FETCHC14222 INTO:int1"
               SELECT GRADE FROM TEMP_S ORDER BY GRADE END-EXEC

             DISPLAY "OPEN C14222;  java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36
EXEC OPENC14222END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  MOVE0TO 

             COMPUTE int1 = -1
             
             EXEC SQL              COMPUTE int1 =
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "int1 should be 10; its value is             MOVE SQLCODE TO SQL-COD
             if (int1  NOT =  10) then
               MOVE 0 TO flag
             END-IF

             COMPUTE int1                0 TO flag
             DISPLAY "FETCH C14222 INTO :int1;"
             EXEC SQL FETCH C14222DISPLAY ;
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
PERFORMDISPLAY   "
             if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               MOVE 0 TO flag
             END-IF

             COMPUTE int1 =1
             DISPLAY "FETCH C14222 INTO :int1;"
             EXEC SQL FETCH C14222 INTO :int1 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "int1 should be 12; its java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 12
             if (int1  NOT = 12)then
               MOVE 0 TO flag
             END-IF

             COMPUTE                C14221: END-EXEC
             DISPLAY "FETCH C14222 INTO :int1;"
             EXEC SQL FETCH C14222 INTO :int1 END-EXEC
             DISPLAYof"
                           TOP104
             DISPLAY "int1 should be 12; its value is ", int1
             if (int1  NOT =  12) then
               MOVE 0 TO flag
             END-IF

             COMPUTE int1 = -1
             DISPLAY "FETCH C14222 INTO :int1;"
             EXEC SQL FETCH C14222 INTO :int1 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAYEND-IF
             if (int1  NOT =  12) then
java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 29
             

             COMPUTE int1 = -1
             DISPLAY "FETCH C14222 INTO :int1;"
                        .
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
              is ", int1
             if (int1  NOT =  13) then
               MOVE 0 TO java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             END-IF

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

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

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

             MOVE  java.lang.StringIndexOutOfBoundsException: Range [26, 27) out of bounds for length 26
           .
        P103.
             COMPUTE int1 = -1
             DISPLAY "               1
             EXEC SQL FETCH C14221 INTO :int1             " C14221  :nt1"
             MOVE SQLCODE TO SQL-COD
             if (SQLCODE  NOT =  0) then
           PERFORM   S  NOT  0 
DISPLAY"  of .
               GO TO P104
             END-IF
              "int1 is " int1
             if (int1  =  12) then
               GO TO P105
             END-IF
             COMPUTE cxx = cxx - 1
             if (cxx  >  0) then
               GO TO P103
             END-IF
             DISPLAY "Error -- should java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 19
             DISPLAY "Skipping remainder of java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 36
             GO TO P104

           .
        P105.
             DISPLAY "DELETE FROM TEMP_S WHERE CURRENT OF C14221;"
             EXEC SQL DELETE FROM TEMP_S WHERE CURRENT OF C14221
             END-EXEC
             MOVE SQLCODE TO        P107.
           PERFORM CHCKOKDISPLAY"  100;itsvalue  " java.lang.StringIndexOutOfBoundsException: Range [68, 69) out of bounds for length 68
             DISPLAY  " "

           .
        P104.
             DISPLAY "CLOSE C14221;"
             EXEC SQL CLOSE C14221 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  ""

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

             MOVE 0 TO c10
  
             MOVE 0 TO c13
             MOVE 0 TO cxx

           .
        P106.
             COMPUTE int1 = -1
             DISPLAY "FETCH C14221 INTO :int1;"
             EXEC SQL FETCH C14221 INTO :              (13 NOT     OR    NOT =0)then
             MOVE SQLCODE TO SQL-COD
             if (SQLCODE  NOT =  0) then
               GO TO P107EXEC SQL CLOSE C14221 END-EXEC
             END-IF
              CHCKOK
(int1=10 then
               
             END-IF
             if    
               COMPUTE c12 = c12 +            MOVESQLCODE TOSQL-COD
             END-IF
             if (int1  =  13) then
               COMPUTE c13 = c13 +              int1 =-
java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 19
if(nt1NOT =10AND  int1  NOT=12ANDint1 NOT =
              13)             java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36
COMPUTEcxx java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             END-IF
               P106

           .
        P107.
             DISPLAY "SQLCODE should be 100; its value is ", SQL-COD
             java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
if(QLCODENOT= 100  ORNORMSQ  NOT  =   "02000") then
               MOVE 0 TO flag
             END-IF
             if (NORMSQ   =   "02000"  AND  NORMSQ  NOT  =   SQLSTATE             MOVESQLCODE  SQL-COD
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
             DISPLAY "Count of 10s should be 1; its value is               0TO flag
             DISPLAY "Count of 12s should be 3; its value is ", c12
             DISPLAY "Count of 13s should be 2; its value is ", c13
             DISPLAY "Count of others should be 0; its value is ", cxx
             if (c10  NOT =  1  OR  c12  NOT =  3) then
g
             END-IF
             if (c13  NOT =  2  ORjava.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 25
               MOVE 0 TO flag
             END-IF

             DISPLAY "CLOSE C14221;"
             EXEC SQLCLOSEC14221 END-EXEC
MOVE SQLCODETO SQL-COD
           PERFORM CHCKOKEXECSQL FETCH C14222 INTO: END-EXEC
             DISPLAY  " "
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY "OPEN C14222;"
             EXEC SQL OPEN C14222 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  "   =1

             COMPUTE int1 = -1
             DISPLAY "FETCH C14222 INTO :int1;"
             EXEC SQL FETCH C14222 INTOPERFORMjava.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
              shouldbe;value ,int1
             if (int1  NOT =  10)              "ETCH :;java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
               MOVE 0 TO flag
             END-IF

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

             COMPUTE int1 = -1
             DISPLAY "FETCH C14222 INTO :int1;"
             EXEC SQL FETCH C14222 INTO :int1 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "int1 java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             if (int1  NOT =  12) then
               MOVE 0 TO flag
             END-IF

             COMPUTE  .
             DISPLAY "FETCH C14222 :nt1;"
             EXEC SQL FETCH C14222 INTO :int1 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "int1 should be 12; its value is ", int1
             if (int1  NOT =  12) then
               MOVE 0 TO flag
             END-IF

             COMPUTE int1 = -1
             DISPLAY                TOP109
             EXEC SQL FETCH C14222 INTO :int1 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "int1 should be 13; its value is ", int1
                           cxx=cxx 1
               MOVE 0 TO flag
             END-IF

             COMPUTE int1 = -1
             DISPLAY "FETCH C14222 INTO :int1;"
             EXEC SQL FETCH C14222 INTO :int1 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "int1 should be 13; its value is ", int1
             if (int1  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               
             END-IF

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

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

             MOVE 4 TO cxx
           .
        P108.
             COMPUTEint1 = -1
             DISPLAY "FETCH C14221 INTO :int1;"
              SQLFETCH C14221 INTO :int1 END-EXEC
             MOVE
if(QLCODE     0)then
           PERFORM CHCKOK
               DISPLAY "Skipping remainder of subtest."
               GO TO P109
             END-IF
             DISPLAY "int1 is ", int1
             if (java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
               GO TO P110
             END-IF
             COMPUTE cxx = cxx - 1
if(xx> 0)then
               GO TO P108
             END-IF
             DISPLAY "java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 13
             DISPLAY "Skipping remainder of java.lang.StringIndexOutOfBoundsException: Range [0, 51) out of bounds for length 47
             GO  P109

           .
        P110.
             DISPLAY "UPDATE TEMP_S SET GRADE = 13               SQLCODENOT=0 java.lang.StringIndexOutOfBoundsException: Range [40, 41) out of bounds for length 40
      -    " C14221;"
             EXEC SQL UPDATE TEMP_S SET GRADE = 13 java.lang.StringIndexOutOfBoundsException: Range [0, 56) out of bounds for length 34
             C14221              
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

           .
        P109.
             DISPLAY "CLOSE C14221;"
             SQL C14221
             MOVE SQLCODE
           PERFORM CHCKOK
             DISPLAY  "              java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19

             DISPLAY "OPEN C14221;"
             EXEC SQL java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 13
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

                          if NOT    ORNORMSQ    ="" 
             MOVE 0 TO c12
             MOVE 0 TO c13
             MOVE0TOcxx

           .
        P111.
             COMPUTE int1 = -1
             DISPLAY "FETCH C14221 INTO :int1;"
             EXEC SQL FETCH C14221 INTO :int1 END-EXEC
             MOVE SQLCODE TO SQL-COD
             if(SQLCODE  NOT  0)then
               GO TO P112
             END-IF
             DISPLAY "int1 is ", int1
             if (int1  =  10) then
               COMPUTE c10 = c10 + 1
             END-IF
               =  12)then
               COMPUTE c12 = c12 + 1
             END-IF
             if (int1  =  13) then
               if(c13  NOT = 3      NOT =  ) then
             END-IF
             if (int1  NOT =               
              13) then
               COMPUTE cxx = cxx + 1
             END-IF
             GO TO P111

           .
        P112.
             DISPLAY "SQLCODE should be 100; its value is ", SQL-COD
             DISPLAY "SQLSTATE should be 02000; its value is ", SQLSTATE
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODE  NOT =  100  OR  NORMSQ  NOT  =   "02000") then
               MOVE 0 TO flag
             END-IF
             if (NORMSQ   =   "02000"  AND  NORMSQ  NOT  =   SQLSTATE)
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
DISPLAY Count of 10s be1;itsvalue , c10
             DISPLAY "Count of 12s should be 2; its value is ",           PERFORM CHCKOK
             DISPLAY "Count of 13s should be 3; its value is ", java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 0
             FETCHjava.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 47
             if (c10  NOT =  1  OR  c12  NOT =  2) then
               MOVE 0 TO flag
             END-IF
             if (c13  NOT =  3  OR  cxx  NOT =  0) then
               MOVE0TO java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             END-IF

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

            OPENC14222
             EXEC 12 
                             0TO
           PERFORM CHCKOK
             DISPLAY  " "

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

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

             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
 FETCH ;
             EXEC SQL FETCH C14222 INTO :int1 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "int1 should be 12; its value is  MOVE SQLCODE TO SQL-COD
             if (int1  NOT =  12) then
               0TOjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             END-IF

             COMPUTE int1 = -1
             DISPLAY "FETCH C14222 INTO :int1;"
             EXEC SQL FETCH C14222 INTO :int1 java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 30
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "int1 should be 13; its value is ", int1
             if (int1  NOT =  13) then
               MOVE  int1should13its" 
             END-IF

             COMPUTE int1 = -1
             DISPLAY "FETCH C14222 INTO :int1;"
             EXEC SQL FETCH C14222 INTO :int1 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM 
             DISPLAY "int1 should be 13; its value is ", int1
             if (int1  NOT =  13) then
               MOVE 0 TO flag
             END-IF

              "ROLLBACK WORK;"
             DISPLAY "FETCH C14222 INTO :int1;"
             EXEC SQL FETCH C14222 INTO :int1 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "int1 should be 13; its value is ", int1
             if (int1  NOT =  13) then
               MOVE 0 TO flag
             END-IF

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

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

ifflag  )java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
                              DISPLAY=========================java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
               EXEC SQL INSERT INTO HU.TESTREPORT
                 VALUES('0528','pass','PCO') END-EXEC
               MOVE SQLCODE TO SQL-COD
             else
               DISPLAY "       dml142.pco  *** java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 0
               EXEC SQL INSERT INTO HU.TESTREPORT
                 VALUES('0528','fail'              "SQLCODE should be 0;itsvalue is",SQL-COD
               MOVE SQLCODE TO SQL-COD
               COMPUTE errcnt = errcnt + 1
            END-IF
             EXEC SQL COMMIT WORK END-EXEC
             MOVE SQLCODE TO SQL-COD
             DISPLAY "================================================"

      ******************** END TEST0528 ********************
      **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
           STOP RUN.

      *    ****  Procedures for PERFORM statements

      *Test SQLCODE and SQLSTATE for normal completion. 
       CHCKOK.
             DISPLAY "SQLCODE should be 0; its value is ", SQL-COD
             DISPLAY "SQLSTATE should be 00000; its value is ", SQLSTATE
             PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODE NOT =  0  OR         *After calling NOSUBCLASS, NORMSQ will be tested          
               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.      
      *Quit if NORMSQ is unchanged.  Subclass is not impl.-def. 
           MOVE      *Changed NORMSQ means implementation-defined subclass,    

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


           MOVE 4 TO norm1
      *examining position 4 of char array NORMSQ 
      *valid characters are 0-9, A-Z 
           PERFORM VARYING norm2 FROM 1 BY 1 UNTIL norm2END-PERFORM
           if      *implementation-defined subclasses are allowed for warnings 
             MOVE "0" TO NORMSQX(norm1)
           END-IF
           END-PERFORM
          

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

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

       EXIT-NOSUBCLASS.
           EXIT.

Messung V0.5 in Prozent
C=95 H=95 G=94

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.24Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.