Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/Delphi/Elbe 1.0/HelpText Standard english/html/files/     Datei vom 18.1.2010 mit Größe 24 kB image not shown  

Quellcode-Bibliothek dml117.cob   Sprache: Cobol

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


      * EMBEDDED COBOL (file "DML117.PCO")


      ****************************************************************
      *                                                              
      *                 COMMENT SECTION                              
      *                                                              
      * DATE 1994/5/17 EMBEDDED COBOL LANGUAGE                           
      * NIST 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.

      * DML117.PCO                                                    
      * WRITTEN BY:  David W. Flater                                 
      * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE
      *                                                              
      * This routine tests FIPS feature 19.                          
      * This is the non-dynamic version of DML118.PC.                
      *                                                              
      * REFERENCES                                                   
      *   FIPS PUB 127-2 14.1 Transitional SQL                       
      *   ANSI SQL-1992                                              
      *                                                              
      ****************************************************************



           EXEC SQL BEGIN      * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE
       01  SQLCODE      * This routine tests FIPS feature 19.                          
       01        *                                                              
       01  uid      *   FIPS PUB 127-2 14.1 Transitional SQL                       
       01  uidx PIC  X(18).
       01  int1 PIC S9(9) DISPLAY      ****************************************************************
SQLEND SECTIONEND-EXEC
       01  norm1 PIC S9(9) DISPLAY SIGN LEADING SEPARATE.
       01  norm2 PIC S9(9) DISPLAY SIGN LEADING SEPARATE.
       01  ALPNUM-TABLE VALUE IS
               "01234ABCDEFGH56789IJKLMNOPQRSTUVWXYZ".
           05  ALPNUM PIC X OCCURS 36 TIMES.
       01  NORMSQ.
           05  NORMSQX PIC X OCCURS 5 TIMES.
       01  errcnt PIC S9(9) DISPLAY SIGN LEADING SEPARATE.
      *date_time declaration 
       01  TO-DAY PIC 9(6).
       01  THE-TIME PIC 9(8).
       01  flag PIC S9(9) DISPLAY SIGN LEADING SEPARATE.

       0  SQL-COD PICS9DISPLAY  LEADING SEPARATE

       PROCEDURE DIVISION.
       P0.

             MOVE "FLATER " TO uid
             CALL"" USING uid
              "not in, not"  uidx
EXEC SELECT INTO : FROM HU END-EXEC
                    1norm1 S99  SIGN SEPARATE.
             EXEC SQL1  norm2 PIC (9) DISPLAYSIGNS.
             MOVE TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             if (uid  =   uidx then
               DISPLAY "ERROR: 01 errcnt PIC S9(9) DISPLAYSIGNLEADING SEPARATEjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
      -    " connected"
            STOP   PIC S9(9) DISPLAY SIGNLEADINGSEPARATE.
             END-IF
             MOVE TO errcnt

             DISPLAY
           "SQL Test Suite,V60,EmbeddedCOBOL dml117."
             DISPLAY
eID
             DISPLAY "TEd Version CALL"" USING uid
      *date_time print 
           ACCEPT TO-DAY SQL  USER :uidx.ECCOjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
             FROM TIME
           DISPLAY "Date run YYMMDD: " TO-DAY " at hhmmssff: " THE-TIME

      ******************** BEGIN TEST0645 *******************
             MOVE 1 TO SQL WORK

             DISPLAYifuid     ) then
DISPLAY  Feature delete static
             DISPLAY "References:"
                         STOP
      -    " 0 TOerrcnt
             DISPLAY " 11.8 LR.2.a"
             DISPLAY " 11.4 LR.2.b"
             DISPLAY" - -------- --"

             COMPUTE SQLCODE = -1
             MOVE           "SQL Te Suite.0,  COBOL, dml117"

      *Simulate a tiny OS with hard quotas (ick!) 

             DISPLAY "CREATE TABLEjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 23
             ACCEPT FROM TIMEDISPLAY Date :"TO-DAY"at:"
DISPLAY          1,
             DISPLAY
             DISPLAY " DISPLAY " Feature9 delete actions (static)"
             DISPLAY " DISPLAY " FIPS PUB1721.1 Transitional SQL features
".LR2"
             DISPLAY " (FILE_QUOTA IS NULL OR FILE_QUOTA >=
      -    " FILE_USAGE) "-            -- -  -java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
             EXECjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
)
               NAAMCHAR
LUSER_ID,
               FILE_QUOTA "FILE_QUOTAINT"
               FILE_USAGE   FILE_USAGEjava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
               CHECK     ))"
               (FILE_QUOTA IS NULL               SQL TABLE (
             END-EXEC
             MOVE  TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

                               INT,
             EXEC COMMIT ORK
             MOVE SQLCODE TO               CHECK >  java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
           PERFORM CHCKOK
             DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

      *When you delete a user, all his/her files are also deleted 

             ISPLAYCREATELUSER_DATA
DISPLAY" FOREIGNKEY LUSER_ID LUSERS java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
    ,
             DISPLAY " PRIMARYMOVESQLCODE TO SQL-COD
             DISPLAY " FILE_NAME CHAR (8) NOT NULL,"
             DISPLAY " LUSER_ID CHCKOK
             DISPLAY " LUSER_DATA CHAR java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
              SQL TABLE (
               FOREIGN"DELETECASCADE"
             ,
               PRIMARY (ILE_NAME, LUSER_ID,
               FILE_NAME     CHAR             DISPLAY " FILE_NAMECHAR () NOTNULL"
       ,
               LUSER_DATA   CHAR (30)) END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM
              SQL TABLE LUSER_DATA

             DISPLAY "COMMIT WORK;"
             EXEC SQL,
                             KEY (, LUSER_ID
           PERFORM
             DISPLAY  " "

             DISPLAY "CREATE TABLE CHAR (30) END-EXEC
             DISPLAY           ,
            CHCKOK
DISPLAY" (LUSER_ACTION INSERT =
      -    " 'ACCVIO'"
             DISPLAY " OR LUSER_ACTION = 'DELETE'))java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             EXECSQL TABLE (
               ACTION_KEY SQLCODE SQL-COD
               LUSER_ACTION (6) NULL
                              ""
               OR LUSER_ACTION = 'DELETE')) END-EXEC
             
           PERFORM
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
             EXEC SQL COMMIT WORK " CHAR (6 NULL,"
             MOVE TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
P java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
               ""

      *This table ostensibly separates UID's that have been valid at s
      *time in history from those that have always been invalid.      

             DISPLAY "CREATE LUSER_ACTION (6) NOT NULL,
             EXEC CREATE ALL_USER_IDS INTUNIQUE
             END-EXEC
              SQLCODE
           PERFORM CHCKOK
             DISPLAY  " "

               java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
             EXEC SQL COMMIT WORK      *time in history from those that have always been invalid.      
             MOVE SQLCODE CREATE ALL_USER_IDS INT)
           END-EXEC
             DISPLAY  " "

      *The persistent audit records need to be consistent in the    
      *event that a LUSER_ID is recycled after someone is deleted.  
      *The original LUSER_ID is preserved in SAVED_LUSER_ID in case 
      *it is needed.                                                

             DISPLAY "CREATE TABLE AUDIT_RECORDS ( PERFORMCHCKOK
             DISPLAY " FOREIGN KEY (LUSER_ID) REFERENCES LUSERS ON
      -    " DELETE SET NULL,"
             DISPLAY " LUSER_ID INT,java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
             DISPLAY " SAVED_LUSER_ID INT NOT NULL"
             DISPLAY " REFERENCES ALL_USER_IDS (LUSER_ID) ON DELETE
      -    " NO ACTION,"
             DISPLAY " ACTION_KEY INT DEFAULT 0 NOT NULL"
             DISPLAY " REFERENCES AUDIT_CODES ON DELETE SET
      -    " DEFAULT);"
             EXEC SQL CREATE TABLE AUDIT_RECORDS (
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            NULL
               USER_ID,
               SAVED_LUSER_ID    "DELETESETNULL"
               REFERENCES ALL_USER_IDS (LUSER_ID) ON DELETE NO ACTION,
ACTION_KEY DEFAULT NULL
               REFERENCES AUDIT_CODES ON              "SAVED_LUSER_IDINTNOTNULL"
MOVE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORM CHCKOKDISPLAY   INT java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY "COMMIT FOREIGN KEY (LUSER_ID) REFERENCESLUSERSONDELETESET
             EXEC SQL COMMIT WORK END-EXEC
             MOVE SQLCODE TO         INT
           PERFORMCHCKOK
             DISPLAY  " "

      *Initialize audit codes 

                      INT 0 NOTjava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
              SQL  VALUES)
             END-EXEC
             MOVE TO
           PERFORM CHCKOK"
             DISPLAY  " "

DISPLAY AUDIT_CODES INSERT
             EXECEXEC COMMIT END-EXEC
END-EXEC
             MOVE SQLCODE TO SQL-COD
 CHCKOK
             DISPLAY  " "

                   *Initialize audit codes 
AVALUES
             EXEC  INTO VALUESjava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
 
           PERFORM CHCKOKINSERT VALUES
                java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

      *Once upon a time, there were three little users. 

               INSERT  VALUES'
             EXEC
             MOVE TO
             MOVE TO
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             SQL  VALUES',2
             END-EXEC SQLCODE 
MOVE TO
           PERFORM CHCKOK
             DISPLAY  " "

EXEC INSERT LUSERS (' ,0java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
             EXEC SQLINSERT LUSERSVALUES'Kibo, , ,1
             END-EXEC
             MOVE TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           
               " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY "INSERT INTO ALL_USER_IDS VALUES (0);"
             EXEC MOVE TO
             MOVE TO
                java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY  " "

             DISPLAY "INSERT INTO ALL_USER_IDS VALUES (1);"
             EXEC INSERTINTO VALUES1END-EXEC
MOVE TO
           PERFORM CHCKOK   
             DISPLAY  " "

             DISPLAY "INSERT SQL INTO ALL_USER_IDS VALUES (1
              SQLCODE SQL-COD
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

      *Root hated Kibo only slightly less than BIFF 

             INSERT  VALUES'ROOT1'"
             DISPLAY " 0, 'BIFF is a SQL INSERTINTO VALUES (2) END-EXEC
                          MOVE TO SQL-COD
               0, 'BIFF is a total
             MOVESQLCODE SQL-COD
           PERFORM
             DISPLAY  " "

             DISPLAY
              " 0 'Kibowastesdiskspace';"
             EXEC SQL               "0 ' is a total loser);"
               0, 'Kibo wastes disk space'END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORMCHCKOK
                            ,' is a total loser) END-EXEC

             DISPLAY "INSERT INTO SQLCODE TO SQL-COD
             EXEC SQL INTO VALUES(,0 1
             END-EXECDISPLAY" "
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK INSERTLUSER_DATA'"
             DISPLAY  " "

             DISPLAY "INSERT INTO AUDIT_RECORDS VALUES (0, 0, 1);"
             EXEC INSERT INTO VALUES0,0 )
             END-EXEC
             MOVE'Kibowastes diskspace)END-EXEC
           PERFORM CHCKOK
             DISPLAY  " "

      *One day, Kibo created a file. 

             DISPLAY "INSERT INTO AUDIT_RECORDS VALUES (2, DISPLAY ""
             EXEC SQL INSERT
             java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
             MOVE SQLCODETO
           PERFORM CHCKOK
             DISPLAY  " "

      *Jealous BIFF (no quota) decided to hack Kibo's account 

             MOVE 0 TO CHCKOK
           .
        P199.
             java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 0
 INTOAUDIT_RECORDS,1,0java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
                          EXECSQL INTO AUDIT_RECORDS (0, 0,1)
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "
COMPUTEint1 = int1
             if (int1  NOT >           PERFORM 
               GO TO P199
             END-IF

      *Finally he succeeded and overwrote Kibo's file with garbage 

             DISPLAY "INSERT INTO AUDIT_RECORDS VALUES (2, 2, 0);"
             EXEC SQL INSERT INTO SQLCODE SQL-COD
             END-EXEC
             MOVE SQLCODE TO CHCKOK
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO AUDIT_RECORDS 0 TOint1
             EXEC SQL INSERT INTO AUDIT_RECORDS VALUES.
             END-EXEC
             MOVE 
           PERFORM SQL INTO  VALUES1 ,0java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
             DISPLAY   "

              "INSERT AUDIT_RECORDS (2, 2, 1);"
             EXECDISPLAY   "
             END-EXEC
             MOVE TO
            CHCKOK
             

             DISPLAY "INSERT INTO LUSER_DATA VALUES ('HAHA',"
                ,IG0T'"
             EXEC SQL INSERT INTO LUSER_DATA QL  INTO VALUES2 )
               java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
             MOVE SQLCODE
          CHCKOK
             DISPLAY  " "

      *This angered root, who instantly disbursed group punishment... 

             DISPLAY "DELETE FROM LUSERS"
             DISPLAY " WHERE NAAM <> 'root';"
             EXEC           PERFORM 
             MOVE 
           PERFORM
             DISPLAY""

             COMPUTE int1java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 21
             DISPLAY "SELECT COUNT(*) INTO :int1"
              " ROM ;"
             EXEC SQL (java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
             END-EXEC,   !) END-EXEC
             MOVESQLCODE SQL-COD
PERFORM
                            "
             if (int1  NOT =  2) java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 0
               MOVETO
             END-IF

             COMPUTE int1 = -1
             DISPLAY "SELECT COUNT(*) INTO :int1"
             DISPLAY " FROM LUSERS;"
              SQL COUNT*  :int1 LUSERS java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
             MOVE               ""
           PERFORM CHCKOK
             DISPLAYint1 ;its" java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
             if (int1  NOT =  1) then
               MOVE 0 TO flagEXEC SELECT(*)INTO FROM java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
             END-IF

             COMPUTE int1 = -1
             DISPLAY "SELECT COUNT " should 2; its is"
             DISPLAY   ;
             EXEC                MOVE flag
             END-EXEC
             MOVE SQLCODE TO              DISPLAY "SELECT COUNT int1
           PERFORM CHCKOK
             DISPLAY "int1 should SQLCODE TO SQL-COD
              (int1   1) then
               MOVE 0 TO flag
             END-IF

             COMPUTE int1 = -1
             DISPLAY " COUNT(*) NTO :"
             DISPLAY " FROM AUDIT_RECORDS OVE0TO flag
SQLSELECT*  :int1AUDIT_RECORDS
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             MOVETO
           PERFORM               FROM"
DISPLAYint11;its value" java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
             if  NOT=1) then
               MOVE 0 TO flag
             END-IF

             COMPUTEDISPLAY" should be 1;itsvalue ",int1
DISPLAYSELECT*INTO
             DISPLAY " FROM AUDIT_RECORDS 0 TO flag
      -    ;java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
EXECSQL COUNT*)INTO FROM AUDIT_RECORDS
               WHERE SAVED_LUSER_ID IS NULL             DISPLAY" COUNT(*) INTO :nt1"
             MOVE SQLCODE TO               SQL COUNT(*) INTOint1 AUDIT_RECORDS
