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

SSL dml108.cob   Sprache: Cobol

 
IDENTIFICATION.5ALPNUM3 .
       PROGRAM-ID.      *   ANSI SQL-1992                                              .
       ENVIRONMENT.
       CONFIGURATION SECTION.xyz
       .      *date_time declaration 
       OBJECT-COMPUTERDATA
       DATA
        THE-TIME


      * EMBEDDED COBOL (file "DML108.PCO")


      ****************************************************************
      *                                                              
      *                 COMMENT SECTION                              
      *                                                              
      * DATE 1993/11/10 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.
      *                                                              
      * DML108.PCO                                                    
      * WRITTEN BY:  David W. Flater                                 
      * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE
      *                                                              
      * This routine tests more DATETIME features in Transitional    
      * SQL.  This is the non-dynamic version of DML109.             
      *                                                              
      * REFERENCES                                                   
      *   FIPS PUB 127-2 14.1 Transitional SQL                       
      *   ANSI SQL-1992                                              
      *                                                              
      *                                                              



EXECBEGIN END-EXEC
       01  SQLCODE            CALL" * ANSI SQL-1992
       1      
       01  uid   1 THE-TIME)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
       0DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 23
       1  int1END-IF
       01  int2 IF
EXEC END DECLARE END-EXEC
       01  norm1
01norm2 S9)DISPLAY LEADING SEPARATE
       01  ALPNUM-TABLE VALUE IS
               02MOVETO
           05  ALPNUM
       .
           05  NORMSQX X OCCURS TIMES
       0           SQL           "-yteID"
      *date_time declaration 
-DAYPIC 96)
       01  THE-TIME PIC 9(8).
       01  flag PIC            TO-DAY DATE

       01  SQL-COD PIC S9DISPLAYTEd#

       PROCEDURE DIVISION.
       P0.

             MOVE "FLATER " TOACCEPTTHE-TIME FROM TIME
             CALL"AUTHID"              1 TO flag
             MOVE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             EXEC SQL SELECT INTO :uidx
             MOVE SQLCODE TO SQL-COD
             DISPLAY" DATETIME ,setfns()"
             MOVE SQLCODE TODISPLAY"FIPSPUB1- 41Transitional java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
             if (uid      -    5,            " 71 value constructor>java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      -    " connected"
            STOP RUN
             END-IF
MOVE              "xxxxx" TOSQLSTATE

             DISPLAY
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY
java.lang.StringIndexOutOfBoundsException: Range [20, 11) out of bounds for length 23
             DISPLAY"TEd Version #"
      *date_time print 
ACCEPT  DATE
           ACCEPT THE-TIME " DATE,"
           DISPLAY "Date ISPLAY"  DISPLAY"LUNCHINTERVALHOURTO)"

      ******************** BEGIN TEST0617 *******************
                 TIMESTAMP

             DISPLAY " TEST0617 "
             DISPLAY      DATETIME             EXEC   TEMPS
             DISPLAY References
             DISPLAY FIPS2- 1. Transitional SQLHOUR_OUT TIME
      -" ,20
             DISPLAY " COR1 7.1 "
             DISPLAYMOVE ,

             COMPUTE SQLCODE = -1
             MOVExxxxx SQLSTATE

             DISPLAY "CREATE TABLE TEMPS ("
             MOVE SQLCODE SQL-COD SQL WORK
             DISPLAY"START ,java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
             DISPLAY " APPT INTERVAL DAY,"
             DISPLAY " HOUR_IN TIME,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY " HOUR_OUT TIME,"
                LUNCH  TO);
             EXEC              SQLCODE SQL-COD
               ENTERED  " "
START
               APPT     DATE,
               HOUR_IN               "SUM()AS FROMTEMPS;"
               HOUR_OUTDISPLAYS HOUR_IN "
               LUNCH    TIMEEND-EXEC
                MIN(HOUR_IN) OO_EARLY
           PERFORM java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
             XEC SQL  END-EXEC
             MOVE SQLCODE TO SQL-CODAVG ( LUNCH D_AVGLUNCH
           PERFORM
             DISPLAY  " "

             DISPLAY "CREATE VIEW SUBQ1 AS"
             DISPLAY " SELECT MIN (HOUR_IN) AS TOO_EARLY,"
             DISPLAY DISPLAY  "
             DISPLAY  AVG)AS"
             DISPLAY "EXEC SQL COMMITT)AS LATESTjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
              " APPT) SUMAPPT FROMTEMPS;
             EXEC              DISPLAY"
               SELECT MIN (HOUR_IN) AS TOO_EARLY
               MAX (ALL START) AS LATESTDISPLAYROMTEMPS
