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

Quelle  dml076.cob   Sprache: Cobol

 

       IDENTIFICATION DIVISION.
       PROGRAM-ID.        * NIST SQL VALIDATION TEST SUITE V6      *  DISCLAIMER:                                                  
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SOURCE-COMPUTER.  xyz.
       OBJECT-COMPUTER.  xyz.
       DATA DIVISION.
       WORKING-STORAGE SECTION.


      * Standard COBOL (file "DML076.SCO") calling SQL
      * procedures in file "DML076.MCO".


      * STANDARD COBOL (file "DML076.SCO")     

      *********************************************************
      *                                                       
      *             COMMENT SECTION                           
      *                                                       
      * DATE 1991/06/18 STANDARD 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.
      *                                                       
      * DML076.SCO                                             
      * WRITTEN BY: YOLANDA HERD                              
      *                                                       
      * THIS ROUTINE TESTS NULLS AND CURSORS                  
      *                                                       
      * REFERENCES                                            
      *  AMERICAN NATIONAL STANDARD database language - SQL   
      *                               X3.135-1989             
      *                                                       
      *                SECTION 4.2                            
      *                  DATA TYPES, DEFINITION OF NULL       
      *                  SECTION 8.10, GR 8                   
      *                                                       
      *********************************************************


      * EXEC SQL BEGIN DECLARE SECTION END-EXEC
       01  CHARTP PIC  X(1).
       01  INTTP PIC       *                                                       
       01  REALTP-SUB       *                               X3.135-1989             
       01  SMLTP PIC S9(4) DISPLAY       *                SECTION 4.2                            
       01  NUMTP PIC S9(9) DISPLAY SIGN LEADING       *                                                       
       01  DECTP PIC S9(9) DISPLAY SIGN LEADING SEPARATE.
       01  GRDE PIC S9(9) DISPLAY SIGN LEADING           S94)   
       01  NME1 PIC  X(20).
       01  NME2 PIC  X(20).
       01  CITY1 PIC  X(15).
       01  VAR1 PIC  X(3).
       01  indic1 PIC S9(4) DISPLAY SIGN LEADING SEPARATE.
       01  indic2 PIC S9(4) DISPLAY SIGN LEADING SEPARATE.
       01  indic3 PIC S9(4) DISPLAY SIGN LEADING SEPARATE.
        S9()DISPLAY java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
       01  indic5         PIC)java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 58
       01  indic6 PIC S9(4) DISPLAY SIGN LEADING SEPARATE.
        SEPARATE.
       01  indic8 PIC S9(4) DISPLAY SIGN LEADING SEPARATE.
       .
       01  indicx PIC S9(4) DISPLAY SIGN LEADING SEPARATE.
       01  count1 S94) LEADING .
       01  count2 PIC S9(9) DISPLAY SIGN LEADING SEPARATE.
         java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 58
       01  count4 PIC S9(9) DISPLAY SIGN LEADING SEPARATE 01PICS9)java.lang.StringIndexOutOfBoundsException: Range [40, 35) out of bounds for length 58
