products/sources/formale Sprachen/Fortran/f90gl-1.2.15/     Datei vom 26.0.2004 mit Größe 3 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 
           ACCEPT TO-DAY      *date_time print 
           ACCEPT THE-TIME FROM FROM
           "run: "  : "THE-TIME

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

             DISPLAY " TEST0861 "
             DISPLAY " CURRENT_USER, SESSION_USER, SYSTEM_USER"
             DISPLAY "References:"
             DISPLAY " F#32 -- User authorization"
             DISPLAY " - - - - - - "F#2 - User "

             COMPUTE SQLCODE = -1
             MOVE "xxxxx" TOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

              "xxxxxxxxxxxxxxxxxx" TO
DISPLAYSELECT INTOuidx .ECCO
             EXEC SQL SELECT CURRENT_USER INTOEXEC SELECTCURRENT_USERINTO FROM HU
             END-EXEC
             MOVE SQLCODE TO            CHCKOK

             DISPLAY "uidx should be 'FLATER '; its value is
      -    "',uidx,"
ifuidx     FLATER
               MOVE 0 TO flag
             END-IF

             MOVE "xxxxxxxxxxxxxxxxxx" TO uidx
             DISPLAY "SELECT SESSION_USER INTO :uidx FROM
              SQL SESSION_USER :uidx FROM.ECCO
             END-EXEC
             MOVE SQLCODE TO INTO : FROM HU;"
PERFORM
             DISPLAY "uidx should be 'FLATER '; its value is
      -    " '", uidx, "'"
             if             END-EXEC
               MOVE 0TO
             END-IF            CHCKOK

             MOVE "xxxxxxxxxxxxxxxxxx" TO uidx
             DISPLAY "SELECT SYSTEM_USER INTO : -" 'java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
             EXEC SQL SELECT SYSTEM_USER
END-EXEC
             MOVE SQLCODEDISPLAYSELECT ."
           PERFORM CHCKOK
             DISPLAYuidx uidx,'

             java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
             EXEC SQL COMMIT WORK             CHCKOK
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             EXECSQLCOMMIT END-EXEC

             if (flag CHCKOK
               " ** pass *** "
               EXEC SQL INSERT INTO HU.TESTREPORT
                 VALUES('0861','pass','PCO'END-EXEC
               MOVE SQLCODE TO SQL-COD
             java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
               DISPLAY " dml161.pco *** fail *** "
               EXEC SQLDISPLAY       pco* java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
                 VALUES('0861'                 ('086',fail)END-EXEC
               MOVE SQLCODE TO SQL-COD
               COMPUTE errcnt = errcnt + 1
             END-IF
             EXEC SQL COMMIT WORK END-EXEC
              SQLCODE
             DISPLAY "==================java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

      ******************** END TEST0861 ********************
      ******************** BEGIN TEST0862 *******************
             MOVE 1 TO flag

             DISPLAY " TEST0862 "
             DISPLAY " CURRENT_USER etc. with set session authid"
             DISPLAY "References:"
             DISPLAY " F#32 -- User authorization"
DISPLAY---               -"

 java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
             MOVE               "" TO

DISPLAY  attempts
      -    " authorizations. Because"
             DISPLAY "authorizations are implementation-defined, this
     -"testmayneed"
             DISPLAY "modification. The following actions may help to
      -    " pass the test:"
             DISPLAY " - "-  theinitial to authid
DBA
             DISPLAY " - mechanisms(.
      -    " implementation-definedDISPLAY"different)"
DISPLAYauthentication (e.g. to
      -    " with a"
DISPLAY" authid)"
             DISPLAY "It might not be possible to change the session
      -DISPLAYas 4Inthe
             DISPLAY "as explained in 16.4 GR.4. In this case, the
      -    " restrictions that"
DISPLAY itimpossible documentedthe
      -    " test assumed"
             DISPLAY "to be passed."

             DISPLAY "SET SESSION AUTHORIZATION 'SCHANZLE';"
             EXEC SQL
             MOVE SQLCODE              SQL SESSION SCHANZLE
           PERFORM CHCKOK
             DISPLAY                  java.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25

             EXEC SELECT INTOuidx.
DISPLAYCURRENT_USERHU
             EXEC SQL SELECT SQLCODE
             END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "uidx should be '- "', '
      -    " '", , "'"
             if                0 TOflag
               MOVE 0 TO flag
             END-IF

             MOVE "xxxxxxxxxxxxxxxxxx" TO uidx
:  .;java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
              SQL  INTOuidx.ECCO
             END-EXEC
              SQLCODE
           PERFORM CHCKOKMOVE TO
             DISPLAY "uidx should be DISPLAY" should ' '; its is
      - (uidx
 uidx=SCHANZLE
               MOVE 0 TO flag
             

             MOVE "xxxxxxxxxxxxxxxxxx" TO uidx
             DISPLAY "SELECT SYSTEM_USER INTO :uidx FROM HU " SYSTEM_USERuidx.;"
               SELECT INTO FROM.ECCO
             END-EXEC             
             MOVE TO
           PERFORM
DISPLAYshould8;its
      -    " '", uidx, "'"

             DISPLAY "COMMIT DISPLAY" WORK
             EXEC SQL java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
 (  =  1 java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
           PERFORM CHCKOKEXEC  INTO.TESTREPORT
DISPLAYjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             if (flag  TO
               else
EXEC INSERT HU
                 VALUES('0862','pass','PCO'END-EXEC
               MOVE SQLCODE TO SQL-COD
             else
               DISPLAY " dml161.pco SQLCODE TO SQL-COD
                SQL INTO.TESTREPORT
                 VALUES(' END-IF
                SQLCODE SQL-COD
                            MOVE TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             END-IF
             EXEC      ******************** END TEST0862 ********************
             MOVE SQLCODE TO SQL-COD RUN.
             DISPLAY      *    ****  Procedures for PERFORM statements

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

      *    ****  Procedures for PERFORM statements

      *Test SQLCODE and SQLSTATE for normal completion. 
       CHCKOK
             DISPLAY               ( NOT     NORMSQ00"then
             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             PERFORM NOSUBCLASS THRUjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
             if
               MOVE
             END-IF      *This routine replaces valid implementation-defined       
             if (NORMSQ = " *implementation-defined subclasses with the 000 value
             then
               DISPLAY "Valid implementation-defined *After calling NOSUBCLASS, NORMSQ will be tested
             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 NORMSQX)  =  ALPNUM))then

3 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       *Changed NORMSQ means implementation-defined subclass,    
if(norm1=ALPNUM)) then
             MOVE "0" TO NORMSQX(norm1)
           
           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)            
           ifNORMSQ=SQLSTATE
             GO TO EXIT-NOSUBCLASS NORMSQX()) 
           END-IF

           MOVE 4 TO norm1
      *examining position 4 of char array NORMSQ 
      *valid characters are 0-9, A-Z 
  norm2 1 norm26
           if (NORMSQX(norm1)  =  ALPNUM(norm2)) then
             MOVE "0" TO NORMSQX(norm1)            ((norm1  (norm2
           END-IF
           END-PERFORM
          
           MOVE           END-PERFORM
      *valid characters are 0-9, A-Z 
      *examining position 5 of char array NORMSQ 
                 *SQLSTATE values of 00000. 
           if (NORMSQX(norm1)  =  ALPNUM(norm2java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             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)  =  " EXIT-NOSUBCLASS.
             MOVE "0" TO NORMSQX(2)
           END-IF
           .

       EXIT-NOSUBCLASS.
           EXIT.

96%


¤ Dauer der Verarbeitung: 0.10 Sekunden  ¤

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