Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  dml179.cob   Sprache: Cobol

 

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


      * EMBEDDED COBOL (file "DML179.PCO")


      ****************************************************************
      *                                                              
      *                 COMMENT SECTION                              
      *                                                              
      * DATE 1996-05-15 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.
      *                                                              
      * DML179.PCO                                                    
      * WRITTEN BY:  David Flater                                    
      * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE
      *                                                              
      * This routine tests Intermediate SQL.                         
      *                                                              
      * REFERENCES                                                   
      *   FIPS PUB 127-2 14.2 Intermediate SQL                       
      *   ANSI SQL-1992                                              
      *                                                              
      ****************************************************************





           EXEC SQL BEGIN DECLARE SECTION END-EXEC
       01  SQLCODE PIC S9(9) COMP.
       01  SQLSTATE PIC  X(5).
       01  uid PIC  X(18).
       01  uidx PIC  X(18).
       01  longst PIC  X(4000).
       01  int1 PIC S9(9) DISPLAY SIGN LEADING SEPARATE.
             EXEC SQL END DECLARE SECTION END-EXEC

       01  longst-value.
           02  filler  pic x(71) value "INSERT INTO T0892 (INTKEY, NAAM,
      -          " ADDRESS, KEYWORDS, DESCRIPT3) VALUES (".
           02  filler  pic x(71) value "0, 'John".
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spaces.
           02  filler  pic x(52) value "                                
      -          "            Smith', ".
           02  filler  pic x(68) value "'1313 Osprey Alley".
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value "Box 35B Sector 28 Quadrant 3".                                        ".
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value "Rural Route 29837-39234234324-XR
      -          "Z".
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value "Beverly Hills, CA".
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spaces.
           02  filler  pic x(52) value "                                
      -          "            90210', ".
           02  filler  pic x(68) value "'aardvark osprey          metrol
     -          "gy".
lerpic x)  spacesjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value "synthetic             
      -          "P".
           02  filler      *                 COMMENT SECTION                              
           02  filler  pic      * DATE 1996-05-15 EMBEDDED COBOL LANGUAGE                          
      -          " quadruped cattle".
           02  filler  pic x(      *  This program was written by employees of NIST to test SQL    
           02  filler  pic      *   FIPS PUB 127-2 14.2 Intermediate SQL                       
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
           02  filler  01   PIC()COMP.
             filler  pic (68  spacesjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
           02  filler  pic x(        uidx X18.
           02  filler  pic x(68) value "java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 31
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) value spacesjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            filler  pic() value"java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
      -          "          gravity',".
           02 pic x()value "filler filler blah  
      -          "                x() value ",'ohn.
           02  filler  pic x(68) value spaces           02     x68 value spaces.
            spaces.
           02  filler                picx)  spaces.
             filler  pic x()value .
           02  filler pic (68value .
           02  filler  pic x(68) value spaces.
           02  filler  pic x(68) 02  filler  )valuespaces.
            filler   x68 value spaces.
             pic x68)spacesjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
           02  filler  picx()value spaces.
                x68) .
           02  filler  pic x02filler   x()value                                 
           02             02  fillerfillerpic()  "1313  Alley"java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
                ).

       01  norm1 PIC S90268"  .                                       
      norm2S9  SIGNSEPARATE
       01  ALPNUM-TABLE 02  filler  pic xspaces
789"
           05        -""java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
       01  .
           05  NORMSQXX OCCURSTIMES.
01errcnt S99 DISPLAY  SEPARATE
      *date_time declaration 
       01  TO-DAY 02  filler x52)value java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
       01  THE-TIME 02  filler  (68)value"aardvark osprey          java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
       01  flag 02  fillerpic()valuespaces

       01  SQL-COD PIC S9(9) DISPLAY SIGN"

       PROCEDURE  fillerx68)           gnuyak
       java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 10

             MOVE "FLATER02picx) value"CORBAIDLAmste
             CALL "      -          "rdam""rdam".
             MOVE "not logged in, not" TO uidx
