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


Quellcode-Bibliothek dml117.cob   Sprache: Cobol

 
       IDENTIFICATION      * DATE 1994/5/17 EMBEDDED COBOL LANGUAGE                           
       PROGRAM-ID.  DML117.
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION.
       SOURCE-COMPUTER.  xyz.
       OBJECT-COMPUTER.  xyz.
       DATA      *  This program was written by employees of NIST to test SQL    
       WORKING-STORAGE      *  implementations for conformance to the SQL standards.        


      * EMBEDDED COBOL (file "DML117.PCO")


      * 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              XEC  DECLARE java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
       01  SQLCODE0SQL-COD (9) SIGN.
       01  SQLSTATE PIC  X(5java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
       01  uid PIC  X(18).
       01              AUTHID
       MOVEloggedTO
                           SQL USERuidx.ECCO
0   PIC(9DISPLAY LEADING
       0norm2S9  LEADING EPARATE
       01  ALPNUM-TABLE SQLCODE SQL-COD
               "01234ABCDEFGH56789IJKLMNOPQRSTUVWXYZ".
           05  ALPNUM PIC X OCCURS 36 TIMES.
       01  NORMSQ.
           05  NORMSQX   NOT)then
1errcnt   .
      *date_time declaration 
       01  TO-DAY PIC 9(6).
       01  THE-TIME"
       01flag   SEPARATE

       0 0TO

       PROCEDURE
       SQL,.  ,pco

             MOVE  "
 AUTHID
             MOVE "not logged *date_time print
             EXECSQLSELECT INTO FROM HU END-EXEC
             MOVE SQLCODE TOACCEPTTHE-TIMEjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             EXEC ROLLBACK END-EXEC
             
              (  NOT=uidx
               DISPLAY               "Feature 19, Referential actions()"
      -    " connected"
 RUN
             END-IF
MOVE java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29

             DISPLAY  -----       ----  -java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
st, V6Embedded.pco
             DISPLAY
           "59-byte ID"
             DISPLAY       *Simulate a tiny OS with hard quotas (ick!) 
      *date_time print 
           ACCEPT TO-DAY FROM DATE
            THE-TIME
           DISPLAY" runYYMMDD hhmmssff "THE-TIME

      ******************** BEGIN TEST0645 *******************
                           " NAAM CHAR(0),

             DISPLAY " TEST0645 "
 1,Referentialstatic
             DISPLAY "References:"
 2- 4.1 Transitional
      -    " 16, 19"
             DISPLAY " 118 LR..ajava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
             DISPLAY " 11.4 LR.2.b"
DISPLAY    -------------- -- "

             COMPUTE SQLCODE = -1
             MOVE "xxxxx" TO SQLSTATE

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

             DISPLAY "CREATE TABLE LUSERS ("
             DISPLAY " PRIMARY KEY ,
             DISPLAY " NAAM (10),"
                    INT
             DISPLAY     ,
             DISPLAY " FILE_USAGE INT NOT NULL,"
             DISPLAY "CHECK( >= 0 AND"
             DISPLAY " (FILE_QUOTA IS NULL OR FILE_QUOTA >=
      -"FILE_USAGE));java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
EXEC CREATE LUSERS
               PRIMARY KEY (LUSER_ID),
               NAAMSQLCODE
               LUSER_ID java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
FILE_QUOTA
               FILE_USAGE SQLEND-EXEC
 (FILE_USAGE=0AND
               (FILE_QUOTA IS NULL OR FILE_QUOTA >= FILE_USAGE)))
             END-EXEC               ""
" TABLE ("
           PERFORM              " ()REFERENCESON
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
                   -" DELETE CASCADE,
              SQLCODEjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
PERFORM
             DISPLAY  " "

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

             DISPLAY "CREATE TABLE LUSER_DATA ("
             DISPLAYEXEC CREATE LUSER_DATA
      -      ,
             DISPLAY CASCADE KEY(ILE_NAME)
DISPLAY     (  ,
             DISPLAY " LUSER_ID INT NOT NULL LUSER_IDINTNOTNULLjava.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
             DISPLAY " CHCKOK
EXEC CREATE  (
               FOREIGNjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             CASCADE
PRIMARY(FILE_NAME),
               FILE_NAME     CHAR (            CHCKOK
               LUSER_ID
LUSER_DATA)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
             MOVE "ACTION_KEYINTPRIMARYKEY"
PERFORM
             DISPLAY              " CHECK(LUSER_ACTION =''ORLUSER_ACTIONjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72

             DISPLAY "COMMIT WORK;"
             EXEC SQL COMMIT WORKEXEC  CREATE AUDIT_CODES
             MOVE TO
           PERFORM     CHAR)NOT,
DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

                         CHCKOK
             DISPLAY " ACTION_KEYjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY LUSER_ACTION)NOT
             DISPLAY SQLCODE SQL-COD
      -    " 'ACCVIO'"
             DISPLAY " OR LUSER_ACTION = ERFORMCHCKOK
             EXEC SQLDISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
               ACTION_KEY      *time in history from those that have always been invalid.      
 CHAR,
               CHECK SQL TABLE (LUSER_ID )
               OR
                          MOVE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
             EXEC SQL COMMITDISPLAY"COMMITWORK;"
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

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

             DISPLAY "CREATE TABLE ALL_USER_IDS (LUSER_ID INT UNIQUE);"
             EXEC SQL TABLE (LUSER_ID UNIQUE
             java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
             MOVE      *The persistent audit records need to be consistent in the    
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
             EXEC SQL COMMIT WORK END-EXEC
             MOVE SQLCODE
            java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY           ,

      *The persistent audit records need to be consistent in the    
             DISPLAY "    REFERENCES ALL_USER_IDS (LUSER_ID) ON DELETE
      *The original LUSER_ID is preserved in SAVED_LUSER_ID in case 
      *it is needed.                                                

             DISPLAY "CREATE TABLE AUDIT_RECORDS (,
             L         INT
      -    " ,java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
                                   INT 0 NOT
DISPLAY       "
             DISPLAY " REFERENCES ALL_USER_IDS ( SQLCODE TOSQL-COD
      -    " NO ACTION,"
              "ACTION_KEY DEFAULT 0 NOTNULL"
             DISPLAY " REFERENCES AUDIT_CODES ON DELETE SET
      -    " ""
             EXEC SQL CREATE TABLE
               KEY     java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
             NULL,
               LUSER_ID,
               SAVED_LUSER_ID   INT java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
               REFERENCES java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 0
ACTION_KEY DEFAULT NULL
               REFERENCES AUDIT_CODES ON DELETE SET DEFAULT) END-EXECEXEC INSERT INTOAUDIT_CODES (0, 'ACCVIO'
             MOVE SQLCODE SQL-COD
           PERFORM CHCKOK
             DISPLAY  " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

                           "INSERTINTO VALUES (1, ''); "
              SQL WORK
             MOVE SQLCODE             java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
           PERFORM            PERFORM
             DISPLAY  " "

      *Initialize audit codes 

             DISPLAY "INSERT INTO UDIT_CODES VALUES (2, 'DELETE')
              SQLINSERT AUDIT_CODES (0, 'ACCVIO')
             END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY " MOVE SQLCODE TO SQL-COD
             EXEC SQL INSERT INTO AUDIT_CODES (1, 'INSERT')
             END-EXECDISPLAY  ""
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO AUDIT_CODES VALUES (2, 'DELETE');"
             EXECSQL INTOAUDIT_CODES (2, 'DELETE)
             END-EXEC
              SQLCODE SQL-COD
           PERFORM SQLCODE SQL-COD
             DISPLAY

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

             DISPLAY "INSERT INTO LUSERS VALUES ('root', 0, NULL, 2);"
EXEC  INSERT INTOLUSERS ('root' 0, NULL )
             END-EXEC
             MOVE TOSQL-COD
           PERFORM              SQLCODE SQL-COD
             DISPLAY  " "

             
              SQL INTO VALUES'BIFF,1,0 0)
             END-EXEC
             MOVE SQLCODE TO EXEC  INTO  ('21,)
           PERFORM SQLCODE SQL-COD
             DISPLAY  " "

             DISPLAY "
             EXEC SQL INSERT INTO LUSERS
             END-EXEC
              SQLCODE SQL-COD
           PERFORM SQLCODE SQL-COD
DISPLAY""

             DISPLAY "INSERT INTO ALL_USER_IDS VALUES (0);"
             EXEC SQL INSERT
             MOVE SQLCODE TO SQL  ALL_USER_IDS (1 
              SQLCODE SQL-COD
             DISPLAY""

             DISPLAY "INSERT INTO ALL_USER_IDS VALUES (1);"
             EXECINSERTALL_USER_IDS)END-EXEC
MOVE TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORM
             DISPLAY  " "

             DISPLAY "INSERT INTO DISPLAY" INTOLUSER_DATA (',
EXEC ALL_USER_IDS
              SQLCODE

  TO

      *Root hated Kibo only slightly less than BIFF 

             DISPLAYDISPLAY  ,   )
DISPLAY  ,BIFF'java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
             EXEC SQL 
0 BIFF ' java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
MOVE TO
           PERFORM CHCKOK  INSERT AUDIT_RECORDS 0 ,)
               " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY" INTO VALUES ('ROOT2,java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             EXEC SQL INSERT SQL  AUDIT_RECORDS (,,1java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
               ,' ' java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
             MOVE SQLCODEjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
           PERFORM CHCKOK
                java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY "END-EXEC
             EXEC SQL INSERT INTO  SQL-COD
             END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM
             DISPLAY           

             DISPLAY "INSERT VALUES (1 )
  INSERT VALUES java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
             END-EXEC
             MOVE               int1= + 1
           PERFORMCHCKOK
             DISPLAY  " "

      *One day, Kibo created a file. 

             DISPLAY "INSERT
             EXEC SQL INSERT INTO AUDIT_RECORDS
             END-EXEC
             MOVE TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORM
             DISPLAY  " "

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

MOVE java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
           .
        P199.
             DISPLAY "INSERT INTO AUDIT_RECORDS VALUES ( SQLCODE TOSQL-COD
             EXEC INSERTINTOAUDIT_RECORDS (1,1 )
             END-EXEC
             MOVE SQLCODE TODISPLAY""
           DISPLAY INTOVALUES
             DISPLAY""
             COMPUTE int1
             if (int1 SQLCODE SQL-COD
               GO TOPERFORM
END-IF

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

             DISPLAY "INSERT INTO DISPLAY"' G0T KIB0Z PASSW0RD!!!);java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
             EXECSQLINSERT AUDIT_RECORDS (2 2,0java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
D-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO AUDIT_RECORDS VALUES ( PERFORM java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             EXEC
             END-EXEC
             java.lang.StringIndexOutOfBoundsException: Range [0, 17) out of bounds for length 0
PERFORMCHCKOK
             DISPLAY  " "

             DISPLAY "PERFORM CHCKOK
             EXEC SQL   "
             END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORMDISPLAYFLUSER_DATA
             DISPLAY  " "

             DISPLAY "INSERT INTO LUSER_DATA VALUES (HAHA',"
             DISPLAY " 2, 'I G0T KIB0Z PASSW0RD!!!');"
             EXEC SQL INSERT INTO LUSER_DATA VALUES ('HAHA',
               2 'IG0TKIB0ZPASSW0RD!!' 
             MOVE SQLCODEMOVE SQLCODE TO
            CHCKOK
DISPLAY "

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

             DISPLAY "DELETE FROM LUSERS"
             DISPLAY                0 flag
             EXECjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             MOVE SQLCODEEXEC SELECT() INTO FROM LUSERSEND-EXEC
           PERFORM CHCKOK
DISPLAY java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             COMPUTE int1 " should be1 its value is ,int1
             DISPLAY "SELECT COUNT(*) INTO :int1"
             DISPLAY " FROM LUSER_DATA;"
              SQL COUNT  :int1LUSER_DATA
             END-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
DISPLAYint1 be value ,int1
             if (int1 "FROMAUDIT_RECORDS;
 0 TO
             END-IF

             COMPUTE int1 = -1
(*) INTO:"
             DISPLAY " FROM LUSERS;"
             EXEC SQL SELECT COUNT(*) INTO :int1 FROM LUSERS END-EXEC
MOVESQL-COD
           PERFORMif  NOT= 2 java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
             DISPLAY             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             if (int1  NOTDISPLAYSELECTI int1
M   
                          XEC  COUNT()INTO FROM 

             COMPUTE int1 = -1
             DISPLAY " MOVE SQLCODE SQL-COD
DISPLAY" AUDIT_RECORDS;java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
              " should be 0 is ,int1
             END-EXEC
             MOVE SQLCODE (int1   0 then
           
             DISPLAY int12   is int1
             if               " COUNT(* :int1"
MOVEflag
             END-IF-"NULL"

             COMPUTE int1 =               SELECT() :int1
 SELECT:
             DISPLAY " FROM AUDIT_RECORDS WHERE LUSER_ID IS NULL;"
EXEC SELECT : FROM
               WHERE  should
               TO
           PERFORM CHCKOK
DISPLAY be   ,
             if (int1  NOT =  10) then
               MOVE 0       *...and disabled deletes just for good measure. 
             END-IF

             COMPUTE int1 = - " LUSER_ACTION = 'DELETE;java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
             DISPLAY "SELECT COUNT(*) INTO :int1MOVE SQLCODE TO SQL-COD
             DISPLAY " FROM AUDIT_RECORDS WHERE SAVED_LUSER_ID DISPLAY "java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
-"NULL;java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             EXEC SQL SELECT COUNTEXEC SELECT()INTO FROM AUDIT_RECORDS
               WHERE SQLCODE SQL-COD
   SQLCODE SQL-COD
           PERFORM              " should be 0 value is " java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
             DISPLAY "int1 should be 0 0 TOflag
             if (int1
               MOVE 0 TO flag = -1
             END-IF

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

             DISPLAY "DELETE FROM AUDIT_CODES"
             DISPLAY " DISPLAY " WHERE ACTION_KEY= 0"
             XEC DELETE FROMAUDIT_CODES
               WHERE LUSER_ACTION 'DELETE' END-EXEC
             MOVE SQLCODE TO SQL-CODMOVE TO SQL-COD
           PERFORM           PERFORM CHCKOK
             DISPLAY""

             COMPUTE int11
             DISPLAY "SELECT COUNT(*) INTO :int1 FROM AUDIT_RECORDS"
             DISPLAY " WHERE ACTION_KEY = 2;"
             EXECMOVE TO
                            java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK " FROM ALL_USER_IDS"
             DISPLAY "int1 EXEC SQL FROM ALL_USER_IDS END-EXEC
             if (int1  NOT             MOVE SQLCODE TOSQL-COD
               MOVE 0 TO flag
             END-IF

             COMPUTE = -1
                             0 TO
             DISPLAY " WHERE ACTION_KEY200;itsvalueis"SQLSTATE
EXEC  COUNT) : FROM
               WHERE  NOT20) 
             MOVE SQLCODE 0TO
           java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             DISPLAY "int1 should be 8; its value is ",java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
             ifjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
               MOVE 0 TO" WORK;"
             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.        

             DISPLAY "DELETE FROM ALL_USER_IDS;"
                           " TABLE AUDIT_RECORDS CASCADE;
MOVE TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             DISPLAYSQLCODE<    ", java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
             if (SQLCODE  NOT               " java.lang.StringIndexOutOfBoundsException: Range [25, 26) out of bounds for length 25
               MOVE 0 TO SQLCODE SQL-COD
             END-IF
             DISPLAY "SQLSTATE should be 23000; its value is ", SQLSTATE
           PERFORM NOSUBCLASS                ""
             if (NORMSQ  NOT  =   "23java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               MOVE  flag
             END-IF
              (NORMSQ   =  200" NORMSQNOT=SQLSTATE
             then  ""
               DISPLAY "Valid implementation-defined SQLSTATE accepted."
             END-IF
             DISPLAY  "EXECSQL COMMIT WORK END-EXEC

             DISPLAY COMMIT
EXEC COMMIT END-EXEC
             MOVEDISPLAY"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
           PERFORM CHCKOKSQL TABLE CASCADE
             DISPLAY  " "

             DISPLAY "DROP TABLE AUDIT_RECORDS CASCADE;"
             EXEC SQL CHCKOK
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK  COMMIT java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
             DISPLAY"

DISPLAY"
             EXEC SQL               DROP java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60

" WORK;"
             DISPLAY  COMMIT ND-EXEC

             DISPLAY "DROP TABLE ALL_USER_IDS java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 36
             EXEC SQL DROP
MOVE TO
           PERFORM CHCKOK
             DISPLAY  " java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

               CHCKOK
             EXEC SQL COMMIT WORK
             MOVE SQLCODE TO SQL-COD SQL WORK
           PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY  "DISPLAY"java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25

             DISPLAY "DROP DISPLAY"*  *** "
                SQL  HU
             MOVEVALUES5'','PCO' java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY               DISPLAY" dml117pco ***fail **"
             EXECSQL WORKEND-EXEC
             MOVE SQLCODE TO SQL-COD
          PERFORMCHCKOK
             DISPLAY  " "

             DISPLAY "DROP TABLE LUSER_DATA CASCADE;"
             EXEC SQL DROPMOVE TO SQL-COD
             MOVE TOSQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
              SQL
             MOVE
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "DROP TABLE ******************** END TEST0645 ********************
             EXEC      **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
             MOVESQLCODE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORM CHCKOK
             DISPLAYCHCKOK

             DISPLAY "COMMIT WORK;"
             EXEC SQL COMMIT             DISPLAY"SQLSTATE be 00000; its is ", SQLSTATE
             MOVE SQLCODE TO SQL-COD
            CHCKOK
             DISPLAY  " "

             if ( flag  =  1 ) then
DISPLAY                * * "
               EXEC( =000" NOT=SQLSTATEjava.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
               MOVE TO
             java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
               DISPLAY " dml117.pco *subclasses with 000. This replacement equates valid
               EXEC SQL INSERT INTO HU.TESTREPORT
                 VALUES('0645','fail'      *After calling NOSUBCLASS, NORMSQ will be tested          
               MOVE SQLCODE TO SQL-COD
COMPUTE errcnt + 1
             END-IF

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

             EXEC SQL COMMIT      *subclass begins in position 3 of char array NORMSQ 
             MOVE SQLCODE VARYING FROM1  1 UNTIL >3java.lang.StringIndexOutOfBoundsException: Index 62 out of bounds for length 62
      ******************** END TEST0645 ********************
      **** 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 *Changed NORMSQ means implementation-defined subclass,
             DISPLAY "SQLSTATE *so proceed to zero it out, if valid (0-9,A-Z)
             PERFORM NOSUBCLASS (NORMSQ) then
ifSQLCODE=0   NORMSQ  000" java.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
               MOVE 0 TO flag
             END-IF
             if (NORMSQ = "00000"  AND  NORMSQ NOT = SQLSTATE      *examining position 4 of char array NORMSQ 
             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.      

 SQLSTATE

           MOVE      *valid characters are 0-9, A-Z 
      *subclass begins in position 3 of char array NORMSQ 
      *valid subclass begins with 5-9, I-Z, end of ALPNUM table 
           PERFORM VARYING norm2(norm1(norm2 java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
           if PERFORM
             MOVE " *implementation-defined subclasses are allowed for warnings
           END-IF      *(class = 01).  These equate to successful completion 
           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) 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
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.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge