Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/Documentation/ABI/testing/   (Linux Kernel Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 799 B image not shown  

Impressum xts726.cob   Sprache: Cobol

 

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


      * EMBEDDED COBOL (file "XTS726.PCO")


      *Copyright 1995 National Computing Centre Limited               
      *and Computer Logic R&D S.A                                     
      *on behalf of the CTS5 SQL2 Project.                            
      *All rights reserved.                                          
      *The CTS5 SQL2 Project is sponsored by the European Community. 
      *                                                             
      *The National Computing Centre Limited and Computer Logic R&D  
      *have given permission to NIST to distribute this program      
      *over the World Wide Web in order to promote SQL standards.    
      *DISCLAIMER:                                                   
      *This program was reviewed by employees of NIST for            
      *conformance to the SQL standards.                             
      *NIST assumes no responsibility for any party's use of         
      *this program.                                                 


      ****************************************************************
      *                                                              
      *                 COMMENT SECTION                              
      *                                                              
      * SQL VALIDATION TEST SUITE V6.0                               
      *                                                              
      * XTS726.PCO                                                   
      * WRITTEN BY: Nickos Backalidis                                
      * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE
      *                                                              
      * Flagging - Full SQL - cursor with FOR UPDATE and ORDER BY    
      *                                                              
      * REFERENCES                                                   
      *   13.1    -- <declare cursor>                                
      *   13.9    -- <update statement: positioned>                  
      *   13.10   -- <update statement: searched>                    
      *   13.9    SR.4                                               
      *   F#37    -- Intermediate SQL Flagging                       
      *                                                              
      * DATE LAST ALTERED  14/12/95 CTS5 Hand-over Test              
      *                                                              
      * Cleanups and fixes by V. Kogakis 04/12/95:                   
      *      Change values returned from table CL_STANDARD           
      *             (JIM > MORRIS)                                   
      *                                                              
      * QA Status: QA CHECK                                          
      *                                                              
      * Revised by DWF 1/31/96                                       
      *   Removed status checks after cursor definition              
      *   Fixed char string lengths                                  
      *   Fixed misinterpretations of SQL-92                         
      *   Harmonized printfs with executed statements                
      *   Corrected expected results                                 
      ****************************************************************



           EXEC SQL BEGIN DECLARE SECTION END-EXEC
      *                                                              
       01  SQLSTATE PIC  X(5).
       01  uid PIC  X(18).
       01  uidx PIC  X(18).
       01  c_num1 PIC S9(9) DISPLAY SIGN LEADING SEPARATE      * Revised by DWF 1/31/96                                       
       01  c_num2 PIC S9(9) DISPLAY SIGN LEADING SEPARATE.
       01  c_ch1 PIC  X(10).
       01  c_ch2 PIC  X(10).
                   **************************************java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       01  norm1 PIC S9(9) DISPLAY SIGN LEADING SEPARATE.
       (9) DISPLAY SIGN LEADING .
       01  ALPNUM-TABLE VALUE IS
               "01234ABCDEFGH56789IJKLMNOPQRSTUVWXYZ".
           05  ALPNUM PIC X OCCURS 36 TIMES01     18)
01  .
           05  NORMSQX PIC X OCCURS 5 TIMES.
01    S9) SIGN LEADINGSEPARATEjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
      *date_time declaration 
         X10.
        EXECSQLEND SECTIONEND-EXEC
       01  flagPICS99)DISPLAYSIGNLEADINGSEPARATE.

       01  SQL-COD PIC S9(9) DISPLAY SIGN LEADING SEPARATE.

       PROCEDURE DIVISION.
       P0.

             MOVECTS1"TOjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
             CALL "AUTHID               01234ABCDEFGH56789IJKLMNOPQRSTUVWXYZ.
             MOVE  .
             EXEC 05java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 44
             MOVE SQLCODE TO SQL-COD
             EXEC SQL 01  (java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
              TOSQL-COD
                    01  SQL-COD 9DISPLAY LEADING.
               DISPLAY "ERROR: User ", uid
      -    " connected
            STOP 
             
             MOVE 0 TO errcnt

             DISPLAY "SQL Test Suite, V6.0, Embedded COBOL, xts726.pco"
             DISPLAY
           "59-byte ID"
             DISPLAY "TEd Version #"
      *date_time print 
           ACCEPT TO-DAY FROM DATE
           ACCEPT THE-TIME FROM               SQL   END-EXEC
AY"ate run       "THE-TIME

      ***************** BEGIN TEST7026 *****************
MOVE  flag

             DISPLAY "                 TEST7026 "
             DISPLAY "    Flagging Full             STOP java.lang.StringIndexOutOfBoundsException: Range [20, 21) out of bounds for length 20
      -"ORDER "
             DISPLAY "java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 20
             DISPLAY     .  -<eclarecursor"
             DISPLAY "    13.9  --       *date_time print 
             DISPLAY "    13.10 -- <update statement: java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 36
             DISPLAY"    139 4"
             DISPLAY "    F#37  -- Intermediate SQL Flagging "
             DISPLAY "   - - - - - - - - -java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

      *Subtest 1 

      *Initialise error reporting variables 
             COMPUTEjava.lang.StringIndexOutOfBoundsException: Range [30, 28) out of bounds for length 33
             MOVE "xxxxx"              "

      *use table CL_STANDARD from the standard schema 
      *Use Valid Intermediate SQL & declare a cursor  
      *for UPDATE only                                
             DISPLAY "Valid Intermediate SQL syntax:"
             DISPLAY "DECLARE ALPHA CURSOR FOR SELECT              "F  - Flagging
DISPLAY "OL_CH1,OL_NUM2,OL_CH2"
             DISPLAY "FROM CL_STANDARD "
             DISPLAY "WHERE COL_NUM1 = 1004 AND COL_CH1 = 'MORRIS'"
             DISPLAY "FOR UPDATEjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             EXEC SQL DECLARE ALPHA CURSOR FOR SELECT xxxxx  SQLSTATE
               COL_CH1,      *use table CL_STANDARD from the standard schema 
               WHERE COL_NUM1 = 1004      *for UPDATE only                                
                            DISPLAY DECLARE CURSORFORCOL_NUM1"

             DISPLAY "OPEN ALPHA;"DISPLAY ",C"
             EXEC SQL OPEN ALPHA END-EXEC
             MOVE SQLCODE TO SQL-COD
          CHCKOK
             DISPLAY  " "

      *initialise host variables 
             MOVE "xxxxxxxxxx" TO c_ch1
             MOVE "xxxxxxxxxx" TO c_ch2
              0 
             MOVE 0 TO c_num2
             DISPLAY "               FOR UPDATECOL_CH1, 
      -    " :S OPENALPHA 
             EXECMOVE SQLCODETO SQL-COD
             END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "Values of the columns BEFORE the UPDATE:"
             DISPLAY "COL_NUM1 = ", c_num1, " MOVE  TO 
             DISPLAY "COL_NUM2 = ", c_num2, " COL_CH2 = ", c_ch2
             DISPLAY  " "

      *use an <update statement:positioned and modify row 
      *that satisfies the <search condition> of the query 
             DISPLAY MOVEjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36
             DISPLAY "SET COL_CH1 = 'ELLIE', COL_NUM2 = COL_NUM2 + 10"
             DISPLAY "WHERE CURRENT OF ALPHA;"
             EXEC SQL UPDATE CL_STANDARD
               SET COL_CH1 = 'ELLIE',      *that satisfies the <search condition> of the query 
               WHERE CURRENT OF ALPHA END-EXEC
             MOVESQLCODETOSQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

      *close the cursor 
             DISPLAY"ALPHA;
             EXEC SQL CLOSE                 COL_CH1=E'COL_NUM2 +java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

      *initialise host variables 
 c_ch1
             MOVE "xxxxxxxxxx" TO c_ch2
             MOVE 0 TO c_num1
MOVE0TOc_num2

      *use a <select statement: single row> and check that 
      *the row has been successfully modified 
             DISPLAY "SELECTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY "INTO :c_num1, :c_ch1, c_num2, c_ch2"
             DISPLAY "FROM CL_STANDARD"
             DISPLAY "WHERE COL_NUM1 = 1004;"
             EXEC SQL SELECT
               INTO :c_num1,:c_ch1,:c_num2,:c_ch2      *the row has been successfully modified 
               FROM CL_STANDARD INTO:ch1c_num2java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
               WHERE COL_NUM1DISPLAY "HERECOL_NUM1=1004;"
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY " INTO:c_num1,c_ch1,c_num2,c_ch2
             DISPLAY "COL_NUM1 should be 1004;  it is ",                    
             DISPLAY "COL_CH1  should be ELLIE; it isPERFORM CHCKOK
              "COL_NUM2 should  4014;  it is ,c_num2,""
             DISPLAY "COL_CH2  should be PARGA; it is ", c_ch2, "  "
             if (c_num1  NOT =  1004  OR  c_ch1  NOT  =   "ELLIE"  OR 
             c_num2  NOT =  4014) then
               MOVE0 TO 
             END-IF
             if (c_ch2  NOT  =   "PARGA")               "OL_CH2be  is ,c_ch2," java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
               MOVE 0 TO flag
END-IF
             DISPLAY  " "

      *restore CL_STANDARD in its original state 
             DISPLAY "ROLLBACK WORK;"
             EXEC SQL ROLLBACK WORK END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

      *Subtest 2 
             DISPLAY "FULL SQL SYNTAX:"
             DISPLAY "DECLARE BETA CURSOR FOR SELECT"
             DISPLAY "COL_NUM1,COL_CH1,COL_NUM2 FROM CL_STANDARDPERFORM 
             DISPLAY "WHERE java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY "ORDER BY COL_NUM2 DESC FOR UPDATE java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 53
              DECLARE FOR 
               COL_NUM1,COL_CH1,COL_NUM2 FROM CL_STANDARD
               WHERE DISPLAY "WHERE COL_NUM1 = 1001"
BY   java.lang.StringIndexOutOfBoundsException: Range [60, 59) out of bounds for length 68

DISPLAYOPEN"
             EXEC SQL OPEN BETA END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

      *fetch the row 
      *initialise host variables 
 ""TO
             MOVE "xxxxxxxxxx" TO c_ch2
             MOVE 0 TO c_num1
             MOVE 0 TO c_num2

DISPLAYF BETA INTO:n :c_ch1,:_um2;java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
             EXEC SQL FETCH BETA       *fetch the row 
                          MOVE xxxxxxxxxx java.lang.StringIndexOutOfBoundsException: Range [39, 40) out of bounds for length 39
           PERFORM CHCKOK
DISPLAY"shouldbe     is "c_num1  
             DISPLAY "COL_CH1  should be MARIA  it is ", c_ch1, "  "
             DISPLAY "COL_NUM2 should be 4001   it              DISPLAY FBETAINTO:num1,: c_num2 "
              (NOT      c_ch1NOTMARIA   
             c_num2  NOT =  4001) then
               MOVE 0 TO flag
             END-IF
DISPLAY " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY "UPDATE CL_STANDARD "
             DISPLAY "SET COL_CH1 = 'TAKIS'"
             DISPLAY "WHERE CURRENT OF BETA;"
             EXEC SQLUPDATE
               SET COL_CH1 = 'TAKIS'
               WHERE CURRENT OF BETA END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORMDISPLAY   java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY  " "

      *close cursor and record results 

             DISPLAY "CLOSE BETA;"
              SQL 
             MOVE SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

      *restore CL_STANDARD in its original state 

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

             if ( MOVE SQLCODE 
               DISPLAY "       xts726.pco  *** pass *** "
               EXEC SQL INSERT       *restore CL_STANDARD in its original state 
                 VALUES('7026','pass','PCO') END-EXEC
               MOVE SQLCODE TO              MOVE
               DISPLAY "SQL extension CURSOR
               DISPLAY "has executed successfully"
               DISPLAY"Vendor  Intermediate Flagger
      -    " WARNING"
             else
               DISPLAY "       xts726.pco  *** NOGO *** "
               EXEC SQL INSERT INTO CTS1.TESTREPORT
                 VALUES('7026','NOGO','PCO')                "SQL CURSOR FORUPDATE  "
               MOVE SQLCODE TODISPLAY VendormustdemonstrateFlagger
               java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
               java.lang.StringIndexOutOfBoundsException: Range [15, 1) out of bounds for length 51
 "  CURSOR  ORDERBY &UPDATE  
      -    " required"
             END-IF

      *BAK : Check again in order to insert a third option for fail 
      *DWF: ??? 

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

             EXEC SQL COMMIT WORK END-EXEC
             MOVE SQLCODE TO SQL-COD

      ***************** END TEST7026 ******************

      **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
           STOPjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20

      *    ****  Procedures for PERFORM statements

      *Test SQLCODE and SQLSTATE for normal completion. 
       CHCKOK.
             DISPLAY "SQLCODE       ***************** END TEST7026 ******************
             DISPLAY "SQLSTATE should be 00000; its value is ", SQLSTATE
             PERFORM 
             if (SQLCODE NOT =  0  OR   NORMSQ NOT = "00000") java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               MOVE 0 TO flag
END-IF
             if (NORMSQ = "00000"  AND  NORMSQ NOT               java.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 52
             then
               DISPLAY "Valid java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 29
             END-IF
             

       .

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

           MOVE SQLSTATE TO NORMSQ

           MOVE 3 TO norm1
      *subclass begins in position 3 of char array NORMSQ 
      *valid subclass begins with 5-9, I-Z, end of ALPNUM table 
           PERFORM           
            ((orm1    () 
             MOVE "0" TO NORMSQX(norm1)
           END-IF
           END-PERFORM
           
      *Quit if NORMSQ is unchanged.  Subclass is not impl.-def. 
      *Changed NORMSQ means implementation-defined subclass,    
      *so proceed to zero it out, if valid (0-9,A-Z)            
           if (NORMSQ   =   SQLSTATE) then
             GO TO EXIT-NOSUBCLASS
           END-IF

           MOVE 4 TO norm1
      *examining position 4 of char array NORMSQ 
      *valid characters are 0-9, A-Z 
           PERFORM VARYINGnchanged.  Subclass is not impl.-def. 
           if (NORMSQX(norm1)  =  if valid (0-9,A-Z)            
             MOVE "0" TO NORMSQX(norm1)
           END-IF
           END-PERFORM
          
           MOVE 5 TO norm1
      *valid characters are 0-9, A-Z 
      *examining position 5 of char array NORMSQ 
           PERFORM VARYING norm2 FROM 1 BY 1 UNTIL norm2 > 36
java.lang.StringIndexOutOfBoundsException: Range [31, 28) out of bounds for length 53
             MOVE "0" TO NORMSQX(norm1)
           
           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 java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
             MOVE "0" java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 3
           END-IF
           .

             *SQLSTATE values of 00000. 
           EXIT.

Messung V0.5 in Prozent
C=92 H=95 G=93

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

*Bot Zugriff






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.