01 PIC9 java.lang.StringIndexOutOfBoundsException: Range [40, 35) out of bounds for length 58
       01  count6 PIC S9(9) DISPLAY SIGN LEADING SEPARATE.
       01  count7 PIC S9(9) DISPLAY SIGN 01  count1 PIC S9(9) DISPLAY SIGN LEADING
       01          S9)
       01  count9 PIC S9(9) DISPLAY SIGN  ( java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 58
       01  countx PIC S9(9)01S9) SIGNLEADING.
      *  EXEC SQL END DECLARE SECTION END-EXEC

       01  uid PIC  X(       count8S99 java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 58
       01  uidx PIC X(18).
       01  flag1  S99 java.lang.StringIndexOutOfBoundsException: Range [36, 35) out of bounds for length 58
       01  flag2 PIC S9(9) DISPLAY java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 0
       01  flag3 (9java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 57
       9 .
       01  errcnt PIC S9(4) DISPLAY SIGN LEADING        01  flag3 PIC S9(9) DISPLAY SIGN LEADING SEPARATE.
       01  i PIC S9(9) DISPLAY SIGN LEADING SEPARATE.

       01  SQL-COD 
) DISPLAYSIGNjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
       01         01  DISP1 S94 java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 57
         PIC(java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 57
       01  DISP7 PIC S9(4) DISPLAY SIGN LEADING   PIC(  SIGNjava.lang.StringIndexOutOfBoundsException: Range [48, 47) out of bounds for length 57
       01  DISP8 PIC S9(4) DISPLAY SIGN LEADING SEPARATE.

      * date_time declaration *
       01  TO-DAY  java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 29
       01  THE-TIME.
    
       PROCEDURECALL"
P0
             MOVE "HU" A"USING
CALL"uid
           MOVE "not logged in, not" TO uidx
           CALL "AUTHCK" USING SQLCODEDISPLAY ERROR"  "
           MOVE SQLCODE             java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
           if (uid NOT =            java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
                        "java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
             User " ."
            DISPLAY " "
            STOP RUN
            ACCEPTDATE

0java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
           DISPLAY
" Suite , java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 59
           DISPLAY " "
                 ********************** BEGIN TEST0410 *********************
           "59-byte ID"
           DISPLAY "TEd Version #"
           DISPLAY " "
      * date_time print *
           ACCEPT TO-DAY FROM DATE
ACCEPT 
           DISPLAY "Date run YYMMDD: " TO-DAY " at hhmmssff:                  .1989511.  


      ********************** BEGIN TEST0410 *********************
      *This program tests NULL values in OPEN CURSORS           
      *                                                         

             DISPLAY "                        count1
             java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 0
             DISPLAY "    reference       *    WHERE PNAME = :NME1:indic1 OR BUDGET > :count1:indic2
      -    " "
             java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 22
      -    " ------------------------             SQLCODE TO 

             MOVE             P50 >6
"  VAR1
             MOVE -1 TO indic1 
             MOVE 0 TO indic2
             MOVE 10000 TO              
             MOVE 0 TO count3 TOjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29

      *  EXEC SQL DECLARE X CURSOR
      *    FOR SELECT PNUM
      *    FROM PROJ
      *    WHERE PNAME = :NME1:indic1 OR BUDGET > :count1:indic2
      *  END-EXEC

      *  EXEC SQL OPEN X;
             CALL "SUB1" USING
             MOVE SQLCODE              PERFORM P49 UNT java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36

             MOVE 1              DISPLAY  
                              java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 72

             MOVE "MXSS" TO NME1
      *      VALUES('0410','pass','MCO');
             MOVE 50000 TO count1
             MOVE 0 TO count2
             -1 indic1 
             MOVE 0 TO indic2

      *  EXEC SQL DECLARE Y CURSOR
      *    FOR SELECT CITY
      *    FROM PROJ
      *    WHERE PNAME = :NME1:indic2 OR BUDGET < :count1:indic1
      *  END-EXEC

      *  EXEC SQL OPEN Y;
              "SUB2"USING indic2indic1
             MOVE SQLCODE TO SQL-COD

             MOVE 1 TO i
              i >6

java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
             DISPLAY
DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY "   count3 = ", count3 "                 "

ifcount34    =) then
      *    EXEC SQL INSERT INTO TESTREPORT 
      *      VALUES('0410','pass','MCO');
               CALL "SUB3" USINGMOVE
               MOVE SQLCODE TO SQL-COD
               DISPLAY "                  *** pass ***     "
             else
      *    EXEC SQL INSERT INTO TESTREPORT 
      *      VALUES('0410','fail','MCO');
             ADD 1 TO errcnt
               CALL "SUB4" USING SQLCODE
               MOVE SQLCODE TO SQL-COD
java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 62
             END-IF

                   *    FOR SELECT EMPNUM, CITY
             "============java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

             DISPLAYMOVE0GRDE


      *  EXEC SQL COMMIT WORK;
             CALL "SUB5" USING SQLCODE
             

      ********************** END TEST0410 *********************

      ********************** BEGIN TEST0435 *********************
      *This program tests UPDATES WHERE CURRENT                 
      *                                                         

             DISPLAY "                      TEST0435      *    FROM STAFF
             DISPLAY "        Host variables in UPDATE SQL-COD
             DISPLAY "    reference X3.135      *    FROM STAFF
             DISPLAY " 
--------------------------java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64

      *  EXEC SQL DECLARE DINO CURSOR 
      *    FOR SELECT EMPNUM, CITY
      *    FROM STAFF
      *    WHERE CITY > 'Dino' END-EXEC

      *  EXEC SQL OPEN DINO;
             CALL "SUB6"                  java.lang.StringIndexOutOfBoundsException: Range [42, 41) out of bounds for length 50
MOVEjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36

              0 java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
             MOVE        )java.lang.StringIndexOutOfBoundsException: Range [22, 23) out of bounds for length 22
             MOVE "XXX" TO NME1
             MOVE "XXX" TO VAR1

             MOVE 1 TO i
             PERFORM P48 UNTILMOVE SQL-COD

             MOVE -1 TO GRDE 
             MOVE "Joan" TO NME1

      *  EXEC SQL SELECT SUM(GRADE) INTO :GRDE
      *    FROM STAFF
      *    WHERE CITY = :CITY1;
             CALL "SUB7" USING SQLCODE GRDE CITY1
             MOVE SQLCODE TO SQL-COD

      *  EXEC SQL SELECT EMPNAME INTO :NME1
      *    FROM STAFF
      *    WHERE EMPNAME > 'Ed';
             CALL       *                                                       
             MOVE SQLCODE TO SQL-COD

      *  EXEC SQL ROLLBACK WORK;
             CALL "SUB9" USING SQLCODE
             MOVE SQLCODE TOTION 8.10, GR 8                   

              "
             DISPLAY " The correct answers are:"
             DISPLAY " GRDE = 35 and NME1 = Smith"
             DISPLAY  " "
             DISPLAY  4 java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 57
             DISPLAY " GRDE = ",   DECTP PIC S9(9) DISPLAY SIGNjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57

             if ((       01  CITY1 PIC   X15.
-")
      *    EXEC SQL INSERT INTO TESTREPORT 
      *      VALUES('0435','pass','MCO');
CALL"  
               MOVE SQLCODE4java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 58
               DISPLAY "                  *** pass ***     "
             else
      *    EXEC SQL INSERT INTO TESTREPORT 
      *      VALUES('0435','fail','MCO');
             ADD 1 TO   4 java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 58
               CALL "SUB11"    4 java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
               MOVE SQLCODE TO 01  count2 PIC S9(9) DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
                        *fail*"
01java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 58

DISPLAY
             01java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 58

 java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25


      *  EXEC SQL COMMIT WORK;
                   *  EXEC SQL END DECLARE SECTION END-EXEC
             MOVE SQLCODE TO SQL-COD

      ********************** END TEST0435 *********************



      ********************** BEGIN TEST0436 *********************
      *This program tests the NULL values for various           
      *SQL Data Types                                           

                                      java.lang.StringIndexOutOfBoundsException: Range [68, 54) out of bounds for length 69
             DISPLAY "        NULL values for01  4 java.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 57
      -    "  "
             DISPLAY "     reference X3.135-1989 section 4
      -    " "
             01  TO-DAY PIC.
      -    THE-TIME98.


             "CHARTP
0 
             MOVE 0 TO indic2
             MOVE 0 TO indic3
             MOVE 0 TO indic4java.lang.StringIndexOutOfBoundsException: Range [24, 23) out of bounds for length 34
             MOVE 0 TO             ""connected"
             MOVE 0 java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 17
             0 
              0 
             MOVE 0 TO count1
             MOVE   count2
             MOVE 0 TO count3
             MOVE 99999 TO      * date_time print *
             MOVE 99 TO SMLTP
             MOVE 999 TO NUMTP
            MOVE 999 O

      *  EXEC SQL INSERT INTO BB VALUES(NULL);
             CALL "SUB13" USING SQLCODE
MOVE TO
      *  EXEC SQL INSERT INTO EE VALUES(NULL);
              NULLin java.lang.StringIndexOutOfBoundsException: Range [66, 60) out of bounds for length 66
             MOVE SQLCODE TO java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 14
      *  EXEC SQL INSERT INTO GG VALUES(NULL);
              SUB15"USING SQLCODE
             MOVE               "IRM"TONME1
      *  EXEC SQL INSERT INTO HH VALUES(NULL);
            CALL"" USING SQLCODE
             MOVE SQLCODE TO SQL-COD
      *  EXEC SQL INSERT INTO II VALUES(NULL);
             CALL "SUB17" USING SQLCODE
             TO java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
      *  EXEC SQL INSERT INTO JJ VALUES(NULL);
             CALL "SUB18      *    WHERE PNAME = :NME1:indic1 OR BUDGET > :count1:indic2
             MOVE SQLCODE TO java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      *  EXEC SQL INSERT INTO MM VALUES(NULL);
             CALL "SUB19" USING SQLCODE
             MOVE SQLCODE1  i
      *  EXEC SQL INSERT INTO SS VALUES(NULL);
             CALL "java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
             MOVE SQLCODE TO SQL-COD

      *  EXEC SQL SELECT CHARTEST INTO :CHARTP:indic1 
      *    FROM BB;
CALL  CHARTP
             MOVE SQLCODE TO SQL-COD
             MOVE indic1 

      *  EXEC SQL SELECT INTTEST INTO :INTTP:indic2 
      *    FROM EE;
             CALL "SUB22" USING                   ==1"
MOVE SQLCODE TOSQL-COD
             MOVE   count3 , "andcount2=",""
 
      *  EXEC SQL SELECT COUNT(*) INTO :count1 
      *    FROM GG 
      *    WHERE REALTEST IS NULL;
      *      VALUES('0410','pass','MCO');
             SQLCODE 
          
      *  EXEC SQL SELECT SMALLTEST INTO :SMLTP:indic4 
      *    FROM HH;
             CALL "SUB25" USING SQLCODE SMLTP indic4
             MOVE SQLCODE TO       *      VALUES('0410','fail','MCO');
             MOVE indic4 TO DISP4

      *  EXEC SQL SELECT COUNT(*) INTO :count2 
      *    FROM II 
      *    WHERE DOUBLETEST IS NULL;
             CALL "SUB27" USING SQLCODE count2
             MOVE SQLCODE TO SQL-COD


      *  EXEC SQL SELECT COUNT(*) INTO :count3 
      *    FROM JJ 
      *    WHERE FLOATTEST IS NULL;
CALL""USING count3
             MOVE SQLCODE TO SQL-COD

      *  EXEC SQL SELECT NUMTEST INTO :NUMTP:indic7 
      *    FROM MM;
             CALL "SUB30      ********************** BEGIN TEST0435 *********************
             MOVE SQLCODE TO SQL-COD
             MOVE indic7 TO DISP7

      *  EXEC SQL SELECT NUMTEST INTO :DECTP:indic8 
      *    FROM SS;
             ALL SUB31 USINGSQLCODE DECTP indic8
             DISPLAY     X3135- 811 expression
             indic8TO 

      *  EXEC SQL ROLLBACK WORK;
             CALL "SUB32      *    FROM STAFF
             MOVE      *  EXEC SQL OPEN DINO;

             DISPLAY " The correct answers are:"
             DISPLAY                
             DISPLAY "    count1                
             DISPLAY  " "
             DISPLAY " Your answers are:"
             DISPLAY "    indic1 = ", DISP1 ", indic2 = ", DISP2
             DISPLAY "    indic4 = ", DISP4
             DISPLAY "    indic7 = ", DISP7 ", indic8 = ", DISP8
             DISPLAY "    count1 = ",MOVESQLCODETOSQL-COD
      -    " count3 = "      *    FROM STAFF

             MOVE 0 TO flag1

             MOVE 0 java.lang.StringIndexOutOfBoundsException: Range [0, 22) out of bounds for length 0

             if (indic1               DISPLAY   java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
               indic4  NOT=-1  then
               MOVE 1 TO                 java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             

             if (indic7 NOTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               MOVE 1 TO flag1
             END-IF

             if (count1  NOT =        *      VALUES('0435','pass','MCO');
             =  1)  then
               MOVE 1 TO flag2
             END-IF


             if (flag1  =  0  AND  flag2  =        *      VALUES('0435','fail','MCO');
      *    EXEC SQL INSERT INTO TESTREPORT 
      *      VALUES('0436','pass','MCO');
               CALL "SUB33"                 "dml076.sco  **fail **     "
               MOVE java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 20
DISPLAY"                  **pass**     "
             else
      *    EXEC SQL INSERT INTO TESTREPORT 
      *      VALUES('0436','fail','MCO');
             ADD java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               CALL "SUB34" USING SQLCODE
               MOVE SQLCODE TO SQL-COD
               DISPLAY "              ********************** BEGIN TEST0436 *********************
             END-IF

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

             DISPLAY  " "

      *  EXEC SQL COMMIT WORK;
             CALL           "
             MOVE SQLCODE TO SQL-COD             DISPLAY "  

      ********************** END TEST0436 *********************


      ********************** BEGIN TEST0437 *******************

             DISPLAY "             MOVE0  indic1
             DISPLAY "       NULL values for variousMOVE TO java.lang.StringIndexOutOfBoundsException: Range [29, 30) out of bounds for length 29
      -    " "
   reference X3.-1989section.,87,5. java.lang.StringIndexOutOfBoundsException: Range [71, 72) out of bounds for length 71
      -    " 1 or 2   "
             DISPLAY " 
      -    " ---------------------------   "

             MOVE -1 TO indic1 
             MOVE -1 TO indic2 
             MOVE -1 TO indic3 
             MOVE 0 TO indic4
             MOVE  
             MOVE 0 TO indic6
             MOVE 0 TO count1
             MOVE 0 TO count2
             MOVE 0 TO count3
             java.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 29

             java.lang.StringIndexOutOfBoundsException: Range [28, 25) out of bounds for length 36
             MOVE -23 TO CALLS"SQLCODE
             MOVE 99 TO REALTP-SUB      *  EXEC SQL INSERT INTO II VALUES(NULL);
      *  EXEC SQL INSERT INTO BB VALUES(:CHARTP :indic1);
             CALL "SUB36" USING SQLCODE CHARTP      *  EXEC SQL INSERT INTO JJ VALUES(NULL);
             MOVE SQLCODE TO SQL-COD
      *  EXEC SQL INSERT INTO SS VALUES(:DECTP  :indic2);
             "USING java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 52
             MOVE      *  EXEC SQL INSERT INTO SS VALUES(NULL);
      *  EXEC SQL INSERT INTO GG VALUES(:REALTP-SUB :indic3);
             CALL "SUB38" USING      *  EXEC SQL SELECT CHARTEST INTO :CHARTP:indic1 
             MOVE SQLCODE TO SQL-COD


             MOVE "X      *  EXEC SQL SELECT INTTEST INTO :INTTP:indic2 
             MOVE 23 TO DECTP
              45TO
      *  EXEC SQL INSERT INTO BB VALUES(:CHARTP :indic4);
             CALL "SUB39" USING      *    FROM GG 
                           S"java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 46
      *  EXEC SQL INSERT INTO SS VALUES(:DECTP  :indic5);
CALLSUB40SQLCODE 
             MOVE SQLCODE TO SQL-COD
      *  EXEC SQL INSERT INTO GG VALUES(:REALTP-SUB :indic6);
             CALL "SUB41" USING SQLCODE REALTP-SUB
             MOVE SQLCODE TO SQL-COD

      *  EXEC SQL INSERT INTO DD SELECT * FROM BB;
             CALL "SUB42"java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             MOVE SQLCODE TO SQL-COD
      *  EXEC SQL INSERT INTO PP SELECT NUMTEST FROM SS;
             CALL "SUB43" USING java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36
      *    FROM MM;
      *  EXEC SQL INSERT INTO JJ SELECT REALTEST FROM GG
      *    WHERE REALTEST IS NULL OR REALTEST > 0;
             CALL "SUB44" USING SQLCODE
             SQLCODE 

      *  EXEC SQL SELECT CHARTEST INTO :CHARTP 
      *    FROM DD 
      *    WHERE CHARTEST IS NOT NULL;
             CALL "SUB45" USING SQLCODE CHARTP
             MOVE SQLCODE TO SQL-COD

      *  EXEC SQL SELECT NUMTEST INTO :DECTP 
      *    FROM PP 
      *    WHERE NUMTEST IS NOT NULL;
             "UB46" DECTP
             MOVE SQLCODE TO SQL-COD

      *  EXEC SQL SELECT COUNT(*) INTO :REALTP-SUB
      *    FROM JJ 
      *    WHERE FLOATTEST BETWEEN 44 AND 46;
             CALL "SUB47" USING SQLCODE REALTP-SUB
             MOVE SQLCODE TO SQL-COD

      *  EXEC SQL SELECT COUNT(*) INTO :count1
      *    FROM JJ 
      *    WHERE FLOATTEST IS NOT NULL;
             CALL "SUB48" USING SQLCODE count1
             MOVE SQLCODE TO SQL-COD

      *  EXEC SQL SELECT COUNT(*) INTO :count2
      *    FROM DD
      *    WHERE CHARTEST IS NULL;
             CALL "SUB49" java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
MOVE TO

      *  EXEC SQL SELECT COUNT(*) INTO :count3
      *    FROM PP
      *    WHERE NUMTEST IS NULL;
             CALL "SUB50               )
             MOVE SQLCODE 

      *  EXEC SQL SELECT COUNT(*) INTO :count4
      *    FROM JJ
      *    WHERE FLOATTEST IS NULL;
             CALL "SUB51" USING SQLCODE count4
             MOVE SQLCODE TO SQL-COD

      *  EXEC SQL ROLLBACK WORK;
             CALL "SUB52      *    EXEC SQL INSERT INTO TESTREPORT 
java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36

             DISPLAY " The correct answers are:"
"CHARTP  ,DECTP =23   "
             DISPLAY "   count1 = 1, count2 = 1"
             DISPLAY "   count3 = 1, count4              
             DISPLAY  " "
DISPLAY"answers :"
             DISPLAY "   CHARTP = ", CHARTP ", DECTP = ",
      -    " REALTP-SUB = ", java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             DISPLAY "   count1 = ", java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             

             MOVE 0 TO flag1

if(  =""       23)java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
               MOVE 1 java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 23
             END-IF

             MOVE 0 TO flag2                

             if (REALTP-SUB  NOT =  1) then
                            MOVE TOindic6
             END-IF

             MOVE 0 TO flag3

             if (count1  NOT =  1  OR  count2  NOT =  1  OR  count3  NOT
             =  1  OR  count4  NOT =  1) then
               MOVE             MOVE 99 TO REALTP-SUB
             END-IF

                           "UB36"SQLCODEjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
      *    EXEC SQL INSERT INTO TESTREPORT
      *      VALUES('0437','pass','MCO');
               CALL "SUB53" USING SQLCODE
               MOVE SQLCODE TO SQL-COD
               DISPLAY "                 *** pass ***      "

      *    EXEC SQL INSERT INTO TESTREPORT
      *      VALUES('0437','fail','MCO');
             ADD 1 TO errcnt
               CALL "SUB54" java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 0
               MOVE SQLCODE TO SQL-COD
               DISPLAY "       dml076.sco  *** fail ***      "
             END-IF

             DISPLAY
             "====================================
      *  EXEC SQL COMMIT WORK;
CALL"UB5 USING SQLCODE

             DISPLAY  " "
      ********************** END TEST0437 *********************

      ********************** BEGIN TEST0441 *******************

             DISPLAY "                    TEST0441     "
             DISPLAY "           NULL values for various predicates"
             DISPLAY "   reference 5.6 <value specification> GR 1 or 2"
             DISPLAY
             --------------------------------"

             MOVE 0 TO count1
             MOVE -1 TO count2 
             MOVE 0 TO count3
             MOVE -1TO count4 
             MOVE 0 TO count5
             MOVE -1 TO count6 
             MOVE 0 TO count7
             MOVE -1 TO count8 
             MOVE 0 TO count9
             MOVE -1 TO countx 
             MOVE 0 TO indic1
             MOVE -1 TO indic2 
             MOVE 0 TO indic3
             MOVE -1 TO indic4 
             MOVECALL"UB45"SQLCODE
             MOVE -1 TO indic6 
             MOVE 0 TO indic7
             MOVE -1       *    FROM PP 
             MOVE 0 TO indic9
             MOVE -1 TO indicx 

             MOVE 11 TO DECTP
             MOVE "V___na%" TO CITY1
             MOVE "S_P%" TO NME1

      *  EXEC SQL SELECT COUNT(*) INTO :count1 
      *    FROM STAFF 
      *    WHERE GRADE BETWEEN 9 AND :DECTP :indic1;
             CALL "SUB55" USING SQLCODE count1 DECTP indic1
             MOVE SQLCODE TO SQL-COD      *  EXEC SQL SELECT COUNT(*) INTO :count1

      *  EXEC SQL SELECT COUNT(*) INTO :count2 
      *    FROM STAFF 
      *    WHERE GRADE BETWEEN 9 AND :DECTP :indic2;
             CALL "SUB56" USING SQLCODE count2 DECTP indic2
             MOVE SQLCODE TO SQL-COD

             MOVE 39999 TO DECTP

      *  EXEC SQL SELECT COUNT(*) INTO :count3 
      *    FROM PROJ 
      *    WHERE BUDGET NOT BETWEEN 9999 AND :DECTP :indic3;
             CALL "SUB57
             MOVE SQLCODE TO SQL-COD

      *  EXEC SQL SELECT COUNT(*) INTO :count4  
      *    FROM PROJ 
      *    WHERE BUDGET NOT BETWEEN 999 AND :DECTP :indic4;
             CALL "SUB58" USING SQLCODE count4 DECTP indic4
             MOVE SQLCODE TO SQL-COD

      *  EXEC SQL SELECT COUNT(*) INTO :count5 
      *    FROM  PROJ 
      *    WHERE PNAME LIKE :NME1 :indic5;
             CALL "SUB59" USING SQLCODE count5 NME1 indic5
             MOVE SQLCODE TO SQL-COD

      *  EXEC SQL SELECT COUNT(*) INTO :count6 
      *    FROM PROJ 
      *    WHERE PNAME LIKE :NME1 :indic6;
             CALL"SUB60" USING SQLCODE count6 NME1 indic6
             MOVE SQLCODE TO SQL-COD

      *  EXEC SQL SELECT COUNT(*) INTO :count7 
      *    FROM STAFF 
      *    WHERE CITY NOT LIKE :CITY1 :indic7;
            CALL"SUB61" USING SQLCODE count7 CITY1 indic7
             MOVE SQLCODE TO SQL-COD

      *  EXEC SQL SELECT COUNT(*) INTO :count8 
      *    FROM STAFF 
      *    WHERE CITY NOT LIKE :CITY1 :indic8;
             CALL "SUB62" USING SQLCODE       -   "REALTP-SUB = ", REALTP-SUB
             MOVESQLCODE TO SQL-COD

             MOVE 20              DISPLAY "  =" count3 ", count4 = ", count4

      *  EXEC SQL SELECT COUNT(*) INTO :count9
      *    FROM WORKS
      *    WHERE HOURS <> :DECTP :indic9;
             CALL"UB63 USING SQLCODE count9 DECTP indic9
             MOVE SQLCODE TO SQL-COD

      *  EXEC SQL SELECT COUNT(*) INTO :countx
      *    FROM WORKS
      *    WHERE HOURS <> :DECTP :indicx;
             CALL "SUB64" USING SQLCODE countx DECTP indicx
             MOVE SQLCODE TO SQL-COD

      *  EXEC SQL ROLLBACK WORK;
             CALL "UB65" USING 
             MOVE SQLCODE TO SQL-COD

             DISPLAY
             DISPLAY "  java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
             DISPLAY "  count3 = 1,  count4 = 0"
            DISPLAY"  count5  2  count6 = 0"
             DISPLAY "  count7 = 3,  count8 = 0"
             DISPLAY "  count9 = 8,  countx = 0"
             DISPLAY  " "
             DISPLAY " Your answers are:             
             DISPLAY "                (flag1  = 0    flag2    0  AND  flag3    0 java.lang.StringIndexOutOfBoundsException: Range [70, 71) out of bounds for length 70
             DISPLAY      *      VALUES('0437','pass','MCO');
              = ",count5 "  count6=",java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
             DISPLAY " count7 =" count7 ,count8 =" count8
             DISPLAY "  count9 = ", count9 ",  countx = ", countx

             MOVE 0 TO flag1
             MOVE 0 TO       *    EXEC SQL INSERT INTO TESTREPORT
             MOVEADD1TO 

             if ((count1MOVE TOSQL-COD
hen
               MOVE 1 TO flag1
             END-IF

             if ((count5  NOT =  2)  java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 0
              NOT=3) OR  count8NOT=  0)  
               MOVE 1 TO flag2
             END-IF

             if ((count9  NOT =  8)  OR  (countx  NOT =  0)) then
               MOVE 1 TO flag3
             END-IF

             java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             then
      *    EXEC SQL INSERT INTO TESTREPORT 
      *      VALUES('0441','pass','MCO');
               CALL "SUB66" USING SQLCODE
               MOVE SQLCODE TO SQL-COD
               DISPLAY "                  *** pass ***     "
             else
      *    EXEC SQL INSERT INTO TESTREPORT 
      *      VALUES('0441','fail','MCO');
             ADD 1 TO errcnt
               CALL "SUB67" USING SQLCODE
               MOVE SQLCODE TO SQL-COD
               DISPLAY         dml076sco** fail **"
             END-IF

             DISPLAY
             "===========   count6

             DISPLAY  " "


      *  EXEC SQL COMMIT WORK;
              "SUB68" USING SQLCODE
             MOVE SQLCODE TO SQL-COD

      ********************** END TEST0441 *********************





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

      *    ****  Procedures for PERFORM statements

        P50.
      *    EXEC SQL FETCH X INTO :VAR1;
               CALL "SUB69" USING SQLCODE  MOVE0 indic9
               MOVE SQLCODE TO SQL-COD
               if (SQLCODE  =  0) then
                 COMPUTE count3 = count3 + 1
               END-IF
               DISPLAY "VAR1 = "      *  EXEC SQL SELECT COUNT(*) INTO :count1 
             ADD 1 TO      *    WHERE GRADE BETWEEN 9 AND :DECTP :indic1;
           .

        P49.
      *    EXEC SQL FETCH Y INTO :CITY1;
               CALL "SUB70"      *    FROM STAFF 
               MOVE SQLCODE TO SQL-COD
               if (SQLCODE  =  0) then
                 COMPUTE count2 = count2 + 1
               END-IF
               
             ADD 1 TO i
           .


               MOVE i TO GRDE
      *    EXEC SQL FETCH DINO INTO :VAR1, :CITY1;
               CALL "SUB71" USING SQLCODE VAR1 CITY1
               MOVE SQLCODE TO SQL-COD

                            CALL     indic4
                 DISPLAY " VAR1 = ", VAR1 ", CITY1 = ", CITY1

      *      EXEC SQL UPDATE STAFF
      *        SET GRADE = :GRDE + 10, CITY = :CITY1
      *        WHERE CURRENT OF DINO;
                 CALL 
                 MOVE SQLCODE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               END-IF


               if (             "   1,  count2 = 0"
                 MOVE "Smith" TO NME1
      *      EXEC SQL UPDATE STAFF
      *        SET GRADE = GRADE * :GRDE, EMPNAME = :NME1
      *        WHERE CURRENT OF DINO;
                 CALL "SUB73" USING SQLCODE GRDE NME1
                 MOVE SQLCODE TO SQL-COD
,GRDE = ", GRDE
               END-IF
             ADD 1 TO i
           .

Messung V0.5 in Prozent
C=91 H=96 G=93

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

*Eine klare Vorstellung vom Zielzustand






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.