products/Sources/formale Sprachen/C/LibreOffice/cui/source/inc/   (LibreOffice Version 25.8.3.2©)  Datei vom 5.10.2025 mit Größe 23 kB image not shown  

Quelle  yts794.cob   Sprache: Cobol

 

       IDENTIFICATION java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 29
       PROGRAM-ID.  YTS794.
       ENVIRONMENT DIVISION.
      CONFIGURATION SECTIONjava.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
       SOURCE-COMPUTER.  =)then
       OBJECT-COMPUTER.  xyz.
       DATA DIVISION.
       WORKING-STORAGE SECTION.


      * EMBEDDED COBOL (file "YTS794.PCO")


      *Copyright 1996 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                               
      *                                                              
      * YTS794.PCO                                                   
      * WRITTEN BY:  Susan Watters                                   
      * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE
      *                                                              
      * GRANT USAGE on character set, no WGO                         
      *                                                              
      *                                                              
      * REFERENCES                                                   
      *   11.28   <character set definition>                         
      *   11.36   <grant statement>                                  
      *   10.3    <privileges>                                       
      *   11.3    <table definition>                                 
      *   11.4    <column definition>                                
      *   16.4    <set session authorization identifier statement>   
      *   F#45    Character set definition                           
      *   F#32    User authorisation                                 
      *   F#3     Basic schema manipulation                          
      *   F#2     Basic information schema                           
      *                                                              
      * DATE LAST ALTERED 02.01.96 CTS5 Hand-over Test               
      *                                                              
      * QA Status: Full FC                                           
      *                                                              
      * Revised by DWF 1996-03-22                                    
      *   Added rollback after authid                                
      *   Fixed charset usage                                        
      *   Fixed bad schema refs                                      
      *   Fixed SDL transactions                                     
      ****************************************************************




           EXEC SQL BEGIN DECLARE SECTION END-EXECEXECSQLGRANT  ONCHARACTER SET .CS2 TOCTS4
       01  PIC(9) COMP.
       01  SQLSTATE PIC  X(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       01  ggt   SQLCODEbe ;its valueis"SQL-COD
PICX18.
       01  uidx PIC  X(18).
             EXEC SQL END DECLARE SECTION END-EXEC
       01  norm1 PIC S9(9) DISPLAY SIGN LEADINGMOVE  java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
       01 norm2  ()DISPLAYSIGN LEADINGSEPARATEjava.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
       01  ALPNUM-TABLE VALUE IS
               01234ABCDEFGH56789IJKLMNOPQRSTUVWXYZ
                           0 TOflag
END-I
           05  NORMSQX              if (NORMSQ   "    NORMSQ       )
       01  errcnt PIC S9(9) DISPLAY SIGN LEADING java.lang.StringIndexOutOfBoundsException: Range [0, 57) out of bounds for length 17
      *date_time declaration 
       01  TO-DAY PIC              " WORK;"
       01THE-TIMEPIC()java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
       01  flag PIC S9(9) DISPLAY( ()java.lang.StringIndexOutOfBoundsException: Range [46, 42) out of bounds for length 65

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

       PROCEDURE DIVISION.
       P0.

             MOVE " MOVE TO 
             CALL            CHCKOK
             MOVE "not logged in, not" TOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             EXEC SQL SELECT   : FROM.ECCOEND-EXEC
                SQL-COD
             EXEC SQL ROLLBACK WORK END-EXEC
             MOVE              
             if (uid  NOT
DISPLAYERROR: ",uid,"expected  User" ,"
      -    " connected"
            STOP RUN
             END-IF
             MOVE 0 TO errcnt

             DISPLAY "SQL Test Suite, java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 36
             DISPLAY
           "59-byte ID"
                          DISPLAYSELECT* gFROMTB
      *date_time print 
           ACCEPT TO-DAY FROM DATE
           ACCEPT THE-TIME FROM TIME
                        DISPLAY "  shouldbe 'ef' was " 

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

             DISPLAY "                  TEST7528 "
             DISPLAY "   GRANT USAGE on java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 19
DISPLAY References
             DISPLAY "    11.28   <character set definition>"
             DISPLAY "    11.36   <grant statement>"
             DISPLAY "    10.3    <privileges>"
             DISPLAY "    11.3    <table definition>"
             DISPLAY "    11.4    <column definition>"
             DISPLAY "    16.4    <set session PERFORMCHCKOK
      -    " statement>"
             DISPLAY       *ensure database is left in a consistent state 
                           "DROPTABLE CASCADE"
             DISPLAY  F32    User"
             DISPLAY "    F#3     
             DISPLAY "    F#2     Basic java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 25
             DISPLAY "   - - - - - - - - -              COMMIT  

             COMPUTE SQLCODE = -1
             MOVE "xxxxx" TO SQLSTATE

             DISPLAY "This program is the                 java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
              cGRANT  acharset no
      -    " GRANT OPTION"
             DISPLAY  ""

      *initialise variables 
             MOVE "xxx" TO                  VALUES(7528''pass,'PCO')END-EXEC

      *as second user grant usage on domain to third user 

             DISPLAY ""       yts794pco  ** fail ** "
             EXEC SQL   ON CHARACTER CTS1C  CTS4
             END-EXEC
              SQLCODETOSQL-COD

      *That should generate an Syntax Rule or Access Rule Violation 
      *which is SQLSTATE 42000 

             DISPLAY "SQLCODE should be < 0; its value is                COMPUTE errcnt =errcnt  1

                             ========================="
             

              " should be 42000; its  is", 
           PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if      **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
                0 flag
             END-IF
             if (
             then
               DISPLAY "      *Test SQLCODE and SQLSTATE for normal completion. 
             END-IF
                "

             DISPLAY" WORK;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
             EXEC SQL COMMIT WORK END-EXEC
             MOVE               0TOflag

      *create table using character set 

             DISPLAY "CREATE TABLE java.lang.StringIndexOutOfBoundsException: Range [13, 1) out of bounds for length 17
              (TBCCHARACTER3 CHARACTER SETCTS1CS2;
             EXEC SQL 
               (TBCjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             MOVE SQLCODE      *                          SQLSTATE will be printed.      
           PERFORM CHCKOK
SPLAY 

                   *subclass begins in position 3 of char array NORMSQ      *valid subclass begins with 5-9, I-Z, end of ALPNUM table 
             EXEC SQL COMMIT WORK END-EXEC
              SQLCODE TOSQL-COD
           PERFORM 
             DISPLAY           

      *insert value into table 

             DISPLAY "INSERT INTO TB       *Changed NORMSQ means implementation-defined subclass,    
             (ORMSQ      )then
             MOVETOSQL-COD
           PERFORM  
             DISPLAY  " "

             DISPLAY "      *examining position 4 of char array NORMSQ 
             EXEC            PERFORM VA  FROM1BY1   >36
             MOVE SQLCODETO
            MOVE "0  (norm1)
             DISPLAY "value returned should END-PERFORM
              (ggtNOT    d" 
               MOVE 0      *valid characters are 0-9, A-Z 
             END-IF

             DISPLAY "OMMIT WORK;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
                        
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
                   *Reference SQL-92 4.28 SQL-transactions, paragraph 2 

      *ensure database is left in a consistent state 

             DISPLAY "DROP TABLE TB CASCADE;"
             EXEC SQL DROP TABLE TB CASCADE END-EXEC
             MOVESQLCODE  
           PERFORM CHCKOK
             DISPLAY  " "

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

             if (flag  =  1) then
               DISPLAY "       yts794.pco  *** pass *** "
               EXEC SQL INSERT INTO CTS1.TESTREPORT
                 VALUES('7528','pass','PCO') END-EXEC
               MOVE SQLCODE TO SQL-COD
             else
               DISPLAY "       yts794.pco  *** fail *** "
               EXEC SQL INSERT INTO CTS1.TESTREPORT
                 VALUES('7528','fail','PCO') END-EXEC
               MOVE SQLCODE TO SQL-COD
               COMPUTE errcnt = errcnt + 1
             END-IF

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

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


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

      *    ****  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 value is ", SQLSTATE
             PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS
             if (SQLCODE NOT =  0  OR   NORMSQ NOT = "00000") then
               MOVE 0 TO flag
             END-IF
             if (NORMSQ = "00000"  AND  NORMSQ NOT = SQLSTATE)
             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 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 VARYING norm2 FROM 14 BY 1 UNTIL norm2 > 36
           if (NORMSQX(norm1)  =  ALPNUM(norm2)) then
             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 VARYING norm2 FROM 1 BY 1 UNTIL norm2 > 36
           if (NORMSQX(norm1)  =  ALPNUM(norm2)) then
             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
           if (NORMSQX(norm1)  =  ALPNUM(norm2)) then
             MOVE "0" TO NORMSQX(norm1)
           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=89 H=98 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.5Bemerkung:  ¤

*© Formatika GbR, Deutschland






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.