Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Impressum xts726.cob   Sprache: Cobol

 

       IDENTIFICATION        IDENTIFICATION DIVISION
       PROGRAM-ID.       .
       ENVIRONMENT DIVISIONjava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
       CONFIGURATION SECTION.
       SOURCE-COMPUTER.  xyz.
       OBJECT-COMPUTER.  xyz.
       DATA      *The CTS5 SQL2 Project is sponsored by the European Community. 
       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                                 
      ****************************************************************



           EXECjava.lang.StringIndexOutOfBoundsException: Range [18, 17) out of bounds for length 58
       01  SQLCODE PIC S9(9)               SQL END DECLAREEND-EXEC
       01  01  norm2S99 SIGNLEADING.
       01  01  ALPNUM-TABLE VALUEIS
        uidx  18.
       01  c_num105  ALPNUMPICX   .
       01         .
        c_ch1PICX10)
       01  c_ch2 PIC  X(10).
             EXEC         errcntPIC () LEADINGSEPARATE
       01  norm1 PIC        01  TO-DAY PIC 9TO-DAY (6.
       01  norm2 PICS99)  SIGN LEADINGSEPARATE.
       01  ALPNUM-TABLE VALUE IS
               "0123401  flag PIC S9(9) DISPLAY SIGN LEADING SEPARAT
          05   PIC X   .
       01  NORMSQ.
           05  NORMSQX PIC X OCCURS 5 TIMES.
       01  errcnt PIC S9(9) DISPLAY SIGN LEADING SEPARATE.
      *date_time declaration 
       01  TO-DAY java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       01  THE-TIME PIC 9(8).
       01  flag PIC S9(9) DISPLAY SIGN LEADING SEPARATE              "loggedin "uidx

       01  SQL-COD PIC S9(9) DISPLAY             MOVE TO java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36

       PROCEDURE DIVISION.
       P0.

             MOVE "CTS1              " TO uid
             " USING uid
MOVE"ot loggedin not" TO uidx
             EXEC SQL SELECT USER INTO :uidx FROM CTS1.ECCO java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 20
             
L ROLLBACKWORK 
             MOVE SQLCODE TO SQL-COD
                        "59-59- ID"
               DISPLAY "DISPLAY" Version #java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
      -    " connected"
            STOP
             END-IF
             MOVE 0TO java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29

             DISPLAY "SQL g
             DISPLAY
           "59-byte ID"
DISPLAY TEdVersion"
      *date_time print 
           ACCEPT TO-DAY FROM      -    ORDERjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
ACCEPTjava.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 36
           DISPLAYDISPLAY"139  -java.lang.StringIndexOutOfBoundsException: Range [43, 42) out of bounds for length 67

      ***************** BEGIN TEST7026 *****************
             MOVE1 TO flag

             DISPLAY "                 TEST7026 "             DISPLAY"F#  -Intermediate SQL  "
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      -    "       *Initialise error reporting variables 
             DISPLAY "References"
             DISPLAY     . - declare"
             DISPLAY "    13.9  -- <update statement: positioned> "
             DISPLAY "    13.10 --      *Use Valid Intermediate SQL & declare a cursor  
             DISPLAY "    13.9  SR.4 "
             DISPLAY "    F#37  -- Intermediate SQL Flagging "
              -- - ---------------

      *Subtest 1 

      *Initialise error reporting variables 
             COMPUTE SQLCODE = -1
             MOVE "xxxxx" TO SQLSTATEDISPLAY WHERECOL_NUM1 1004 COL_CH1 MORRIS"

      *use table CL_STANDARD from the standard schema 
      *Use Valid Intermediate SQL & declare a cursor  
      *for UPDATE only                                
             DISPLAY "Valid Intermediate SQL syntax:"
 ALPHA CURSORFOR ,java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
                            WHERECOL_NUM1=1004  COL_CH1='MORRIS'
DISPLAYFROMCL_STANDARD
             DISPLAY "WHERE COL_NUM1 = 1004java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
H1, COL_NUM2;"
             EXEC SQL DECLARE ALPHA CURSOR FOR SELECT COL_NUM1,
               java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
               WHERE COL_NUM1 = 1004 AND java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               MOVE" java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39

java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
             EXEC    :;
