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

Benutzer

Quelle  xts742.cob

  Sprache: Cobol
 

      * XTS742.PCO       TEST7042                                    
       PROGRAM-ID.  XTS742.
       ENVIRONMENT DIVISION.
       CONFIGURATION SECTION      *                                                              
       SOURCE-COMPUTER.  xyz.
       OBJECT-COMPUTER      *                                                              
       DATA DIVISION.
       WORKING-STORAGE SECTION.


      * EMBEDDED COBOL (file "XTS742.PCO")


      *Copyright 1995 National Computing Centre Limited               
      *and Computer Logic R&D S.A                                     
      *on behalf of the CTS5 SQL2 Project.                            
      *All rights reserved.                                          
      *The CTS5 SQL2 Project is sponsored by the European Community. 
      *                                                             
      *The National Computing Centre Limited and Computer Logic R&D  
      *have given permission to NIST to distribute this program      
      *over the World Wide Web in order to promote SQL standards.    
      *DISCLAIMER:                                                   
      *This program was reviewed by employees of NIST for            
      *conformance to the SQL standards.                             
      *NIST assumes no responsibility for any party's use of         
      *this program.                                                 


      ****************************************************************
      *                                                              
      *                 COMMENT SECTION                              
      *                                                              
      * SQL VALIDATION TEST SUITE V6.0                               
      *                                                              
      * XTS742.PCO       TEST7042                                    
      * WRITTEN BY: Nickos Backalidis                                
      * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE
      *                                                              
      * COUNT ALL <literal>                                          
      *                                                              
      * REFERENCES                                                   
      *   6.5  --  <set function specification>                      
      *   6.5  GR.1b                                                 
      *   5.3  --  <Literal>                                         
      *   F#44 --  Intermediate set function                         
      *                                                              
      * DATE LAST ALTERED  18/12/95 CTS5 Hand-over Test              
      *                                                              
      * Cleanups and fixes by V. Kogakis 08/12/95                    
      *        Print timestamp                                       
      *        Include Files                                         
      *        Define NOSUBCLASS/CHCKOK at test beginning            
      *                                                              
      * QA STATUS : FC                                               
      *                                                              
      * Revised by DWF 1996-02-09                                    
      *   Harmonized printouts with statements                       
      *   Fixed expected results                                     
      *   Fixed coding rules violations                              
      ****************************************************************



           EXEC SQL BEGIN DECLARE       01  cncol1cncol1 S9) SIGN LEADING SEPARATE
       01   PIC S99 .
       01  SQLSTATE PIC  X(5).
         uidPIC18)
       01  uidx PIC  X(18).
       01  norm1 PIC S9(9DISPLAY SIGN LEADINGSEPARATE.
       01  counst PIC(9DISPLAY LEADING SEPARATE.
       01  counum PIC S9(9DISPLAY SIGN LEADING SEPARATE.
       01  cnallS9()  SIGN SEPARATE
       01  cncol1 PIC S9(9DISPLAY SIGN LEADING SEPARATE.
       01  cncol2 PIC S9(9DISPLAY            05   PIC X OCCURS.
             EXECSQLEND DECLAREEND-EXEC
       01  norm1 PIC S9(9DISPLAY SIGN LEADING SEPARATE.
       01  norm2 PIC S9(9DISPLAY 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(9DISPLAY SIGN LEADING SEPARATE.
      *date_time declaration 
       01  TO-DAY 9().
       01  THE-TIME      *date_time declaration 
       01  flag PIC9  SIGN.

       01           THE-TIME 9()

       PROCEDURE DIVISION
       P0.

             MOVE
             CALL "AUTHID" USING uid
MOVE logged TO uidx
           pan>java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
             CALL "AUTHID" USING uid
             MOVE" logged in " TO
             EXEC SQL SELECT USER ROLLBACK END-EXEC
MOVE TO
             EXEC SQL ROLLBACK WORK END-EXEC (uid  =   uidx 
              TO
             if (      -   "connected
               DISPLAY "ERROR: User             END-IF
      -    "connectedjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
STOP
             END-IF
             MOVE

DISPLAY Test, V6 COBOL, xts742"
             DISPLAY
           "59-byte ID"
             DISPLAY "TEd             TO-DAYFROM DATE
      *date_time print 
           ACCEPT TO-DAY           DISPLAY" runYYMMDD: " TO-DAY:"THE-TIME
           ACCEPT THE-TIME
           DISPLAY DateYYMMDD " at hhmmssff: " THE-TIME

      ******************** BEGIN TEST7042 *******************

             MOVE 1 TO flag
             DISPLAY "           TEST7042  "
             DISPLAY"COUNTALL<iteral> "
             DISPLAY "References:"
             DISPLAY "    6.5  -- <set              DISPLAY "References
             DISPLAY "    6.5  GR.1              "    .GR
             DISPLAY"53  -<>"
"
             DISPLAY "   - - - - - - - - - - - - - - -              DISPLAY "-----      - --    "

      *initialise error reporting variables 
COMPUTE = -1
             MOVE "xxxxx" TO SQLSTATE

      *Initialise host variables 
             MOVE 0TO java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
              0  cound
              0 TO
             MOVE 0 TO cnall
MOVEcncol1
             MOVE 0 TO cncol2

              " COUNT(ALL 1155)COUNTALL ''),
      -    " COUNT(ALL 255),"
NTO,:,:nall
      -    " FROM CL_DATA_TYPE; "
             EXEC              (ALL
             COUNT(*)INTO
               () INTO:,:cound,:cnall
             CL_DATA_TYPE END-EXEC
             MOVE TO SQL-COD
           PERFORM CHCKOK
             DISPLAY "counst should be 6; its value is ", counst, " "
                        PERFORM CHCKOK
             DISPLAYcounum be  value ", counum," java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
             DISPLAYcnall be value ", cnall, " "
             if (counst  NOT              "cnall  should be 6; its value is ", cnall,  "
             =6OR    NOT =  6)then
               MOVE 0 TO flag
             END-IF
             DISPLAY  " "

      *insert two more rows in the table CL_DATA_TYPE 
             MOVE  TO flag
           (,,22510;
             EXEC SQLINSERTINTOCTS1CL_DATA_TYPE
             VALUES
             MOVE SQLCODE TO SQL-CODINSERTCL_DATA_TYPE
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "INSERT INTO CTS1.CL_DATA_TYPE
      -   "VALUES(NULL,15,40NULL;
             EXEC SQL INSERTMOVE TO
             VALUES,,) END-EXEC
             MOVE  " "
           PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             DISPLAY"

      *Initialise host variables 
             MOVE 0 TO  SQL-COD
             MOVE 0 TO   "
             MOVE0 counum
             MOVE 0 TO cnall
             MOVE TO cncol1
             MOVE 0 TO cncol2MOVE  cncol2

             DISPLAYSELECT*COUNT 119,(ALL
      -    " 'GIORGOS'),COUNT(CL_CHAR)"
DISPLAYCOUNTINTO : , : counum:,
      -    " :cncol1,"
                          DISPLAY "(CL_REAL)INTO:cnall,:counum,:,
             EXEC SQL SELECT COUNT(*),COUNT(ALL 119), COUNT(ALL
                           ":cncol2 FROM CL_DATA_TYPE;"
               (CL_REALINTO, :counum, :cncol1
             :cncol2 
               FROMCL_DATA_TYPE END-EXEC
              SQLCODE SQL-COD
             DISPLAY "                CL_DATA_TYPE java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
             DISPLAY "counum should be 8; its value is ", counum, " "
             DISPLAY "counst should be 8; its value is ", counst,DISPLAY   ;its, " "
" "
             DISPLAY "cncol2 should be 7; its value is ", cncol2, " "
             DISPLAY"SQLSTATE shouldbe01003;its value is " java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
ifcounst  8OR =8  ORjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
             =               if counst  8  ORcounum=8OR  NOT
               MOVE 0 TOMOVE flag
             END-IF
if  NOT   6  ORcncol27 then
               MOVE TO flag
             END-IF
             if (SQLSTATEjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
               MOVE flag
             END-IF
             DISPLAY  " "

      *insert one row with null values in the table 
             DISPLAY" INTO CTS1.CL_DATA_TYPE
      -             DISPLAY "
             EXEC SQL INSERT INTO CTS1DISPLAYINSERTCTS1
              SQL INTO.CL_DATA_TYPE
             MOVE TO
           PERFORM CHCKOK SQLCODE SQL-COD
             DISPLAY  " "

      *Initialise host variables 
             MOVE 0 TOPERFORM
             MOVE 0 TO cound
             MOVE 0 TOMOVE TO counst
             MOVETO java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
             MOVE cncol1
             MOVE 0               0 TO

             DISPLAY "SELECT COUNT(*),COUNT(ALL
      -    " 1000),COUNT(ALL'STEFOS'),COUNT(CL_CHAR)"
             DISPLAYCOUNTCL_REALcnallcounst
      -    " :cncol1,               "SELECT (*),OUNT
             DISPLAY "FROM CL_DATA_TYPE;"              "COUNT(CL_REAL INTO :cnall,:counum, :counst,
             EXEC              SQL COUNT(,COUNT 1000,COUNT(LL
             'STEFOS',(L_CHAR
               COUNT               COUNTCL_REAL:cnall counum, :cncol1
             :cncol2                CL_DATA_TYPE
               FROMCL_DATA_TYPE java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
MOVE TO
             DISPLAY "counst should be 9; its value is ", counst, " "
             DISPLAY "counum should be 9; its value is ", counum, " "
             DISPLAY"  should be 9;  value is ", cnall
             DISPLAY "cncol1 should be 6  value is ", cncol1""
             DISPLAY "cncol2 should be 01003; its value is "SQLSTATE
             DISPLAY "SQLSTATE should be 01003; its value is " SQLSTATE
             if (counst  NOT =               9)then
             =  9then
               MOVE 0 TO              (cncol1 =    OR  cncol2  NOT7 java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
             END-IF
             ifcncol1   6OR  NOT =  7)then
               MOVE
             END-IF
             if (SQLSTATEEXEC SQL WORK
               MOVE SQLCODE SQL-COD
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             DISPLAY  java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

             DISPLAY "ROLLBACK                 "       .pco*pass **"
             EXEC SQL ROLLBACK WORK END-EXEC
             MOVE TOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
           PERFORM('7042','ass,PCO)END-EXEC
             DISPLAY  " "

             ifflag
               DISPLAY "       xts742.pco  *** pass *** "
                 INSERT.
                 VALUES('7042','pass','PCO'END-EXECEXEC SQL INTO CTS1.TESTREPORT
                 TO
             else
               DISPLAY       xts742**"
               EXEC SQL INSERT INTO CTS1.TESTREPORT
                 VALUES('7042','fail','PCO'               COMPUTE errcnt + 1
MOVETOSQL-COD
               COMPUTE errcnt = errcntjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             END-IFMOVE TO

             DISPLAY "=================================

             EXEC SQL COMMIT WORKSTOP.
             MOVE SQLCODE      *    ****  Procedures for PERFORM statements

      ******************** END TEST7042 ********************

      **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
           STOPDISPLAYSQLSTATE;value

      *    ****  Procedures for PERFORM statements

      *Test SQLCODE and SQLSTATE for normal completion. 
CHCKOK
             DISPLAY" be;itsvalueSQL-COD
java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             PERFORM NOSUBCLASSValid"
              SQLCODE  OR NOT00000then
               MOVE
             END-IF
             if       *implementation-defined subclasses with the 000 value     
             thening NOSUBCLASS,       *                          SQLSTATE will be printed.      
DISPLAYValidSQLSTATE
             END-IF
             .

                   VARYING     norm2

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


      *subclass begins in position 3 of char array NORMSQ 
      *valid subclass begins with 5-9, I-Z, end of ALPNUM table 
           PERFORM VARYING FROMBYUNTIL >
if()  =  ALPNUM))java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
MOVE (norm1
      *valid characters are 0-9, A-Z 
            VARYING 1 1UNTIL36
           
      *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)            
                 
              TO
           END-IF

           MOVE
      *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 in Prozent
C=76 H=98 G=87
rozent
C=76 H=99 G=88

¤ Dauer der Verarbeitung: 0.10 Sekunden  (vorverarbeitet am  2026-06-10) ¤

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




Impressum  | Ethik und Gesetz  | Haftungsausschluß  | Kontakt  | Seitenstruktur  | © 2026 JDD |