Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Roqc/test-suite/success/   (Beweissystem des Inria Version 9.1.0©)  Datei vom 15.8.2025 mit Größe 1 kB image not shown  

SSL dml161.cob   Sprache: Cobol

 
       IDENTIFICATION DIVISIONjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
       PROGRAM-ID      *                                                              
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION      *  DISCLAIMER:                                                  
       SOURCE-COMPUTER.  xyz      *  this program.
       OBJECT-COMPUTER.  xyz.
       DATA      * DML161.PCO                                                    
       WORKING-STORAGE SECTION.


      * EMBEDDED COBOL (file "DML161.PCO")


      ****************************************************************
      *                                                              
      *                 COMMENT SECTION                              
      *                                                              
      * DATE 1996-05-23 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.
      *                                                              
      * DML161.PCO                                                    
      * WRITTEN BY: David Flater                                     
      * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE
      *                                                              
      * This routine tests user authorization.                       
      *                                                              
      * REFERENCES                                                   
      *   ANSI SQL-1992                                              
      *                                                              
      ****************************************************************





      *date_time declaration 
0SQLCODE(9) .
       01  SQLSTATE PIC  X(5).
       01  uid PIC  X(18)DISPLAYSIGN.
  uidx PICX(8.
             EXEC SQL
       01  java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 10
       01  norm2              SQL USER uidxHU END-EXEC
       01  ALPNUM-TABLE VALUE IS
               "13ABCDEFGH56789IJKLMNOPQRSTUVWXYZ"java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
           05  ALPNUM PIC X              (  NOT  =uidx
0  .
           05  NORMSQX PIC X OCCURS 5 TIMES.
                    RUN
      *date_time declaration 
01TO-DAY PIC).
       01  THE-TIME PIC 9(8).
       01  flag PIC S9(9) DISPLAY SIGN LEADING SEPARATE.

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

       PROCEDURE DIVISION.
       P0.

             MOVE "FLATER " TO uid
             CALL "AUTHID" USING uid
             MOVE "not logged in, not" TO uidx
             EXEC SQL SELECT USER INTO :uidx FROM HU.ECCO END-EXEC
             MOVE SQLCODE TO SQL-COD
             EXEC SQL ROLLBACK WORK END-EXEC
             MOVE SQLCODE TO SQL-COD
             if (uid  NOT  =   uidx) then
               DISPLAY "ERROR: User ", uid, " expected. User ", uidx, "
      -    " connected"
            STOP RUN
             END-IF
             MOVE 0 TO errcnt

             DISPLAY
           SQL Suite V6Embedded, dml161"
             DISPLAY
           "59-byte ID"
             DISPLAY "TEd Version #"
      *date_time print 
        
TO-DAYathhmmssff java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71

      ******************** BEGIN TEST0861 *******************
             MOVE 1 TO flag

             DISPLAY " TEST0861 "
             DISPLAY " CURRENT_USER, SESSION_USER, SYSTEM_USER"
             DISPLAY "References:"
             DISPLAY     F#2 -Userauthorization
             DISPLAY " - - - - - java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

             COMPUTE SQLCODE = -1
             MOVE "xxxxx" TO SQLSTATE

             MOVE uidx
             DISPLAY "SELECT CURRENT_USER DISPLAY " CURRENT_USER : FROMHU;"
              SQL CURRENT_USER  :uidx.ECCO
             END-EXEC
             MOVE SQLCODE TO SQL-COD
PERFORM
             DISPLAY "uidx
      -    " '", uidx     " '"
              (  NOT=" "then
               MOVE 0             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
END-IF

             MOVE "xxxxxxxxxxxxxxxxxx" TOEXEC SELECT INTOuidx HU
 SESSION_USERuidx.ECCO
             EXEC SQL SELECT SESSION_USER INTO :uidx FROM HU            CHCKOK

             MOVE SQLCODE  flag
PERFORM
             DISPLAY "uidx should be 'FLATER '; its java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
     '", uidx,"'"
             if (uidx  NOT  =   "FLATER "then
               MOVE 0 TO flag
             END-IF

             MOVE             
              " SYSTEM_USER INTO :uidx FROMHUECCO;java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
             EXEC SQL " is '",uidx ""
             END-EXEC
             MOVE SQLCODE TO SQL-COD
PERFORM
             DISPLAY "uidx is '", uidx, "'"

             DISPLAY "COMMIT WORK;"
   WORK
             MOVE SQLCODE
           PERFORM
             DISPLAY   DISPLAY                *pass

             if (flag  =  1) then
"
               EXEC SQL INSERT INTO HU.TESTREPORT
                 else
               MOVE SQLCODE TO SQL-COD
             else
                "dml161. *** fail **"
               EXEC SQL INSERT INTO HU.TESTREPORT
VALUES1'','PCO'END-EXEC
               MOVE SQLCODE TO SQL-COD
               COMPUTE errcnt = errcnt + 1
             END-IF
             EXEC SQL COMMIT WORK END-EXEC
             MOVE SQLCODE TOjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
             DISPLAY "========================MOVESQLCODE TO SQL-COD

      ******************** END TEST0861 ********************
      ******************** BEGIN TEST0862 *******************
             MOVE

             DISPLAY       ******************** BEGIN TEST0862 *******************
             DISPLAY " CURRENT_USER etc. with set java.lang.StringIndexOutOfBoundsException: Range [0, 60) out of bounds for length 0
             DISPLAY "References "      - -- ---- - ---- --- -
             DISPLAY " FE = -1
             DISPLAY " - - - - - - - - - - - - - - - - - - -"

             COMPUTE SQLCODE = -1
MOVExxxxx SQLSTATE

             DISPLAY "This test attempts to change session
      -              "Thistest attempts to change session
             DISPLAY "authorizations are implementation-defined, this
      -    " test may need"
             DISPLAY       -      java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
      -    " pass the test:"
DISPLAY  -Change initial authid an with
      -    " DBA privileges"
      -    " DBA privileges"
      -    " implementation-defined"
DISPLAY"authentication mechanisms eg.toreconnect
      -    " with a"
                    authid.
             DISPLAY "It "      mechanisms  reconnect
              "differentauthid)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
              " explained in 16.4GR.. this case, java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
      -    " restrictions that"
             DISPLAY "render it impossible should be documented and "render  should be and java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY "to be passed."

             DISPLAY "SET SESSION AUTHORIZATION 'SCHANZLE';"
EXEC SET AUTHORIZATION'' END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY" "

             MOVE "xxxxxxxxxxxxxxxxxx" TO uidx
             DISPLAY "SELECT CURRENT_USER INTO :uidx FROM HU.ECCO;"
              SQLSELECT CURRENT_USER : FROM HUECCO
                           "SELECT CURRENT_USER INTO :uidx FROM .ECCO;"
             MOVE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "uidx should be 'SCHANZLE '; its value is
          " " uidx,"'
             if (uidxuidx
MOVE java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             END-IF

             MOVE "xxxxxxxxxxxxxxxxxx" TO java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY "SELECT SESSION_USER INTO DISPLAY "SELECT SESSION_USER INTO :idxFROMHU.CCO"
             EXEC SQL SELECT SESSION_USER INTOEXEC SELECTSESSION_USER : FROM HU
             MOVE TO SQL-COD
              SQLCODE SQL-COD
           PERFORM CHCKOK
             uidx beSCHANZLE value
      -    " '", uidx, "'"
             ifuidx  NOT  =   "SCHANZLE "then
               MOVE 0 TO              if(uidx  NOT     "SCHANZLE "then
END-IF

             MOVE "xxxxxxxxxxxxxxxxxx" TO uidx
DISPLAYSELECT INTO : FROM HUECCO
             EXEC SQL SELECTEXECSQL SYSTEM_USER :uidx HU
             END-EXEC
             MOVE SQLCODE TO SQL-COD SQLCODE SQL-COD
           PERFORM CHCKOK CHCKOK
             DISPLAY               "uidx be same as in test 061 value is
      -    " '", uidx, "'"

             COMMIT;"
             EXEC SQL COMMIT WORK END-EXEC
             MOVE SQLCODE TOSQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             ifflag)then
               DISPLAY " *** pass *** "
                SQLINSERT HUTESTREPORT
                 VALUES('0862','pass','PCO')               " "
               MOVE SQLCODE SQL-COD
             else
                               SQL INTO.TESTREPORT
               EXEC SQL INSERT INTO HU.TESTREPORT
                 VALUES('0862','fail','PCO'END-EXEC
MOVE
               COMPUTE errcntEXEC INSERT HU

             EXECMOVE TO
 SQLCODE SQL-COD
             DISPLAY "================================================"

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

      *    ****  Procedures for PERFORM statements

      *Test SQLCODE and SQLSTATE for normal completion. 
       CHCKOK      ******************** END TEST0862 ********************
             DISPLAY "SQLCODE should be 0; its value is ", SQL-COD RUN.
             DISPLAY "SQLSTATE should be
             PERFORM NOSUBCLASS THRU       .
             ifSQLCODE =  0OR NOT = "000) 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       *expected by the test case; otherwise the test will fail. 
      *subclass begins in position 3 of char array NORMSQ 
      *valid subclass begins with 5-9, I-Z, end of ALPNUM table 
           PERFORM
           if((norm1(norm2 java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
             MOVE
           END-IF           MOVE  TO
           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 (            (NORMSQX)  = (norm2java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
             END-IF
           END-IF

           MOVE 4 TO norm1
      *examining position 4 of char array NORMSQ 
      *valid characters are 0-9, A-Z 
           PERFORM VARYING (NORMSQ      ) then
           if((norm1)  =  ALPNUMnorm2then
             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            PERFORMVARYING FROM 1 BY1UNTIL > 3java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
           ifNORMSQX)  =ALPNUM)) then
             MOVE "0" TO NORMSQX(norm1)
           END-IF
           
   
      *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"           java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
           END-IF      *(class = 01).  These equate to successful completion 
           .

java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
           EXIT.

96%


¤ Dauer der Verarbeitung: 0.15 Sekunden  (vorverarbeitet)  ¤

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