USER :idx FROM HU.CCOEND-EXEC
             MOVE SQLCODE TO SQL-COD
              SQL ROLLBACK WORK END-EXEC
           02  picx68) java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
             if (uid  NOT  =   uidx) then
               DISPLAY "ERROR: User ", uid, " java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 46
      -    " connected           02    filler  pic x(68) value spaces.
            STOP RUN
             END-IF
              0 TO errcnt

             DISPLAY
           "SQL Test Suite, V6.0, Embedded COBOL, dml179.pco      -          "lah.
             DISPLAY
           "59-byte ID"
             DISPLAY "TEd Version #"
      *date_time print 
           ACCEPT            02  filler filler x()valuespacesjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
           ACCEPT THE-TIME FROM TIMEspacesjava.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
                       filler  picx( valuespaces.

      ******************** BEGIN TEST0892 *******************
             MOVE 1 TO           02filler  pic (65 valuespaces.

             DISPLAY "              FIPS 
             " sizing  = 8000,statement  >java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
           4000"
             DISPLAY "References:"
             DISPLAY "  FIPS 16.6 -- Sizing #27, Length of a row"
             DISPLAY "                 "ABCDEFGH56789IJKLMNOPQRSTUVWXYZ
          "statement >java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
DISPLAY" FIPS 166-- #,CHARACTER  
      -    " length"
DISPLAY "   - ----------- --- -- "

                   *date_time declaration 
xx  SQLSTATE

      *twice the number of columns   18 
      *length of char strings    7978 
      *decimal precision plus 1 of each exact numeric column  4 

             DISPLAY "CREATE TABLE T0892 ("
             DISPLAY " INTKEY NUMERIC 3 PRIMARY KEY,
             java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 0
             DISPLAY "  ADDRESS VARCHAR (1000),"
            DISPLAY"  KEYWORDS VARCHAR (1000),"
             DISPLAY "  FUNCTION1 VARCHAR (1000),"
             DISPLAY "  FUNCTION2 VARCHAR (1000),"
             DISPLAY"  DESCRIPT1 VARCHAR (1000),"
             DISPLAY "  DESCRIPT2 VARCHAR (1000),"
             DISPLAY "  DESCRIPT3 VARCHAR (978));"
             EXEC SQL CREATE TABLE              MOVE SQLCODETO 
               INTKEY NUMERIC (3)             SQLCODE  SQL-COD
               NAAM (1000),
               ADDRESS VARCHAR                 "RROR:User" ,  expected.User" uidx,java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
                 ()java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
               FUNCTION1 VARCHAR (1000
               FUNCTION2            "SQL Test Suite, V6EmbeddedCOBOL,dml179.co
                          59byteID
               DESCRIPT2 VARCHAR (1000),
               DESCRIPT3 VARCHAR (978)) END-EXECACCEPT TO-DAY FROM 
  TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORM"FIPS  "
             DISPLAY  " "

DISPLAY"WORK;java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
               COMMIT END-EXEC
             MOVE SQLCODE TODISPLAY"FIPS 166- Sizing#27 Length of a row"
           PERFORM CHCKOK
               " "

             MOVE longst-value TO longst
             DISPLAY"The   java.lang.StringIndexOutOfBoundsException: Range [49, 48) out of bounds for length 66
             "    -   - ---   - ----
             DISPLAY longst

             DISPLAY java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
              "xxxx"TO
                   *twice the number of columns   18 
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "UPDATE T0892"
             DISPLAY  FUNCTION1 =
             DISPLAY              "INTKEY NUMERIC ()PRIMARY KEY,"
      -    " of the '"
             DISPLAY "'Materials '"
             DISPLAY "'Blasting Laboratory in the National Cattle
      -    "Acceleration '"
             DISPLAY "'Project of '"
             DISPLAY "'             DISPLAY "  KEYWORDSVARCHAR (1000),"
      -                 DISPLAY "FUNCTION1  (1000),java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
             DISPLAY                 DESCRIPT1 (1000)"
             DISPLAY 978)
      -" of'java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
             DISPLAY "'materials '"
             DISPLAY"'usedinthetrebuchet.  He served ten years as
      -    " the '"
             DISPLAY               VARCHAR(000,
             DISPLAY  FUNCTION1 1000)
           thejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
            "Pennsylvania'
             DISPLAY               VARCHAR 978)END-EXEC
      -    " '"
             DISPLAY "'java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY "'as a world-class graffiti artist and source of
      -    " all good '"
             DISPLAY "'             MOVE SQLCODE T
             DISPLAY ' in poorweather.He is
      -java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             DISPLAY T statementa
             DISPLAY "'paperback novels, java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 34
      -
             DISPLAY"Pumpkinswill Fit '
             DISPLAYEXEC   : 
      -"Useless Things 'java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
             DISPLAY"that Don't'
             DISPLAY "'Want java.lang.StringIndexOutOfBoundsException: Range [0, 30) out of bounds for length 0