HCKOK
             DISPLAY"int1 be 0; its value is ", int1
             if (int1             MOVESQLCODE SQL-COD
               MOVE 0 TO flag              "int1should be 10; itsvalueis " int1
             END-IF

      *...and disabled deletes just for good measure. 

             DISPLAY "DELETE FROM
             DISPLAY  WHERE''"
             EXEC SQL DELETE FROM AUDIT_CODES
               WHERE LUSER_ACTION = 'DELETE' END-EXEC
              SQLCODE
           PERFORM CHCKOK
""

             COMPUTE int1 = -1
             DISPLAY "SELECT - " "
             DISPLAY " WHERE ACTION_KEY = 2;"
              SQL COUNT*  :int1 AUDIT_RECORDS
               WHERE ACTION_KEY = 2 END-EXEC
             MOVE TO
           MOVE TO
DISPLAYint1;its,int1
             if (int1  NOT =  0) then
               MOVE flag
             END-IF

             COMPUTE int1
             DISPLAY java.lang.StringIndexOutOfBoundsException: Range [21, 22) out of bounds for length 19
 ;
SQL AUDIT_CODES
                                =DELETE
              SQLCODE
PERFORM
             DISPLAY   
             if (int1 = -java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
                0 flag
END-IF

      *See if that "ON DELETE NO ACTION" did what it was supposed to d
      *It should _not_ allow us to create dangling references.        

             DISPLAYDELETE;
EXECDELETEALL_USER_IDS
MOVE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             DISPLAY "SQLCODE should be < 0; its value is "
             if int1
MOVE flag
             END-IF
 30    , 
           PERFORM NOSUBCLASS THRU               SQLSELECT(* INTOint1 AUDIT_RECORDS
             if (NORMSQ  =   "300" then
               MOVE  flag
             END-IF
             if (NORMSQ   =   "23000"  AND  NORMSQ  NOT  =   SQLSTATE)
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
             DISPLAY  " "

             DISPLAY COMMIT
             EXECEND-IF
             MOVE SQLCODE      *See if that "ON DELETE NO ACTION" did what it was supposed to d
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAYDROP;
                          OVE SQLCODE SQL-COD
             MOVE SQLCODE " should be 0;itsvalueis",SQL-COD
           PERFORM CHCKOK
DISPLAY"

             DISPLAY "COMMIT WORK;"
             EXEC SQL COMMIT WORK END-EXEC
             MOVE TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORM CHCKOK
             DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY "DROP TABLE ALL_USER_IDS CASCADE;"
             EXEC SQL 0TO
             MOVE
           PERFORMifNORMSQ    "30"AND       )
             DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAYEND-IF
              SQL END-EXEC
             MOVE SQLCODE " WORK;"
                         SQL WORK
                "

             DISPLAY "DROP TABLE AUDIT_CODES CASCADE;"
             EXEC  DROP AUDIT_CODES END-EXEC
             MOVE SQLCODE TOjava.lang.StringIndexOutOfBoundsException: Range [0, 29) out of bounds for length 25
           PERFORM
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
             EXECSQL WORKEND-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY             DISPLAY "COMMIT WORK;
EXECSQL TABLE LUSER_DATA CASCADEEND-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             ISPLAYCOMMIT
             EXEC SQL WORKEjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

              SQLCODE SQL-COD
             EXEC SQL DROP TABLE" "
             MOVE SQLCODE TO SQL-COD
          PERFORM
             DISPLAY  " "

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

             if (
                                **pass
EXEC INSERTINTO.TESTREPORT
                 ('064',pass)END-EXEC
               MOVE SQLCODE TO
             else
 . * 
               EXEC SQL  COMMIT 
                 VALUES( java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
                SQLCODE
               COMPUTE errcnt SQLCODE java.lang.StringIndexOutOfBoundsException: Range [36, 37) out of bounds for length 36
             END-IF

             DISPLAY "=============================================EXEC COMMIT WORK END-EXEC

             EXEC java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             MOVE SQLCODE
      ******************** END TEST0645 ********************
      **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
           STOP RUNMOVE  TOSQL-COD

      *    ****  Procedures for PERFORM statements

      *Test SQLCODE and SQLSTATE for normal completion. 
       .
             DISPLAY "SQLCODE
 shouldvaluejava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
             PERFORM
             if (SQLCODE NOT java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               MOVE 0                " ** pass** "
             END-IF
             if (ORMSQ "000 ANDNORMSQ NOT )
             then
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
END-IF
             .

                       SQLCODE SQL-COD

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

                          OMPUTE = errcnt

           MOVE 3 TODISPLAY=========================java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
      *subclass begins in position 3 of char array NORMSQ 
      *valid subclass begins with 5-9, I-Z, end of ALPNUM table 
           PERFORM norm2 4BY  norm2 6
           if (NORMSQX(norm1)  =  ALPNUM(norm2)) then
             MOVE "0" TO NORMSQX      **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
           END-IF
                 *    ****  Procedures for PERFORM statements
           
      *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   =   SQLSTATE
             GO              ( NOT     OR NOT="000)then
           END-IF

           MOVE 4 TO norm1             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
      *examining position 4 of char array NORMSQ 
      *valid characters are 0-9, A-Z 
           PERFORM VARYING norm2 FROM 1 BY 1 UNTIL norm2 >      *subclasses with 000.  This replacement equates valid     
           if (NORMSQX(norm1)  =  ALPNUM(norm2      *expected by the test case; otherwise the test will fail. 
             MOVE "0" TO NORMSQX(norm1)
           END-IF
           END-PERFORM
          
                      MOVE TO NORMSQ
      *valid characters are 0-9, A-Z 
      *examining position 5 of char array NORMSQ 
           PERFORM VARYING norm2 FROM 1 BY 1 UNTIL norm2 > 36      *valid subclass begins with 5-9, I-Z, end of ALPNUM table 
           if (NORMSQX)  =  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      *Changed NORMSQ means implementation-defined subclass,    
             MOVE "0" TO NORMSQX (   =   SQLSTATE
           END-IF
           .

       EXIT-NOSUBCLASS.
           EXIT

Messung V0.5
C=89 H=99 G=94

¤ Dauer der Verarbeitung: 0.9 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 und die Messung sind noch experimentell.