H)AS
               AVG (DISTINCT LUNCH " '4' DAY,"
               SUM (APPT) CHCKOK
                             DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             MOVE SQLCODEDISPLAY"INTERVAL':0 HOUR MINUTE)"
           PERFORM
LAY

 COMMIT
             EXEC11'
             MOVE SQLCODE ':00',
           PERFORM CHCKOK::0',
             "INTO"

                 1-111"
DISPLAYTIMESTAMP1 22:14"
             DISPLAY " DATE '1993-11-12',"
             DISPLAY               "TIME'08:000,java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
             DISPLAY " DISPLAYINTERVAL' DISPLAY" 19-10115:'java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
              "TIME 160
DISPLAYINTERVAL TO"

             EXEC'63:0,
 '931-0122514java.lang.StringIndexOutOfBoundsException: Range [0, 45) out of bounds for length 31
               '1993-11-12',
               '4',
               '08:30:00',
               '1:3:0',
               '1:00'END-EXEC
               TO

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

             DISPLAYDISPLAY" INTO TEMPSVALUES ("
             ISPLAY1311 315:',java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
             DISPLAY "DATE'993-1115,java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
DISPLAY" INTERVAL 'DISPLAY "TIME0:0,java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
             DISPLAY " TIME '08:30:00',"
             DISPLAY " TIME DISPLAY "   '0:30' HOUR MINUTE
              "INTERVAL ':3' OUR MINUTE);"

             EXEC SQL INSERT INTO '1993-1-103:514,
                '19931-01 java.lang.StringIndexOutOfBoundsException: Range [0, 40) out of bounds for length 19
               '1993-11-15',
               '5',
               80:0 ':0)END-EXEC
               '17:30:ODE TO SQL-COD
               '0:30'END-EXEC
              SQLCODE  DISPLAY "

           PERFORMDISPLAYINSERT EMPS(
             DISPLAY   '9931-17 0:6:8'java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57

             DISPLAY "INSERT INTO TEMPS VALUES ("
             DISPLAY " TIMESTAMP '1993-11-17 09:56:48',"
             DISPLAY " DATE '1994-11-18',"
             DISPLAY  INTERVAL3 ,java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
             DISPLAY " TIME '09:00:00',"
0:0'"
             DISPLAY " INTERVAL '1:00' HOUR TO MINUTE);"

                           QLINSERT INTOVALUESjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
                ' '19--11'java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
                                '3,
               3,
               '09:00:00',
               ''1700:00,
               10'
             MOVE SQLCODE"shouldbe1 valueis"int1

            CHCKOK
             DISPLAY                "

      *= <> < > <= >= 

              int1-
                          COMPUTEint1-java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
             DISPLAY " FROM TEMPS WHERE"
DISPLAY "LUNCH INTERVAL'10'HOUR TO MINUTE;"

             (TEMPS
FROMjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               LUNCH < '1:00' END-EXEC
                              WHERE

           PERFORM CHCKOK
             DISPLAY" 1 valueis" int1
             if             MOVE SQLCODE SQL-COD
               MOVE 0TO
             END-IF

             COMPUTE int1 (  NOT =  1 then
             DISPLAYEND-IF
             DISPLAY  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
"

             EXEC FT"
               W
                < ':0 ISPLAY"START>DATE 19-12;java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
             MOVE SQLCODE TO SQL-COD " TEMPS WHERE

           PERFORM
 be its  ",int1
             if (int1  NOT =  3) then
               MOVE SQL-COD
             END-IFLUNCH':0 END-EXEC

             COMPUTE = -1
             DISPLAY
             DISPLAY" OVE java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             DISPLAY " (int1 NOT )then
                               MOVEjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29

             EXEC SQL DATE9-11-
               FROM TEMPS  (*  :int1
               START" START <> DATE '1993-11-15' AND"
             DISPLAY " START <> DATE '1993-11-12';"

             EXEC SQL SELECT COUNT(*) INTO :int1
               FROM TEMPS WHERE
               START <> '1993-11-15' AND
               START <> '1993-11-12' END-EXEC
             MOVE SQLCODE TO SQL-COD

           PERFORM CHCKOK
             DISPLAY "int1 should be 1; its value is ", int1
             if (int1  NOT =  1) then
               MOVE 0 TO flag
             END-IF

             COMPUTE int1 = -1
             DISPLAY "SELECT COUNT(*) INTO :int1"
             DISPLAY " FROM TEMPS WHERE"
             DISPLAY " START = DATE '1993-11-15' OR"
             DISPLAY " START = DATE '1993-11-12';"

             EXEC SQL SELECT COUNT(*) INTO :int1
               FROM TEMPS WHERE
               START = '1993-11-15' OR
               START = '1993-11-12' END-EXEC
             MOVE SQLCODE TO SQL-COD

           PERFORM CHCKOK
             DISPLAY "int1 should be 2; its value is ", int1
             if (int1  NOT =  2) then
               MOVE 0 TO flag
             END-IF

             COMPUTE int1 = -1
             DISPLAY "SELECT COUNT(*) INTO :int1"
             DISPLAY " FROM TEMPS WHERE"
             DISPLAY " HOUR_OUT > TIME '17:00:00';"

             EXEC SQL SELECT COUNT(*) INTO :int1
               FROM TEMPS WHERE
               HOUR_OUT > '17:00:00' END-EXEC
             MOVE SQLCODE TO SQL-COD

           PERFORM CHCKOK
             DISPLAY "int1 should be 1; its value is ", int1
             if (int1  NOT =  1) then
               MOVE 0 TO flag
             END-IF

             COMPUTE int1 = -1
             DISPLAY "SELECT COUNT(*) INTO :int1"
             DISPLAY " FROM TEMPS WHERE"
             DISPLAY " HOUR_OUT >= TIME '17:00:00';"

             EXEC SQL SELECT COUNT(*) INTO :int1
               FROM TEMPS WHERE
               HOUR_OUT >= '17:00:00' END-EXEC
             MOVE SQLCODE TO SQL-COD

           PERFORM CHCKOK
             DISPLAY "int1 should be 2; its value is ", int1
             if (int1  NOT =  2) then
               MOVE 0 TO flag
             END-IF

      *BETWEEN 

             COMPUTE int1 = -1
             DISPLAY "SELECT COUNT(*) INTO :int1"
             DISPLAY " FROM TEMPS WHERE"
             DISPLAY " ENTERED BETWEEN TIMESTAMP '1993-11-10 00:00:00'
      -    " AND"
             DISPLAY " TIMESTAMP '1993-11-10
      -    " 23:59:59';"
             EXEC SQL SELECT COUNT(*) INTO :int1
               FROM TEMPS WHERE
               ENTERED BETWEEN TIMESTAMP '1993-11-10 00:00:00' AND
               TIMESTAMP '1993-11-10 23:59:59' END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "int1 should be 2; its value is ", int1
             if (int1  NOT =  2) then
               MOVE 0 TO flag
             END-IF

      *IN 

             COMPUTE int1 = -1
             DISPLAY "SELECT COUNT(*) INTO :int1"
             DISPLAY " FROM TEMPS WHERE"
             DISPLAY " HOUR_OUT IN"
             DISPLAY " (SELECT HOUR_IN + INTERVAL '8' HOUR FROM
      -    " TEMPS);"
             EXEC SQL SELECT COUNT(*) INTO :int1
               FROM TEMPS WHERE
               HOUR_OUT IN
               (SELECT HOUR_IN + INTERVAL '8' HOUR FROM TEMPS) END-EXEC
             MOVE SQLCODE TO SQL-COD

           PERFORM CHCKOK
             DISPLAY "int1 should be 2; its value is ", int1
             if (int1  NOT =  2) then
               MOVE 0 TO flag
             END-IF

      *IS NULL -- see test 0621 

      *OVERLAPS (tested once already in DML106-7) 

             COMPUTE int1 = -1
             DISPLAY "SELECT COUNT(*) INTO :int1"
             DISPLAY " FROM TEMPS WHERE"
             DISPLAY " (START, APPT) OVERLAPS"
             DISPLAY " (DATE '1993-11-14', INTERVAL '2' DAY);"
             EXEC SQL SELECT COUNT(*) INTO :int1
               FROM TEMPS WHERE
               (START, APPT) =
               ('1993-11-14', '
2') END-EXEC
             MOVE SQLCODE TO SQL-COD

           PERFORM CHCKOK
             DISPLAY "int1 should be 2; its value is ", int1
             if (int1  NOT =  2) then
               MOVE 0 TO flag
             END-IF

      *ALL, SOME, ANY qualifiers (brief test) 

             COMPUTE int1 = -1
             DISPLAY "SELECT COUNT(*) INTO :int1"
             DISPLAY " FROM TEMPS WHERE"
             DISPLAY " HOUR_OUT = ANY"
             DISPLAY " (SELECT HOUR_IN + INTERVAL '8' HOUR FROM
      -    " TEMPS);"
             EXEC SQL SELECT COUNT(*) INTO :int1
               FROM TEMPS WHERE
               HOUR_OUT = ANY
               (SELECT HOUR_IN + INTERVAL '8' HOUR FROM TEMPS) END-EXEC
             MOVE SQLCODE TO SQL-COD

           PERFORM CHCKOK
             DISPLAY "int1 should be 2; its value is ", int1
             if (int1  NOT =  2) then
               MOVE 0 TO flag
             END-IF

             COMPUTE int1 = -1
             DISPLAY "SELECT COUNT(*) INTO :int1"
             DISPLAY " FROM TEMPS WHERE"
             DISPLAY " EXTRACT (YEAR FROM ENTERED) <> SOME"
             DISPLAY " (SELECT EXTRACT (YEAR FROM START)"
             DISPLAY " FROM TEMPS);"

             EXEC SQL SELECT COUNT(*) INTO :int1
               FROM TEMPS WHERE
               EXTRACT <> SOME
               (SELECT EXTRACT 
               FROM TEMPS) END-EXEC
             MOVE SQLCODE TO SQL-COD

           PERFORM CHCKOK
             DISPLAY "int1 should be 3; its value is ", int1
             if (int1  NOT =  3) then
               MOVE 0 TO flag
             END-IF

      *The following query would be helpful in finding errors in 
      *the data.                                                 

             COMPUTE int1 = -1
             DISPLAY "SELECT COUNT(*) INTO :int1"
             DISPLAY " FROM TEMPS WHERE"
             DISPLAY " EXTRACT (YEAR FROM START) <> ALL"
             DISPLAY " (SELECT EXTRACT (YEAR FROM ENTERED)"
             DISPLAY " FROM TEMPS);"

             EXEC SQL SELECT COUNT(*) INTO :int1
               FROM TEMPS WHERE
               EXTRACT <> ALL
               (SELECT EXTRACT
               FROM TEMPS) END-EXEC
             MOVE SQLCODE TO SQL-COD

           PERFORM CHCKOK
             DISPLAY "int1 should be 1; its value is ", int1
             if (int1  NOT =  1) then
               MOVE 0 TO flag
             END-IF

      *Set Functions 

      *Find the most insanely early hour of the morning that anybody 
      *has to work                                                   

             DISPLAY "SELECT EXTRACT (HOUR FROM TOO_EARLY)"
             DISPLAY " * 100 + EXTRACT (MINUTE FROM TOO_EARLY)"
             DISPLAY " INTO :int1 FROM SUBQ1;"

             COMPUTE int1 = -1
             EXEC SQL SELECT EXTRACT
               * 100 + EXTRACT 
               INTO :int1 FROM SUBQ1 END-EXEC
             MOVE SQLCODE TO SQL-COD

           PERFORM CHCKOK
             DISPLAY "int1 should be 830; its value is ", int1
             if (int1  NOT =  830) then
               MOVE 0 TO flag
             END-IF

      *Find the start date of the latest-starting appointment 

             DISPLAY "SELECT EXTRACT (YEAR FROM LATEST),"
             DISPLAY " EXTRACT (MONTH FROM LATEST) * 100 +"
             DISPLAY " EXTRACT (DAY FROM LATEST)"
             DISPLAY " INTO :int1, :int2 FROM SUBQ1;"

             COMPUTE int1 = -1
             COMPUTE int2 = -1
             EXEC SQL SELECT LATEST,
               EXTRACT * 100 +
               EXTRACT 
               INTO :int1, :int2 FROM SUBQ1 END-EXEC
             MOVE SQLCODE TO SQL-COD

           PERFORM CHCKOK
             DISPLAY "int1 should be 1994; its value is ", int1
             if (int1  NOT =  1994) then
               MOVE 0 TO flag
             END-IF
             DISPLAY "int2 should be 1118; its value is ", int2
             if (int2  NOT =  1118) then
               MOVE 0 TO flag
             END-IF

      *Find the average lunch period. 

             DISPLAY "SELECT EXTRACT (HOUR FROM AVGLUNCH)"
             DISPLAY " * 100 + EXTRACT (MINUTE FROM AVGLUNCH)"
             DISPLAY " INTO :int1 FROM SUBQ1;"

             COMPUTE int1 = -1
             EXEC SQL SELECT AVGLUNCH
               * 100 + AVGLUNCH
               INTO :int1 FROM SUBQ1 END-EXEC
             MOVE SQLCODE TO SQL-COD

      *Numeric truncation might result in a 49 here.  4.4.1 says that 
      *the choice of whether to truncate or round is implementation-  
      *defined.                                                       

           PERFORM CHCKOK
             DISPLAY "int1 should be 50; its value is ", int1
             if (int1  =  49) then
               DISPLAY "Numeric truncation is allowed. 49 is OK."
             END-IF
             if (int1  NOT =  50  AND  int1  NOT =  49) then
               MOVE 0 TO flag
             END-IF

      *Test DISTINCT 

             DISPLAY "SELECT EXTRACT (HOUR FROM D_AVGLUNCH)"
             DISPLAY " * 100 + EXTRACT (MINUTE FROM D_AVGLUNCH)"
             DISPLAY " INTO :int1 FROM SUBQ1;"

             COMPUTE int1 = -1
             EXEC SQL SELECT D_AVGLUNCH
               * 100 + D_AVGLUNCH
               INTO :int1 FROM SUBQ1 END-EXEC
             MOVE SQLCODE TO SQL-COD

           PERFORM CHCKOK
             DISPLAY "int1 should be 45; its value is ", int1
             if (int1  NOT =  45) then
               MOVE 0 TO flag
             END-IF

      *Find total number of days appointed 

             DISPLAY "SELECT EXTRACT (DAY FROM SUMAPPT)"
             DISPLAY " INTO :int1 FROM"
             DISPLAY " SUBQ1;"

             COMPUTE int1 = -1
             EXEC SQL SELECT SUMAPPT
               INTO :int1 FROM
               SUBQ1 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

      *Finally, COUNT 

             COMPUTE int1 = -1
             DISPLAY "SELECT COUNT (DISTINCT LUNCH) INTO :int1 FROM
      -    " TEMPS;"
             EXEC SQL SELECT COUNT (DISTINCT LUNCH) INTO :int1 FROM
             TEMPS END-EXEC
             MOVE SQLCODE TO SQL-COD

           PERFORM CHCKOK
          &nr:red'>DISPLAY  INTO  SUBQ1

              int1  00 AVGLUNCH
              SQLSELECT AVGLUNCH
             SQLCODE 
               INTO
             MOVE SQLCODE TO SQL-COD      *the choice of whether to truncate or round is implementation-  

      *Numeric truncation might result in a 49 here.  4.4.1 says that 
      *the choice of whether to truncate or round is implementation-  
      *defined.                                                       

           PERFORM Numeric allowedjava.lang.StringIndexOutOfBoundsException: Range [62, 61) out of bounds for length 66
             DISPLAY "int1 should java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 34
DISPLAY "Numerictruncationisallowed 9i OK"
             END-IF
             if (int1  NOT =        *Numeric truncation might result in a 49 here.  4.4.1 says that 
               MOVE 0 TO flag
             END-IF

      *Test DISTINCT 

             DISPLAY "SELECT EXTRACT (HOUR FROM D_AVGLUNCH)"
             DISPLAY C int1-
             DISPLAY (int1java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34

             COMPUTE int1 1  D_AVGLUNCH
             EXECifint1   5                int1 END-EXEC
  TO
               INTO :int1
             MOVE SQLCODE       1 PIC(9P CHCKOK

            CHCKOK
 int1 =4
             if (int1  NOT =  45) then
               MOVETO                0 flag
             END-IF

      *Find total number of days appointed 

             DISPLAY " P0java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10
             DISPLAY " :int1 FROM"java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
             DISPLAY " SUBQ1;"

1
             EXEC SQL SELECTMOVE" INTOint1FROM
                :int1  flag
               SUBQ1
             MOVE                 :int1

           PERFORM CHCKOK               SUBQ1EXECSQL WORK END-EXEC
             DISPLAY "int1 be1; valueis " 
             if (int1
               MOVE 0 TOPERFORMCHCKOK
             END-IF

      *Finally, COUNT 

             COMPUTE int1 = -1
              "SELECT (DISTINCT "      ,"
      -    " TEMPS;"
              SQLCOUNT
             TEMPS
             MOVESQLCODE   LUNCHTO"

           PERFORMENTERED
              "int1 should be *Finally, COUNT
             ifint1 = ) then
               MOVE 0 TO
             END-IF

             DISPLAY"ROLLBACKWORK;
DISPLAY   "
             MOVE SQLCODE TOjava.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 0

           PERFORM
                "

             "ROPTABLEjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
  TABLECASCADE
             MOVEDISPLAY   DISTINCT"

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

             DISPLAYAVG LUNCH            java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             F TEMPS
MOVE  TO              if             SQL END-EXEC

           PERFORM CHCKOK
             DISPLAY

  1 ) then
               DISPLAY "
EXEC  "
                 VALUESjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               MOVE             DISPLAY   131-2,java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
             else
                " java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  INSERT.TESTREPORT
                 VALUES13-'
               03:0,
  =  java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
             END-IF

 ========

             EXEC SQL
              SQLCODESQLCODE              MOVE SQLCODE TO SQL-COD=========java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
      ******************** END TEST0617 ********************
      **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
           STOPMOVE TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36

      *    ****  Procedures for PERFORM statements

      *Test SQLCODE and SQLSTATE for normal completion. 
             *    ****  Procedures for PERFORM statementsDISPLAY                *passjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY "SQLCODE should be 0; its value is ", SQL-COD
else
             PERFORMMOVE java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
t
               MOVEimplementation-defined
             END-IF
             if (NORMSQ SQLCODENOSUBCLASS
             then
               DISPLAY "Valid implementation-defined *expected by the test case; otherwise the test will fail.

             .

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 NORMSQ

           MOVE 3             THRU
      *subclass begins in position 3 of char array NORMSQ 
      *valid subclass begins with 5-9, I-Z, end of ALPNUM table 
           PERFORM      *so proceed to zero it out, if valid (0-9,A-Z)            
            ((norm1 TO
             MOVE END-IF
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)            
            (=SQLSTATE
             GO TO EXIT-NOSUBCLASS
           

           MOVEMOVE0 Onorm1
      *examining position 4 of char array NORMSQ 
      *valid characters are 0-9, A-Z 
           PERFORM norm2 .
           if (NORMSQX(norm1      *valid characters are 0-9, A-Z .
             MOVE "0PERFORM *java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
           END-IF
            (NORMSQX)  =      expected by the test case; otherwise the test will fail.  test; the will
          
            5 norm1
      *valid characters are 0-9, A-Z 
      *examining position 5 of char array NORMSQ 
      *SQL values of00.
           ((norm1
             MOVE "0" TOPERFORM norm2 14BY UNTIL "TONORMSQX2)
           END-IFEND-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)      *Changed NORMSQ means implementation-defined subclass,    
             MOVE NORMSQX
           END-IF
           .

EXIT-NOSUBCLASS
           EXIT.

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:  (vorverarbeitet)  ¤

*Bot Zugriff






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.