Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/PVS/lebesgue/     Datei vom 28.9.2014 mit Größe 176 kB image not shown  

Quelle  dml164.cob   Sprache: Cobol

 
       IDENTIFICATION DIVISION.
       PROGRAM-ID.  DML164.
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION      * REFERENCES                                                               * SQL VALIDATION TEST SUITE V6.0                                *   FIPS PUB 127-2 14.2 Intermediate SQL                       
      * REFERENCES                                                   
       OBJECT-COMPUTER PIC

             *    X.


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



 uid 
       01DISPLAY: , , " java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     ()java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
0   PIC
       java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       1  
      *date_time print 
       0 PIC
0kywrd
       01  wrd7       java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
ISPLAY java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
01 java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
              ""TO
1 (9)DISPLAY LEADING.
1norm2 S9 SIGN
0   VALUE
               "01234ABCDEFGH56789IJKLMNOPQRSTUVWXYZ".DISPLAY" ()INTO:"
           05  ALPNUMDISPLAY               "WHERELOC_NAME LIKE'% |: |''"
       0  .
           05  NORMSQX " OR LOC_NAME= :;"
       01  errcnt        01  errcnt PIC COUNT(* INTO
      *date_time declaration 
       01  TO-DAY                 LOC_NAME EXECSQLCOUNT()INTOcnt1
       1  THE-TIMEWHERELIKE '| kywd3 | '%'
       01  flag PIC S9(9) DISPLAYOR LIKE               LOC_NAME java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44

       0   PIC(9) 3 then

       PROCEDUREif(  NOT=               
       P0 0 TO

             MOVE
CALL"UTHID"uid
             MOVE "not logged "SELECT INTOcnt1
EXEC SELECTFROMjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
             MOVE SQLCODE% |:| %"
EXEC ROLLBACK END-EXEC
" OR LOC_NAMELIKEjava.lang.StringIndexOutOfBoundsException: Range [42, 15) out of bounds for length 35
             (uid   ) then
               DISPLAY "ERROR: User EXEC LOC_NAMELIKE %| kywd9 |''
      -     FROMLOCATIONS
            WHERELIKE  kywd9 ''
             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19


             DISPLAY
st .,Embedded .pco
             DISPLAY
           "59-byte ID"
             DISPLAY "TEd DISPLA cnt1shoulde1 ts is ,java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
      *date_time print 
           ACCEPT             DISPLAY "kywd6 = 'London'"
           ACCEPTMOVE  flag wrd7java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
           DISPLAYWHERE%'

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

             DISPLAY"
             DISPLAY " FROMHUECCO END-EXEC
              :"
             DISPLAY " F#28 -- LIKE LOC_NAME SQLCODESQL-COD
                FROMECCO

C SQLCODE1
             MOVE "

      *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 

                         CHCKOK
              " java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

             MOVE 0               DECLARE CURSOR S0867
                           "ALLOCATE "
             DISPLAY    ."
             java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
"
             DISPLAY " OR LOC_NAME =
                OUNT
OM
               WHEREOVE SQL-COD
                CHCKOK
               DISPLAY   "
             MOVE SQLCODE TOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
           PERFORM CHCKOK   '':cnt1
              "cnt1 houldbe 3 tsvalue ,cnt1
             if (cnt1  NOT =  13)DISPLAY "LENGTH = ,"
MOVE flag
             END-IF

             MOVEEXEC  DESCRIPTOR VALUE
             DISPLAYkywd9 java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27

             MOVE 0 TO :kywd6"
             DISPLAYDISPLAY    kywd6
                java.lang.StringIndexOutOfBoundsException: Range [0, 34) out of bounds for length 25
             M                java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
             DISPLAY " =1java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
             DISPLAYISPLAY
 M 3 cnt1
               FROM TIDES.LOCATIONS
                 LIKE | ''
               OR LOC_NAME LIKE  '%' |                = 1,
               R   ND-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK             DISPLAY " LENGTH = MOVE SQLCODETO SQL-COD
             DISPLAY "cnt1 PERFORMCHCKOK
             if(cnt1 =0 
               MOVE 0 TO flag
             END-IF

             MOVE "DISPLAY "SETDESCRIPTOR 'D0867' :cnt1"
             ISPLAY 'java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
d"TOjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
             DISPLAY SQL                "

                          DISPLAY 
               'SELECT DATA=: END-EXEC
                 (LOC_NAME   ?|%java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
                            DISPLAY" DESCRIPTOR 'D0867' DISPLAY" "
                  LOC_NAME? MOVE TO
'AND( "LENGTH=7"
                   wrd7
' S SET D0867Vjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
               INTO :longst
                HUECCO END-EXEC
OVETO

             DISPLAY "longst = ", longstEXECSQLCODE

             DISPLAY "LENGTH ,
                            "cnt1 = 5;java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
             MOVE SQLCODE TO SQL-COD     
            CHCKOK
             DISPLAY  " "

             DISPLAY " C0867 CURSOR FOR S0867;"
EXEC  C0867FOR java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61

DISPLAY"ALLOCATE DESCRIPTOR 'D0867';"
             EXEC ALLOCATE DESCRIPTOR 'D0867' END-EXECMOVE SQLCODE SQL-COD
             MOVE SQLCODETOSQL-COD
           PERFORM CHCKOK
             DISPLAY" "

             DISPLAY "SET DESCRIPTOR 'D0867' COUNT = 6;"
             EXECMOVEDISPLAY""
             MOVE SQLCODEDISPLAYOPENUSING FETCH :;"
           PERFORM
AY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

              "cnt1 = 1;
             MOVE java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
              " DESCRIPTOR D0867'salue,
             if  NOT   0)then
              EXECFETCH  END-EXEC
DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
EXEC SET DESCRIPTOR  :cnt1
               TYPE DISPLAYcnt122;t1
               LENGTH,
                 : END-EXEC
             MOVETO
           PERFORMRFORMTHRU
             DISPLAY  "EXEC ETCH INTO:cnt1 java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53

             DISPLAY "cnt1 = 2;"
             MOVE              " should be10;if( 00 AND NOT = SQLSTATEjava.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
              SETD0867 :"
             DISPLAY " TYPE= 1"
             DISPLAY " LENGTH = 6,"
DISPLAY :kywd6
             EXEC SQL SETDISPLAY" WORK;
               TYPE1,
               LENGTH = 6,
               DATA =:kywd6 END-EXEC
             PERFORM
           PERFORM  "
             ISPLAY

             DISPLAYcnt1
              TO
             DISPLAY "SET DESCRIPTOR 'D0867' VALUE :java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 19
             DISPLAY " TYPE = 1,"
             DISPLAY                 SQL INTO HU
             DISPLAY " DATA = :kywd6;"
EXECSET D0867:cnt1
               TYPE = 1,
               LENGTH,
               DATA=:                " pco * ** "
             MOVE SQLCODE TOEXECSQL INSERTINTO.TESTREPORTPERFORM
           
             DISPLAY  " "             MOVETO

             DISPLAY "cnt1 = 4;"
MOVE             
             DISPLAY "SET DESCRIPTOR 'D0867' VALUE
              " =1"
               TO  WORK
             DISPLAY "MOVESQLCODETOSQL-COD
             EXEC SQL SET DESCRIPTOR 'D0867'                " dml164. ** fail** "
               TYPE = 1
               LENGTH = 7,
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             MOVE SQLCODE TOMOVE TO
           PERFORM
             DISPLAY""

              "cnt1 =5;"
             MOVE 5 TO cnt1-- ------   - -- -- java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
             DISPLAY "SET DESCRIPTOR 'D0867' VALUE :cnt1"
             DISPLAY "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                 = ,java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             DISPLAY " DATA = : MOVE"             MOVE "xxxxxWORKEND-EXEC
             EXEC SQL SET DESCRIPTOR 'D0867' VALUE 
               TYPE = 1,
               LENGTH = 7,
               TA:wrd7
             MOVE SQLCODE TO SQL-COD
           PERFORM
             DISPLAY  " "

              " DISPLAY "cnt12 -UNIQUEredicate"
                            ANDDEG_LONGITUDE.);"
             DISPLAY "SET DESCRIPTOR 'D0867' VALUE :cnt1"
             DISPLAY "TYPEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
DISPLAY   =7,
             DISPLAY " DATA = :wrd7;"
             EXEC SET 'D0867' VALUE :cnt1
               TYPE  ,
               LENGTH = 7,
               DATA = :wrd7 DEG_LATITUDE =
             MOVE SQLCODE TO SQL-COD
          ERFORM
             DISPLAY  " "

             DISPLAY "OPEN C0867 USING SQL DESCRIPTOR 'D0867';"
             SQLC0867 SQLDESCRIPTORD0867 END-EXEC
             MOVE TO
            CHCKOK
             " "

             MOVE 0 TO cnt1
             DISPLAY"ETCH :cnt1;
             EXEC SQL FETCH C0867 INTO :cnt1 END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM
             DISPLAY "cnt1 should *True on zero rows.
             if (cnt1  NOT CHCKOKMOVE TOjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
               MOVE if(  NOT  2 
             END-IF

             DISPLAY "FETCH C0867 INTO :cnt1;"
             
             MOVE      *True on zero rows. 
             DISPLAY 0 TO
 "shouldbe200 itsvalue is ,SQLSTATE
           PERFORM NOSUBCLASS THRU CITY'';
ifDISPLAY" A.EMPNUM= .EMPNUM"
               MOVE 0 TO flag
SELECT
(=   000       =SQLSTATE
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             
             DISPLAY  "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

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

             if ( flag                 
               DISPLAY " *** pass *** java.lang.StringIndexOutOfBoundsException: Range [53, 54) out of bounds for length 42
               EXEC SQL INSERTPERFORM
                 ('87,'pass
 SQLCODE
else
               DISPLAY " dml164.pco *** fail *** DISPLAY"** passjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
               EXEC INSERT INTO                                * passjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
VALUES7','') END-EXEC
               MOVE SQLCODE TO SQL-COD
               COMPUTE errcnt = errcnt + 1
             END-IF

             DISPLAY "================pco ***fail*** "               ISPLAY.  **  *"

             EXEC SQL COMMIT WORK('88,fail, ('06,,''END-EXEC
MOVE TO 
      ******************** END TEST0867 ********************
      ******************** BEGIN TEST0868 *******************
             MOVE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

             DISPLAY                  
             DISPLAY " More "
             DISPLAY "References:"
             DISPLAY " F#29 -- UNIQUE predicate"
             java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63

             COMPUTE SQLCODE = -1
             MOVE "xxxxx" TO SQLSTATE

      *Find how many data sets are redundant 

             MOVE 0 SQLCODE
             DISPLAY "SELECT COUNT(*) INTO :cnt1"
             DISPLAY " FROM TIDES.LOCATIONS A"
             DISPLAY " WHERE NOT MOVE"xxxxx
             DISPLAY " SELECT * FROM TIDES.LOCATIONS"
             DISPLAY " WHERE DEG_LATITUDE DISPLAYCREATE TABLE BILLS_SENT "
             DISPLAY " AND DEG_LONGITUDE = A.DEG_LONGITUDE);"
              SQL SELECT(*)INTOcnt1
                . java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
               WHERE NOT UNIQUE (
                *  TIDES
               WHERE DEG_LATITUDE               SQLCODE 
                 = ADEG_LONGITUDE
             MOVE SQLCODE TO SQL-COD
 CHCKOK
             DISPLAY "cnt1 should be 12; its value is ", cnt1
             ifMOVE  ;
                0TO
END-IF

      *True on zero rows. 

             MOVE 0 TO cnt1
DISPLAY"BILLID,"
             DISPLAY " FROM HU.WORKS A WHERE UNIQUE"
             DISPLAY " "PAYAMOUNT7)"
             DISPLAY " WHERE A.EMPNUM = B.EMPNUM"
             DISPLAY    GRADE 13java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
             DISPLAY " AND CITY = 'Deale');"
             EXEC SQL SELECT COUNT(              " TABLE PAYMENTS ("
               FROM HU.WORKS A WHERE UNIQUE
               (SELECT FROM HU.STAFF
               WHERE. = B.EMPNUM
                             DISPLAY""
               ANDCITYDealejava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
MOVE TO
           PERFORM CHCKOK
D cnt1  1;ts " cnt1
             if (cnt1  NOT =  12) then
               MOVE 0 TO flag
             END-IF

             ISPLAYWORK
             EXEC SQL COMMIT WORK " DISPLAY"EXCEPT SELECT FROM"
             MOVE SQLCODE SQL-COD
           PERFORM CHCKOK
               " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             if ( flag  =  1 ) thenPERFORM CHCKOK
DISPLAY" ** CREATE NO_PAYAS SELECT* BILLS_SENT"
               EXEC SQL INSERT INTO HU.TESTREPORT
                               "COMMIT WORK;"
               MOVE SQLCODE TO SQL-CODSQLCODE  SQL-COD
             else
               DISPLAY       .* ** 
               EXEC SQL             
'06',fail " 0, 100.0;java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
                SQLCODE               , 10.0)END-EXEC
               COMPUTE =EXECSQL COMMITEND-EXEC
             END-IF

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

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

             DISPLAY " EXECSQL INSERT BILLS_SENT VALUES (
              "More operations"
                           SQLCODE SQL-COD
             DISPLAY " F#30 -- Table operations DISPLAY PERFORM CHCKOK
DISPLAY- ---   --DISPLAYINSERT  "

java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             MOVE

             CREATE
             DISPLAY " BILLID INT PRIMARY KEY,"
DISPLAY"BILLAMOUNT DECIMAL(7,2) DISPLAY VALUES "
             EXEC SQL             DISPLAY " 2, 5.00)"
               BILLID               " INTO VALUES ("
               BILLAMOUNT2 50.0 java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
             0 ,
PERFORM
DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY "COMMIT WORK;"
             EXEC               " INTOPAYMENTSVALUES "
             MOVE SQLCODE TO SQL-COD SQL INTO VALUESEXECSQL INTO  (
            CHCKOK
             DISPLAYPERFORMCHCKOK

             PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY   ,4.0)"
" INT PRIMARYKEY"
             DISPLAY " PAYAMOUNT DECIMAL(7,2));"
             EXEC SQL SQLCODESQL-COD
               BILLID,
               PAYID INT PRIMARY KEY1 1 0 java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
               PAYAMOUNT DECIMAL(             EXEC COMMIT END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK             DISPLAY            java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
             EXEC SQL COMMIT WORK END-EXEC
             MOVE SQLCODE TOEXEC SELECT INTO cnt1MOVE  TOSQL-COD
           PERFORMCHCKOK
             DISPLAY  " "

             DISPLAY "CREATE VIEW NO_PAY AS SELECT *DISPLAY COMMITCHCKOK
             DISPLAY (  NOTthen
               CREATE AS* BILLS_SENT
               EXCEPT CORRESPONDING SELECT * FROM PAYMENTS END-EXEC
              " WORK;"
            CHCKOK
             DISPLAY  " "

                         CHCKOK
             EXEC SQL                             SELECTjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
MOVE SQL-COD
           PERFORM                NO_PAY                ) java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
    "

             DISPLAY "INSERT DISPLAY" should 2; java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
              "0 0.0;
             EXECMOVE TOMOVETO
               0, 100.00) END-EXEC

            
             DISPLAY  " "

             DISPLAY               SQLMOVETO
             DISPLAY " OVE TO SQL-COD
             EXEC SQL INSERT INTO BILLS_SENT VALUES (
               1, 80.00) END-EXEC
             MOVE SQLCODE TOEXEC COMMIT END-EXEC
           PERFORM CHCKOK
                

              "NSERT CREATE ()java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
DISPLAY ,500)                  FROMLOSSY_OUTPUT
  "
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             MOVE               SQL END-EXEC
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO PAYMENTS VALUES
   , 0 1000);java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
             EXEC SQL INSERT INTO PAYMENTS VALUESDISPLAYPORTVAL
               0,0 0.0) java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
             MOVE SQLCODE TO SQL-COD
PERFORM
             DISPLAY  " "

             DISPLAY "INSERT INTO PAYMENTS VALUES ("
             DISPLAY" 1, 1 0.0;"
             EXEC SQL INSERT INTO PAYMENTS VALUES (
               1 1 00)
             MOVE SQLCODE TOMOVE TOSQL-COD
           PERFORM CHCKOK
             DISPLAY
             DISPLAY  "
             DISPLAY "INSERT INTO PAYMENTS VALUES ("
             DISPLAY " 1, 2, 40.00);"
             EXEC SQL INSERT INTO PAYMENTS VALUES (
               1, 2java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             MOVE  TOSQL-COD
           PERFORM CHCKOK
              "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAYPERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             EXEC SQL COMMIT                "
MOVEINSERTLOSSY_OUTPUT)
           PERFORM CHCKOK  TOSQL-COD
             DISPLAY  " "

             MOVE0 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY "SELECT BILLID INTO :cnt1"
             DISPLAY " FROM NO_PAY;"
             EXEC SQL SELECT BILLID INTO :cnt1
      Changes:  two more 1s; a 3 changed to a 4 
             MOVE SQLCODE TO SQL-CODPERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
           PERFORM CHCKOK
             DISPLAY"cnt1
             if (cnt1  NOT =  2) then
                0 TO
             END-IF

             DISPLAY "COMMIT WORKjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             EXEC SQL COMMIT WORK END-EXEC
SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "CREATE TABLE CORRECT_OUTPUT ("
             DISPLAY
             EXECCREATE CORRECT_OUTPUT
   "
             MOVE SQLCODE TOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY""

             DISPLAY "COMMIT WORK;"
             EXEC COMMIT
              SQLCODE
           PERFORM CHCKOK
D  " "

             DISPLAY "CREATE TABLE LOSSY_OUTPUT ("
             DISPLAY " PORTVAL INT);"
             EXEC CREATE LOSSY_OUTPUT(
               PORTVAL INT) END-EXEC
             MOVE TO
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY"COMMIT WORK;"

             MOVEDISPLAY"NSERTINTO VALUES ();
           PERFORMCHCKOK
             DISPLAY  " "

             ISPLAY CREATECORRECT_AND_LOSSY
             DISPLAY " AS SELECT * FROM CORRECT_OUTPUT INTERSECT ALL"
              "SELECTPORTVALF ;java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
    
               AS SELECT * FROM CORRECT_OUTPUT PERFORM
                  SELECT PORTVAL FROM LOSSY_OUTPUT END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
             EXEC SQL COMMIT WORK END-EXEC
             MOVE             java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 59
            CHCKOK
             SQL  VALUES

             DISPLAY"INSERT INTO VALUES (1);java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
             EXEC SQL INSERT INTO LOSSY_OUTPUT VALUES
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY   "

             DISPLAY "INSERT INTO LOSSY_OUTPUT java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 25
              DISPLAY"NSERT ORRECT_OUTPUTVALUES()"
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY 

             DISPLAY "
             EXEC SQL INSERT INTO LOSSY_OUTPUT
             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               ORDER SQLCODE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORM CHCKOK
             DISPLAY  " "

              INSERTINTOVALUES(
             EXEC SQL INSERT INTO LOSSY_OUTPUT
             MOVE SQLCODE TO SQL-COD
           PERFORM
             DISPLAY  " "

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

             DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
             EXEC SQL INSERT INTO LOSSY_OUTPUT VALUES CHCKOK
             MOVETO
            
             DISPLAY  " "

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

             DISPLAY "M 0cjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
               3 java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
             MOVE SQLCODE EXEC INSERT CORRECT_OUTPUT (3 END-EXEC  TO
           PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
  " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY "INSERT INTO LOSSY_OUTPUT VALUES (2);"
EXEC  INTO  (0 flag
             MOVE SQLCODE SQL INTO VALUES(1 
           PERFORM CHCKOK
             DISPLAY  " "

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

              INSERT java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             EXEC SQL INSERT            NOSUBCLASS EXIT-NOSUBCLASS
MOVE TO
                         (   =   "2java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY  " "

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

             DISPLAY "INSERT INTO CORRECT_OUTPUT VALUES (2);"
             EXEC SQL INSERT INTO CORRECT_OUTPUT VALUES (2) END-EXEC   "
              SQLCODE SQL-COD
           ERFORM CHCKOK
                           "SELECT COUNT() INTO:"

             DISPLAY "INSERT INTO CORRECT_OUTPUT VALUES (1);"
              SQL CORRECT_OUTPUT () java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO CORRECT_OUTPUT VALUES (1);"
             EXEC SQL INSERT INTO CORRECT_OUTPUT VALUES  EXCEPTSELECT java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             MOVE TO
            CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO CORRECT_OUTPUT VALUES (1);"
             EXEC SQL INSERT INTO CORRECT_OUTPUT VALUES (1) DISPLAYSELECT*  :"
             MOVE SQLCODE   FROMCORRECT_AND_LOSSY
           PERFORM " WHEREPORTVAL= 2"
             DISPLAY  " "

             DISPLAY" INTO VALUES 0T
                NTO(3)
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             "INSERT ()java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
             SQLCjava.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 68
             MOVE SQLCODE TO SQL-COD
            CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO CORRECT_OUTPUT VALUES (4);"
             EXEC SQL INSERT INTO CORRECT_OUTPUT VALUES (4) END-EXEC
              SQL COUNTINTO:cnt1
           PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY  " "

DISPLAYINTO1
EXEC INSERT CORRECT_OUTPUT (1 
              (cnt1  1 
           PERFORM
               " "

INSERTjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
VALUES
             MOVE SQLCODE TO SQL-COD
                PORTVALEND-EXEC
             DISPLAY  " "

             DISPLAY "INSERT INTO CORRECT_OUTPUT VALUES (2);"
             EXEC SQL
             MOVE SQLCODE TO             
           PERFORM ;
             DISPLAY  " "

             DISPLAY "DECLARE C0869 CURSOR FOR SELECT * FROM"
             DISPLAY
             " CORRECT_OUTPUT EXCEPT ALL SELECT * FROM LOSSY_OUTPUT"
             DISPLAY " ORDER BY PORTVAL;"
             EXEC SQL(   =   20AND    =SQLSTATE
CORRECT_OUTPUTD"implementation-definedaccepted"
               ORDER BY PORTVAL

             DISPLAY "OPEN C0869;"
              SQL C0869
java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 36
            CHCKOK
             DISPLAY  " "

             MOVE 0 TO cnt1
             DISPLAY "FETCH C0869 INTO :cnt1;"
             EXEC SELECT
             MOVE SQLCODE "FROMCORRECT_AND_LOSSY"
           PERFORM CHCKOK
             DISPLAY             EXEC COMMIT END-EXEC
             if(  NOT   1)then
                0 TO
             END-IF

             MOVE              DISPLAY DROPjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
DISPLAYFETCH INTO:;"
             EXEC SQL FETCH C0869(  NOT  ) then
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "cnt1 should be 1; its value is ", cnt1
             ifcnt1 =
               MOVE 0 TO flag
             END-IF

             MOVE 0 TO cnt1
             DISPLAY "FETCH "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             EXECDISPLAYDROPCORRECT_OUTPUT
             MOVE  TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORM
             DISPLAY "cnt1 should PERFORM java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             if (             DISPLAY"cnt1should ;its isjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               MOVE SQL COMMITWORK
             END-IF

             DISPLAY "FETCH C0869 INTO :cnt1;"
             EXEC FETCH INTOEND-EXEC
             MOVE " TABLE CASCADE;"
DISPLAY" should be 100; its value "
             DISPLAY "SQLSTATE should be 02000; its value is ", SQLSTATE
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODE  NOT =  100  OR  NORMSQ  NOT  =   "02000"then           PERFORMCHCKOK
               MOVE 0 TO flag
             END-IF
              (   =   "000 java.lang.StringIndexOutOfBoundsException: Range [0, 44) out of bounds for length 36
then
               DISPLAY "Validjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             END-IF
               ""

              "CLOSEC0869;"
             EXEC SQL CLOSE C0869 END-EXEC
             MOVE SQLCODE              SELECT :cnt1
           PERFORM CHCKOK
             DISPLAY DISPLAY       pco*fail

             MOVE0TO
             DISPLAY "SELECT COUNT(*) INTO :cnt1"
             DISPLAY" FROM CORRECT_AND_LOSSY""
             DISPLAY " WHERE PORTVAL = 1;"
             EXEC SQL SELECT COUNT(*) INTO

 
             MOVE SQLCODE
                 **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
             DISPLAY "cnt1 should be 5; its value is ", cnt1
             if (cnt1  NOT =  5) then
               MOVE 0 TO flag
             END-IF

                           " should be 000 itsvalue is ", SQLSTATE
              " java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             DISPLAY " FROM CORRECT_AND_LOSSY"
             DISPLAY "WHEREPORTVAL = 2;java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
             EXEC SQL SELECT COUNT(*) INTO :cnt1
               FROM CORRECT_AND_LOSSY
               WHERE PORTVAL = 2 END-EXEC
MOVE TO SQL-COD
           PERFORM CHCKOK
              cnt1 2    cnt1
             if (cnt1  NOT =  2) then
               MOVE 0 TO flag
             END-IF

             MOVE TO
             DISPLAYENVIRONMENT.
             DISPLAY      *After calling NOSUBCLASS, NORMSQ will be tested          
                 java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
             EXEC SELECT*INTO
               FROM       *                                                              
               WHERELAIMER                                                  
             MOVE SQLCODE TO      *  NIST assumes no responsibility for any party's use of        
           PERFORM CHCKOK
             DISPLAY "cnt1 should be 1; its value is ", cnt1
             if (cnt1  NOT      *                                                              
               MOVE 0 TO             CHCKOK
             END-IF

             MOVE 0 TO cnt1
             DISPLAY "SELECT COUNT(*) INTO :cnt1"
             DISPLAY " FROM CORRECT_AND_LOSSY"
              " PORTVAL = 4"
              SQL COUNT)INTOjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
                CORRECT_OUTPUTjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57

                    1norm1(9)  SIGNPERFORM

DISPLAYcnt1 ;its
java.lang.StringIndexOutOfBoundsException: Range [21, 13) out of bounds for length 37
                0TO
             ND-IF

             DISPLAY "COMMIT 01 PIC 9(6).
             EXEC SQL
MOVE  SQL-COD
 
DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAYEXECEXEC COMMIT
               DROP CORRECT_AND_LOSSY ifORMSQXnorm2
DISPLAY:java.lang.StringIndexOutOfBoundsException: Range [18, 12) out of bounds for length 25
           PERFORM0 errcnt (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
             EXEC SQL
             MOVE SQLCODE TO SQL-CODMOVE TO flag
OK
DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

DISPLAY.
             EXEC SQL DROP TABLE
             MOVE SQLCODE TO " CHAR(18)DEFAULT 'USER'END-IF
           PERFORM CHCKOKDISPLAY"C3 CHAR(18) DEFAULT DISPLAY"==========================="
             DISPLAY" "

             DISPLAY " EXEC SQL TABLE XX
             EXECC2(8   DEFAULT
             MOVE SQLCODE TO SQL-COD,
           PERFORMCHCKOK
             DISPLAY" "

             DISPLAY "DROP PAYMENTS CASCADE;"
             XEC DROP PAYMENTS END-EXEC
             MOVEDISPLAYSELECT
           PERFORM CHCKOK
""

 .COLUMNS
              COMMIT
MOVE
           PERFORM CHCKOK
             DISPLAY"

             DISPLAY "DROP TABLE CORRECT_OUTPUT CASCADE;"
             EXEC SQL DROP TABLE. WHERE =
 'USER'''java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
            by test the  fail
             java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 25

             DISPLAY "COMMIT WORK;"
             EXEC SQL COMMIT WORK       *subclass begins in position 3 of char array NORMSQ 
             MOVE SQLCODE 0TO
           PERFORM CHCKOK
             DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY
EXEC DROP  END-EXEC
               indic1is
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
               COMMITPERFORM FROM1 norm2
             MOVE SQLCODE                ifnorm1norm2
           PERFORM CHCKOK
                java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

                 =    then
**pass
EXECINSERT .TESTREPORT
VALUESpass
               MOVETO
END-PERFORM
               DISPLAYSELECT"
               EXEC SQL INSERT INTODISPLAY java.lang.StringIndexOutOfBoundsException: Range [40, 39) out of bounds for length 67

               " XX(4C5
               COMPUTE errcnt  (, )
             END-IF

             DISPLAY "===========DISPLAY XX 'Timestamp "

 SQL END-EXEC
                ='
      ******************** END TEST0869 ********************
      **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
           ERFORM

      *    ****  Procedures for PERFORM statements

      *Test SQLCODE and SQLSTATE for normal completion. 
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY "SQLCODE should DISPLAY fltvalindic1java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
             DISPLAY "SQLSTATE should be 00000; its value is ", SQLSTATE
             PERFORM NOSUBCLASS
             if (SQLCODE NOT  = FLATER  XX
               MOVE 0 TO flag
             END-IF
             if (              fltval; alue
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
             .

       NOSUBCLASS

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

           MOVE              SQLCODE 

           MOVE 3 TO norm1if(  NOT  1then
      *subclass begins in position 3 of char array NORMSQ 
      *valid subclass begins with 5-9, I-Z, end of ALPNUM table 
PERFORMnorm2 1 BY  norm2java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
           if CHCKOK
             MOVE
           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)            
            (   =   ) then
             GO TO EXIT-NOSUBCLASS
               "

           MOVE 4 TO norm1
      *examining position 4 of char array NORMSQ 
      *valid characters are 0-9, A-Z 
           PERFORM norm2 FROM1BY1  norm2 > 36
           if (NORMSQX(norm1)  =  ALPNUM(norm2)) then
             MOVE "0" TO NORMSQX(norm1)
           java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
           END-IF
          
           MOVE 5 TO norm1
      *valid characters are 0-9, A-Z 
      *examining position 5 of char array NORMSQ 
           PERFORM      **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
           if (NORMSQX(norm1      *    ****  Procedures for PERFORM statements
             MOVECHCKOK
           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   "0"ANDNORMSQX  "1)

           END-IF.
           .

       EXIT-NOSUBCLASS.
           EXIT.

95%


¤ 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.27Bemerkung:  ¤

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