"
             DISPLAY "'Head without '"
              ' worksRedundancy  
            -"of  'java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
' '
             DISPLAY "'java.lang.StringIndexOutOfBoundsException: Range [0, 31) out of bounds for length 28
      -    "              DISPLAY lower  jobto the
                          DISPLAYjava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 36
- java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 26
             DISPLAYDISPLAY' intrebuchet  served
                          java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 43
               java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 30
               Harry inthejava.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 67
' java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 34
               java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
               'Acceleration             "'
'    tojava.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 61
      -   "all  'java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
               'correlate the loft and acceleration              "to   poor weather.  isis
               'quality of DISPLAY "'ten thousand
'  the trebuchet. served ten  '
               'as the java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 20
               'charge of marketing in the now             "the ofa ,""A   java.lang.StringIndexOutOfBoundsException: Range [65, 66) out of bounds for length 65
' of '
'java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 64
               DISPLAY'without'java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
'
               'all good bits related '
               'to            ANSI 'java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
               'authorof  ten  java.langEXEC  UPDATE
               SETCHAR_LENGTH(ESCRIPT1 +
               CHAR_LENGTH() 
               DESCRIPT2=FUNCTION1
                 F FROM 1 FOR978) END-EXEC
             MOVESQLCODE TO
           PERFORM                WHERE INTK  0 END-EXEC
             DISPLAY  " "

             DISPLAY"   8000;its  is ", int1
             DISPLAY "SELECT CHAR_LENGTH (NAAM) +"
            "CHAR_LENGTH (DDRESS) +"
             DISPLAY "                CHAR_LENGTH (KEYWORDS) +"
             DISPLAY "                CHAR_LENGTH (FUNCTION1) +"
             DISPLAY "                CHAR_LENGTH (FUNCTION2) +"
              "CHAR_LENGTH (DESCRIPT1) +"
             DISPLAY "                CHAR_LENGTH (DESCRIPT2) +"
             DISPLAY "                CHAR_LENGTH (DESCRIPT3) +              EXEC  COMMIT WORK END-EXEC
             DISPLAY "  INTO :int1"
             DISPLAY "  FROM T0892"
             DISPLAY "  WHERE INTKEY = 0;"
             EXEC SQL             DISPLAY" TABLE T0892 ;java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
               CHAR_LENGTH (ADDRESS) +
               CHAR_LENGTH (KEYWORDS) +
               CHAR_LENGTH (FUNCTION1) +
               CHAR_LENGTH (FUNCTION2) +
               java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
               CHAR_LENGTH (DESCRIPT2) +
               CHAR_LENGTH (DESCRIPT3) + 22
               INTO :int1
               FROM T0892
               WHERE INTKEY = 0 END-EXEC
            MOVESQLCODE   
           PERFORM CHCKOK
             DISPLAY "int1 should be 8000; its value is ", int1
 then
               MOVE 0 TO flag
             

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

             DISPLAY "DROP TABLE T0892 CASCADE                       pco  * **java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
              TABLEEND-EXEC
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

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

             if ( flag  =  1 ) then
               DISPLAY "                *** pass *** "
               EXEC SQL INSERT INTOjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                 VALUES('
               MOVE SQLCODE TO  PERFORM NOSUBCLASS  EXIT-NOSUBCLASS
             
               DISPLAY "       dml179.pco  ***                MOVE 0 TO flag
               EXEC SQL INSERT INTO HU.TESTREPORT
                 VALUES(0892''fail''' END-EXEC
               MOVE SQLCODE TO SQL-COD
               COMPUTE errcnt = errcnt + 1
             

java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19

             EXEC SQL COMMIT WORK END-EXEC
             MOVE SQLCODE TO SQL-COD
      ******************** END TEST0892 ********************
      **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
                 *This routine replaces valid implementation-defined       

      *    ****  Procedures for PERFORM statements

      *Test SQLCODE and SQLSTATE for normal completion. 
       CHCKOK.
             DISPLAY "SQLCODE      *After calling NOSUBCLASS, NORMSQ will be tested          
             DISPLAY "SQLSTATE should be 00000; its value is ", SQLSTATE
                         SQLSTATE TONORMSQ
             if (SQLCODE NOT           MOVE3TOnorm1
               MOVE 0 TO flag
             END-IF
             if ( PERFORMVARYINGnorm2 FROM 14 BY 1 UNTIL norm2 > 36
             then
"
             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.      

           MOVEjava.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11

           MOVE 3       *so proceed to zero it out, if valid (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 java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 17
           if (NORMSQX      *examining position 4 of char array NORMSQ 
             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   =   SQLSTATEMOVE 0"TO (orm1)
             GO TO java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 22
           END-IF

           MOVE 4      *examining position 5 of char array NORMSQ 
      *examining position 4 of char array NORMSQ 
      *valid characters are 0-9, A-Z 
           PERFORM norm2FROM   1 UNTIL norm2  36
           if (NORMSQX(norm1)  =  ALPNUM(norm2)) then
             MOVE "0"              MOVE "0" TO(norm1)
           END-IF
           END-PERFORM
          
           MOVE 5       *implementation-defined subclasses are allowed for warnings 
      *valid characters are 0-9, A-Z 
      *examining position 5 of char array NORMSQ 
           PERFORM VARYING norm2 FROM 1 BY 1 UNTIL norm2
if(java.lang.StringIndexOutOfBoundsException: Range [23, 22) out of bounds for length 53
 " ()
           END-IF
           END-PERFORM
   
      *implementation-defined subclasses are is not impl.-def. 
      *Changed NORMSQ means implementation-defined subclass,    
      *so proceed to zero it out, if valid (0-9,A-Z)            
           if (NORMSQ   =         *subclass begins in position 3 of char array NORMSQ 
             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           java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
           if (NORMSQX(norm1      *so proceed to zero it out, if valid (0-9,A-Z)            
             MOVE""TONORMSQX(orm1
           END-IF
           END-PERFORM
          
           MOVE 5 TO norm1
      *valid characters are 0-9, A-Z 
      *examining position 5 of char array NORMSQ 
           PERFORM VARYING      *examining position 4 of char array NORMSQ 
           if           VARYING  FROM1BY1 UNTILnorm2>java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
 NORMSQX)
           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"            (NORMSQX(norm1)  =  ALPNUM(norm2)) then
             MOVE "0" TO             MOVE"0"TO NORMSQXnorm1)
           END-IF
           .

       EXIT-NOSUBCLASS.
           EXIT.

Messung V0.5 in Prozent
C=94 H=98 G=95

¤ Dauer der Verarbeitung: 0.11 Sekunden  (vorverarbeitet am  2026-10-11) ¤

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






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Statistik
#Sources=1127926
#Domains=2039723