MOVEjava.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36
           PERFORM CHCKOK
             DISPLAY  " "MOVETO

      *initialise host variables 
             MOVE "xxxxxxxxxx" TO c_ch1
             MOVE "xxxxxxxxxx" TO c_ch2
             MOVE 0 TO c_num1
             MOVE 0 TO c_num2
             DISPLAY "FETCH ALPHA INTO :c_num1, :c_ch1, :c_num2,
      -    " :c_ch2;"
             EXEC SQL FETCH ALPHA       *that satisfies the <search condition> of the query 
             END-EXEC
              
           PERFORM CHCKOK
DISPLAY"aluesofthe  the "
             DISPLAY "COL_NUM1 = ", c_num1, " COL_CH1 = ", c_ch1
             DISPLAY "EXEC SQL UPDATE
             DISPLAY  ""

      *use an <update statement:positioned and modify row 
      *that satisfies the <search condition> of the query 
             DISPLAY "UPDATE CL_STANDARD"
             DISPLAY "SET COL_CH1                 
             DISPLAY "WHERE CURRENT OF ALPHA;"
             EXEC SQL UPDATE              EXEC SQL CLOSE ALPHA
               SET            
               WHERE CURRENT OF ALPHA END-EXEC
             MOVE ""TOjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
                        MOVE0TOc_num1
             DISPLAY  " "

      *close the cursor 
             DISPLAY "CLOSE ALPHA;"
             EXEC SQL CLOSE ALPHA END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

      *initialise host variables 
             MOVE "xxxxxxxxxx" TO c_ch1
             MOVE "xxxxxxxxxx" TO c_ch2
             MOVE 0 TO c_num1
             FROMjava.lang.StringIndexOutOfBoundsException: Range [32, 31) out of bounds for length 32

      *use a <select statement: single row> and check that 
      *the row has been successfully modified 
             DISPLAY "SELECT COL_NUM1,            
             DISPLAY "INTO :c_num1, :c_ch1, c_num2, c_ch2"
DISPLAY"FROM "
             DISPLAY "WHERE COL_NUM1 = 1004;"
             "OL_CH1    ;it  ,c_ch1,   "
               INTO :c_num1,:c_ch1,:c_num2,:c_ch2
FROM  
               WHERE COL_NUM1 = 1004 END-EXEC
             SQLCODESQL-COD
           PERFORM CHCKOK
DISPLAY "Values of the row after the UPDATE :"
             DISPLAY "COL_NUM1 should be 1004;  it java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 38
             DISPLAY "COL_CH1  should be ELLIE; it is ", java.lang.StringIndexOutOfBoundsException: Range [0, 62) out of bounds for length 19
             DISPLAY "COL_NUM2 should be 4014;  it is ", c_num2, " MOVE   flag
             DISPLAY "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 19
             if (c_num1  NOT
             c_num2  NOT =  4014) then
               MOVE 0 TOEXEC  ROLLBACKWORK 
             END-IF
             PERFORMCHCKOK
               OVE  flag
             END-IF
             DISPLAY  " "

      *restore CL_STANDARD in its original state 
             DISPLAY "ROLLBACK WORK;"
             EXEC SQLROLLBACKWORKEND-EXEC
             MOVE SQLCODE TO"  ="
 
             DISPLAY  "SQL CURSOR java.lang.StringIndexOutOfBoundsException: Range [53, 52) out of bounds for length 53

      *Subtest 2 
DISPLAYFULLSYNTAXjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
             DISPLAY "DECLARE BETA CURSOR FOR SELECT"
             DISPLAY "COL_NUM1,COL_CH1,COL_NUM2 FROM CL_STANDARD"
             DISPLAY "WHERE COL_NUM1 = 1001"
             DISPLAY "ORDER BY COL_NUM2 DESC FOR UPDATE OF COL_CH1
             EXEC SQL
               COL_NUM1,COL_CH1,      *initialise host variables 
               WHERE COL_NUM1 = 1001
               ORDER BY COL_NUM2 DESC FOR UPDATE OF COL_CH1 END-EXEC

             DISPLAY "OPEN BETA;"
 java.lang.StringIndexOutOfBoundsException: Range [27, 26) out of bounds for length 40
             MOVE SQLCODE              EXEC SQL FETCH BETA    c_num1:,: 
           PERFORM CHCKOK
DISPLAY""

      *fetch the row 
      *initialise host variables 
             MOVE "             DISPLAY "COL_CH1Cshouldbe    is " c_ch1   java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
             MOVE "xxxxxxxxxx" TO c_ch2
             MOVE 0TO 
             MOVE 0 TO c_num2

             DISPLAY                   4001 
                 INTO:_,c_ch1:END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "COL_NUM1 should be 1001   
             DISPLAY "COL_CH1  should be MARIA  it is ", c_ch1, "             " COL_CH1=''java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
             DISPLAY "COL_NUM2 shouldWHEREOFjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
     NOT""
             c_num2  NOT =  4001) then
               MOVE 0nd record results 
             END-IF
             DISPLAY  " "

             DISPLAY "UPDATE CL_STANDARD "
             DISPLAY "SET COL_CH1 = 'TAKIS'"
             DISPLAY "WHERE CURRENT OF                 "
             EXEC SQL      *restore CL_STANDARD in its original state 
               SET COL_CH1 = 'TAKIS'
               WHERE CURRENT OF BETA END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
            "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

      *close cursor and record results 

             DISPLAY "CLOSE                        pco  * ** java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
                              ('7026''ass''CO)END-EXEC
              TOSQL-COD
           " extension CURSOR FOR  AND  "
             DISPLAY  " "

      *restore CL_STANDARD in its original state 

             DISPLAY "ROLLBACK java.lang.StringIndexOutOfBoundsException: Range [0, 35) out of bounds for length 21
             DISPLAY"java.lang.StringIndexOutOfBoundsException: Range [38, 37) out of bounds for length 57
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             if ( flag  =  1 ) then
               DISPLAY "       xts726.pco  *** pass *** "
               EXEC SQL INSERT INTO CTS1.TESTREPORT
                 VALUES('7026             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
               MOVE SQLCODE TO SQL-COD
               java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
DISPLAY" java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
               DISPLAY "Vendor java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
      -    " WARNING"
             else
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               EXEC SQL INSERT INTO CTS1.TESTREPORT
                 VALUES('7026','NOGO','            RUN.
               MOVE SQLCODE TO SQL-COD
               DISPLAY "java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
               DISPLAY "Intermediate SQL java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 14
               DISPLAY "Support for CURSOR WITH ORDER BY & UPDATE is not
      -    " required"
             END-IF

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

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

             EXEC SQL              NORMSQ =""ANDNOT= )
             MOVE SQLCODE TO SQL-COD

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

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

      *    ****  Procedures for PERFORM statements

      *Test SQLCODE and SQLSTATE for normal completion. 
       CHCKOK.
             DISPLAY "SQLCODE should be 0; its value is ", SQL-COD
             DISPLAY "SQLSTATE should be 00000; its       *After calling NOSUBCLASS, NORMSQ will be tested          
             PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (
               MOVE   flag
             END-IF
             if (NORMSQ = "00000"             MOVE 3TO java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
             then
                          PERFORM norm2 FROM14BY 1 UNTILnorm2 >36
             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.      

           SQLSTATE 

           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 VARYING norm2 FROM 14 BY 1      *examining position 4 of char array NORMSQ 
           (norm1) =  ALPNUMnorm2) then
             MOVE "0" TO)=ALPNUM(norm2)) then
           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 VARYING norm2 FROM 1 BY 1 UNTIL norm2 > 36
           if(ORMSQX(orm1  = ALPNUM(norm2) then
             MOVE "0           END-PERFORM
           END-IF
           END-PERFORM
          
           MOVE 5 TO norm1
      *valid characters are 0-9, A-Z 
      *examining position 5 of char array NORMSQ 
                 *(class = 01).  These equate to successful completion 
           if (      *Reference SQL-92 4.28 SQL-transactions, paragraph 2 
             MOVE            1  = 0"    NORMSQX()    "" 
           END-IF
           END-PERFORM
   
      *implementation-defined subclasses are allowed for warnings 
      *(class = 01).  These equate to successful completion 
      *SQLSTATE values of 00000. 
      *Reference SQL-92 4.28 SQL-transactions, paragraph 2 

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

       EXIT-NOSUBCLASS.
           EXIT.

Messung V0.5 in Prozent
C=93 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:  ¤

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






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

letze Version des Elbe Quellennavigators


Jenseits des Üblichen ....
    

Besucher

Besucher

Statistik
#Sources=1127926
#Domains=2039723