Eine aufbereitete Darstellung der Quelle

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

Benutzer

Quelle  xop719.cob   Sprache: Cobol

 

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

      * Embedded SQL COBOL (file "XOP719.PCO")

      *   Copyright 1994, 1995 X/Open Company Limited  

      *   All rights reserved.                                          
                                                              
      *   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.                                                 

      *   X/Open and the 'X' symbol are registered trademarks of X/Open Company
      *   Limited in the UK and other countries.


      ****************************************************************
      *                                                              
      *                 COMMENT SECTION                              
      *                                                              
      * DATE 1994/05/05 EMBEDDED C LANGUAGE                          
      * X/Open SQL VALIDATION TEST SUITE V6.0                  
      *                                                              
      * XOP719.PCO                                                    
      * WRITTEN BY: E. Pratt                                         
      *                                                              
      * GRANT ALL with optional PRIVILEGES omitted.                  
      *                                                              
      * REFERENCES                                                   
      *       X/Open CAE SQL                                         
      *       SECTION 5.3.9                                          
      *                                                              
      *                <embedded SQL C program>                      
      *                                                              
      * DATE PROGRAM LAST CHANGED   1/11/94                         
      *                                                              
      ****************************************************************

      *Must be run under authorization identifier XOPEN2

      *This test program must be run before xop720.pco, 
      *xop721.pco, xop722.pco, xop723.pco 

           EXEC SQL BEGIN DECLARE SECTION END-EXEC
       01  SQLCODE PIC S9(9) COMP.
       01  SQLSTATE PIC  X(5).
       01  HCV PIC  X(33).
       01  ch1 PIC  X(2).
       01  uid PIC  X(18).
       01  uidx PIC  X(18).
             EXEC SQL END DECLARE SECTION END-EXEC

       01  errcnt PIC S9(4) DISPLAY SIGN LEADING SEPARATE.
      *date_time declaration 
       01  TO-DAY PIC 9(6).
       01  THE-TIME PIC 9(8).
       01  errflg PIC S9(9) DISPLAY SIGN LEADING SEPARATE.

      *variables for nosubclass routine 

       01  SOURCE-COMPUTER. xyz.
       01  norm2PIC (9) DISPLAY SIGN LEADING SEPARATE.
       01  flag PIC S9(4) DISPLAY SIGN LEADING SEPARATE.
       01  ALPNUMVALUE IS
            "01234ABCDEFGH56789IJKLMNOPQRSTUVWXYZ".
            
01  SQLSTOREPIC (5).
       01         
            05 NORMSQ java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 0
       01         conformance to the SQL standards.                              standards


       01  SQL-COD PIC

       PROCEDURE DIVISION.
       P0.


      *Log on as user XOPEN2 
             MOVE       *   Limited in the UK and other countries.
             CALL "AUTHID" USING uid      *                                                              
             MOVE "not logged in, not" TO uidx
             EXEC       *                                                              
             MOVE SQLCODE TO SQL-COD
             if (uid  NOT  =
                     * X/Open SQL VALIDATION TEST SUITE V6.0                  
      -                                                                    *                                                              
             STOP RUN
             END-IF
                   * X/Open SQL VALIDATION TEST SUITE V6.0                  
           DISPLAY    "X/OPEN Extensions SQL Test       *                                                              
      -      *                                                              
      * REFERENCES                                                   
           "      *       X/Open CAE SQL                                               * REFERENCES                                                   
             DISPLAY       *                                                              
      *date_time print 
           ACCEPT TO-DAY FROM      *                                                              
           ACCEPT THE-TIME FROM TIME
           DISPLAY "Date run YYMMDD: " TO-DAY "      ****************************************************************

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

      ******************** BEGIN TEST0719 *******************

                     DISPLAY " This test program must be run before xop720.pco,"
           "xop721.pco,xop722. xop723.pco "


           DISPLAY "                     TEST0719             "
TALL with optional  omitted"
           DISPLAY "       01  SQLCODE PIC S9(9) COMP       01 HCV PICX33).
          DISPLAY "      -- --  ----  - - - - - - -- -"
            "***GRANT  ON XOPEN101    (.
           DISPLAY        PIC X(33)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 26
     "*  ALL  XOPEN1.BBB XOPEN3"
           DISPLAY
DISPLAY* ''"
* GRANT XOPEN1.CCCTO  "
           01  TO-DAY PIC.

      *GRANT ALL with optional PRIVILEGES omitted, grantor 

             MOVE 0 TO errflg
             

      *Clear the tables first 
             EXEC SQL java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 0
             SQLCODE SQL-COD
             EXEC SQL        01  flag PIC S9(4) DISPLAY PICS9()DISPLAY  LEADING.
             MOVE TO        01    9()
             EXEC SQL DELETE FROM XOPEN1.01errflg  S9 "1234BCDEFGH56789IJKLMNOPQRSTUVWXYZ.
             MOVE SQLCODE TO java.lang.StringIndexOutOfBoundsException: Range [0, 36) out of bounds for length 0
EXECCOMMITWORK
             MOVE SQLCODE TO SQL-COD

      *Load data into the working database tables 
             EXEC SQL INSERT       01   PICS9)DISPLAY  LEADING SEPARATE.
             END-EXEC
             MOVE SQLCODE TO SQL-COD
             EXEC SQL INSERT INTO XOPEN1.AAA VALUES('AD', 'AE', 'AF')
             END-EXEC
            05 ALPNUM3 PIC X OCCURS36TIMESjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
EXECSQL INSERT XOPEN1. ,,''
             END-EXEC
 java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36
             EXEC SQL INSERT INTO XOPEN1.AAA VALUES('AJ', 'AK', 'AL')
             END-EXEC
             MOVE SQLCODE TO SQL-COD
             EXEC SQL INSERT INTO XOPEN1.BBB VALUES('BA', 'BB', 'BC')
             END-EXEC
             MOVE SQLCODE TO SQL-COD
             EXEC SQL INSERT INTO XOPEN1.BBB VALUES       01NORMSQ2PIC X5)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
             END-EXEC
             MOVE SQLCODE TO SQL-COD
             RT INTO XOPEN1.BBBVALUES(BG,'','BI'java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
             END-EXEC XOPEN2 
              "OPEN2"  uid
EXECSQLINSERT INTO XOPEN1. VALUES(BJ, BK' BL')
             END-EXEC
             MOVE  TOSQL-COD
             EXEC SQL INSERT INTO XOPEN1.CCC VALUES('CA', 'CB', 'CC')
             END-EXEC
             MOVE SQLCODE TO SQL-COD
             EXEC SQL INSERT INTO XOPEN1.CCC VALUES('CD', '             EXEC   USER INTO :uidx FROM . END-EXEC
                           (  NOT  =   uidx) then
             MOVE SQLCODE TO SQL-CODDISPLAYE:  "   .   "  "
             EXEC SQL INSERT INTO XOPEN1
             END-EXEC
             MOVE SQLCODE TO SQL-COD
             EXEC SQL INSERT INTO XOPEN1.CCC VALUES( DISPLAY    "/ Extensions SQL Test ,V6.,Embeddedjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
             END-EXEC
MOVE TO 
             EXEC SQL COMMIT WORK END-EXEC
             MOVE SQLCODE TO SQL-COD

                         DISPLAY ====================================java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
      *Grantor holds all privileges, but has grant option 
      *only for SELECT and CREATE 
             MOVE "x" TO SQLSTATE
             EXEC  "ate run YYMMDD:"TO-DAY"athhmmssff:"THE-TIME
                "                                 HCV
             MOVE
             PERFORMCHCKOK
             ifNOT="00000"ORSQLCODE NOT= 0) then
               DISPLAY "*** Problem            DISPLAY " X/Open CAE SQL SEC"XOpen CAE SQL SEC. 5.3.9"
               COMPUTE errflg = errflg + 1
             END-IF

             EXEC SQL COMMIT WORK END-EXEC
             MOVE SQLCODE TO SQL-COD
             DISPLAY "===============================java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
      *Grantor holds SELECT, INSERT, DELETE with GRANT OPTION, 
             MOVE "x" TO SQLSTATE
             EXEC SQL GRANTDISPLAY"* ALL ON .BBB TOXOPEN3;"
             MOVE SQLCODETOSQL-COD
  CHCKOK
ifNORMSQ2  NOT    "0000"  NOT = =0 then
               DISPLAY"* Problem  T  NUMBER 2) !**"
               COMPUTE errflg = errflg + 1
             END-IF
             EXEC SQL COMMIT WORK java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 0
             MOVE SQLCODE TO              EXEC SQL DELETE FROM FROMXOPEN1 END-EXEC

             DISPLAY " MOVE TO 
      *Grantor holds SELECT, INSERT, DELETE with GRANT OPTION, 
              x  SQLSTATE
             MOVE "  " TO ch1
      *CREATE VIEW XOPEN2V AS SELECT B1, B2, B3 FROM XOPEN1.BBB
             EXEC SQL SELECT B2INTO : FROMXOPEN2V
                 '' END-EXEC
             SQLCODETO
                          EXEC  COMMIT END-EXEC
             DISPLAY "ch1 should be             java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 36
             MOVE 
 =00000ORNOT=  java.lang.StringIndexOutOfBoundsException: Range [63, 64) out of bounds for length 63
               DISPLAY "*** Problem found (java.lang.StringIndexOutOfBoundsException: Range [0, 47) out of bounds for length 21
               COMPUTE errflg = errflg + 1
             END-IF
             EXECSQLCOMMIT END-EXEC
             MOVE SQLCODE TO SQL-COD

             DISPLAY "===              SQLINSERT INTO .AAVALUES('J, ','')
      *Grantor holds INSERT, SELECT only without GRANT OPTION 
      *Expect a warning for no privileges granted below
              x  SQLSTATE
             MOVE "GRANT ALL ON              
              EXEC             INTO .BB('','',''java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
             MOVE              EXEC SQL XOPEN1. VALUESBG''' BI)
              EXEC SQL EXECUTE XOP719A END-EXEC
              MOVE SQLCODE TO             END-EXEC
             DISPLAY "             SQL   BVALUES(', 'K,'')

SQL. 'java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
               DISPLAY "EXEC INTO .CC '' CE'''
               COMPUTE errflg SQLCODETOjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             END-IF
              EXEC SQL COMMIT WORK java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 21
              MOVE SQLCODE              XOPEN1CCC(CJ  CL)
      *No ROLLBACK WORK;-programs follow on from this one e.g.
      *xop720.pco, which require the above grants to exist  

             DISPLAY "             MOVE SQLCODE TOSQL-COD
             DISPLAY "### maximum number of errors is 4 ###"

             (errflg
       01SQL-COD PIC S9(9) DISPLAY SIGN      *Grantor holds all privileges, but has grant option 
             VALUES(0719''pass,'CO)END-EXEC
               MOVE  TOjava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
               DISPLAY "      xop719.pco                          MOVE  TO 
             else
               EXEC SQL INSERT INTO XOPEN1.TESTREPORT
             VALUES('0719','fail','PCO') END-EXEC
               MOVE SQLCODE TO SQL-COD
               COMPUTE errcnt = errcnt + 1
               DISPLAY "MOVE"XOPEN2" TO uid
             END-IF

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

             EXEC SQL COMMITEND-IF
             MOVE              EXEC SQL WORKjava.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42

      ******************** END TEST0719 *******************

      ****** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
             STOP RUN.


       NOSUBCLASS.

      *This routine replaces valid implementation defined   
      *subclasses with 000. This replacement equates valid   
      *implementation-defined subclasses with the 000 value  
      *expected by the test case; otherwise the test will    
      *fail. After calling NOSUBCLASS, NORMSQ will be tested 
      *                             SQLSTATE will be printed 

             MOVE SQLSTATE TOCOMPUTE errflg  +1
      *subclass begins in position 3 of char array NORMSQ    
             MOVE 3 TO norm1
             DISPLAY=====================
             PERFORM UNTIL norm2 > 36
                           "" 
               '' TO NORMSQ(norm1)
             
              ADD 1              MOVE      *CREATE VIEW XOPEN2V AS SELECT B1, B2, B3 FROM XOPEN1.BBB
              END-PERFORM
             MOVE SQLS2                 ERRORUser , uid"expected.  User ",uidx              WHERE B1=''END-EXEC
                          DISPLAY"SQLSTATE  should  00000            STOP RUN
               TOP213
             END-IF
      *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)        

             MOVE 4 TO norm1
      *examining position 4 of char array NORMSQ             
             MOVE 1 TO norm2
norm2  36
             if (NORMSQ(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 20
               MOVE               SQL COMMIT
             END-IF
m2
              END-PERFORM
             MOVE 5 TO norm1
      *examining position 5 of char array NORMSQ             
             MOVE 1TO norm2
             PERFORM UNTIL norm2 > 36
             if      ******************** BEGIN TEST0719 *******************
               (norm1)
             END-IF
              ADD 1 TO norm2
              ND-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 (NORMSQMOVETO
                             "QLSTATE shouldDISPLAY"/,GRANTALLwith optionalPRIVILEGESomitted
             END-IF
              MOVE SQLS2 TO NORMSQ2.

        P213.

      *Test SQLCODE and SQLSTATE for normal completion 

       CHCKOK.
             MOVE 1 TO flag
             DISPLAY"QLCODEshouldbe ';itsvalue ,SQL-COD
             DISPLAY "SQLSTATE should be 00000; its               SQLCODE 

             PERFORMNOSUBCLASS THROUGHP213.
             if (SQLCODE  NOT =  0  OR  DISPLAY * SELECTjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
               0 TOflag
             END-IF
             ifflag      NORMSQ2DISPLAY"* GRANT ALL ON XOPEN1.CCC  "
               DISPLAY           DISPLAY "=============java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
             END-IF

           .



Messung V0.5 in Prozent
C=74 H=100 G=87

¤ 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.0.8Bemerkung:  ¤

*Bot Zugriff






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