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


Quelle  dml137.cob   Sprache: Cobol

 
      *  DISCLAIMER:                                                  
             *  NIST assumes no responsibility for any party's use of        
       ENVIRONMENT      * DML137.PCO                                                    
       CONFIGURATION SECTION      * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE
       SOURCE-COMPUTER.  xyz      * This routine tests <drop behavior> in non-dynamic SQL.  This 
       OBJECT-COMPUTER.  xyz.
             *                                                              
             *   FIPS PUB 127-2 14.1 Transitional SQL                       


      * EMBEDDED COBOL (file "DML137.PCO")


      ****************************************************************
      *                                                              
      *                 COMMENT SECTION                              
      *                                                              
      * DATE 1994/9/19 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.
      *                                                              
      * DML137.PCO                                                    
      * WRITTEN BY:  David W. Flater                                 
      * TRANSLATED AUTOMATICALLY FROM EMBEDDED C BY CHRIS SCHANZLE
      *                                                              
      * This routine tests <drop behavior> in non-dynamic SQL.  This 
      * is the non-dynamic version of DML138.                        
      *                                                              
      * REFERENCES                                                   
      *   FIPS PUB 127-2 14.1 Transitional SQL                       
      *   ANSI SQL-1992                                              
      *                                                              
      ****************************************************************



           EXEC SQL1ALPNUM-TABLE IS
       01  SQLCODE PIC S9(9) COMP.
               0124ABCDEFGH56789IJKLMNOPQRSTUVWXYZ
       0   PIC(8).
       0 PIC18.
             EXEC QL SECTION
0  norm1  S9SIGN SEPARATE
       01  norm2      *date_time declaration 0   PIC96).
       0       1THE-TIME
               "ABCDEFGH56789IJKLMNOPQRSTUVWXYZ
           0
0  .
           5NORMSQX 5 .
       01  errcnt .
      *date_time declaration 
       M "FLATER "  uid
       0THE-TIME 9(8)
       01  flag " loggedin, not"  uidx

       01  SQL-COD PIC  SQLCODE

       EXEC ROLLBACK java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
       .

             MOVEDISPLAY                   java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
              AUTHID
MOVE  not uidx
             EXEC SQL SELECT USER "#3 -schemamanipulationjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
MOVE TO
             EXEC
             MOVE"xxxxx java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
              (  NOT) java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
                ": User ",  " . User "  "
      MOVE TO
 java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
             
             MOVEEXEC  WORK

             DISPLAY
           "SQLPERFO CHCKOK
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
9 ID
  "
      *date_time print 
           ACCEPT FROM
           ACCEPT FROM
           DISPLAY  TO

      ******************** BEGIN TEST0697 *******************
             MOVE   "

             DISPLAY " TEST0697 "
              Erratum"
             M SQLCODE
              CHCKOK
-"RESTRICTed"
              "F -Basicschemamanipulation"
             DISPLAY " 11.2 FT.2 -- "
             
             DISPLAY " - - - - - - - - - - *If it is rejected at compile time, save the error and TEd it ou

             COMPUTE SQLCODE = -1
             "" TO

             DISPLAYCREATE
              "C1INTPRIMARYKEYNOT NULL;java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
             EXEC   NOT      NORMSQ="20")java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
               
             MOVE  SQL-COD
           PERFORMDISPLAYValid accepted
              COMMIT

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

             DISPLAY "CREATE TABLE DROPPABLE ("
             DISPLAY " C1 INT PRIMARY KEY *constraint defined on UNDROPPABLE.
      -    " UNDROPPABLE,"
             DISPLAY " C2 INT, CHECK (C1
              CREATE
               EXEC  TABLE RESTRICT
               C2SQLCODE SQL-COD
M SQLCODE SQL-COD
           PERFORM CHCKOK
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
             EXEC SQL COMMIT WORK END-EXEC
             MOVE SQLCODE SQL-COD
PERFORM    ORMSQ0 then
             DISPLAY  " MOVE 0 TO

             if (NORMSQ   =   "42000"  AND  NORMSQ  NOT  =   SQLSTATE)
      *If it is rejected at compile time, save the error and TEd it ou

             DISPLAY "DROP TABLE BASE_WCOV RESTRICT;"
                            DISPLAY"alidimplementation-definedSQLSTATEaccepted.java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
           P CHCKOK
             DISPLAY "java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
              " should 400 value " SQLSTATE
           PERFORMNOSUBCLASS EXIT-NOSUBCLASS
             if (   "
MOVE flag
             END-IF
              (   =   400  SQLSTATE
             then
                Valid SQLSTATE."
             java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
             DISPLAY  " "

             DISPLAY "COMMIT WORK;"
             EXEC SQL COMMIT WORK END-EXEC
             MOVE SQLCODE TO SQL-COD
java.lang.StringIndexOutOfBoundsException: Range [0, 27) out of bounds for length 25
             DISPLAY  " "

      *The following violates 11.18 SR.4 since DROPPABLE has a referen
      *constraint defined on UNDROPPABLE.                             
      *If it is rejected at compile time, save the error and TEd it ou

P CHCKOK
             EXEC SQL
M SQLCODE java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
             DISPLAY "SQLCODE shouldEXEC SQL INTO .TESTREPORT
             DISPLAYSQLSTATE0  alue
           PERFORM  TO
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17

             END-IF
              (   =   "20"ANDNORMSQ
             then'67,fail'PCO
               DISPLAY  TO
             ND-IF
                "

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

      *The following is affected by the erratum.  It should succeed. 

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

             DISPLAY "COMMIT WORK;"
             EXECSQL WORK
             MOVE SQLCODESQLCODE        NOT00)then
           PERFORM CHCKOK 0TO
             DISPLAY  " "

      *The following is affected by the erratum.  It should succeed. 
      *Referential constraint from DROPPABLE is gone now.            

             DISPLAY "DROP TABLE UNDROPPABLE *expected by the test case; otherwise the test will fail.
             EXEC      *After calling NOSUBCLASS, NORMSQ will be tested          
             MOVE SQLCODE TO SQL-COD
           PERFORM CHCKOK
               "

             DISPLAY "COMMIT WORK;"
java.lang.StringIndexOutOfBoundsException: Range [26, 13) out of bounds for length 42
             MOVE SQLCODE TOPERFORMV norm24BY   norm2
           PERFORMjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
              " "


             if (flag
               DISPLAY " *** pass *** "
   EXECSQL  HU
                 VALUES('END-PERFORM
               MOVE SQLCODE TO      *Changed NORMSQ means implementation-defined subclass,    
             else
                " dml137.pco *** *** "
               EXEC SQLGOTO EXIT-NOSUBCLASS
                 VALUES('069java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
      *valid characters are 0-9, A-Z 
                 = errcnt
if(norm1ALPNUM))then

             DISPLAY "======

             EXEC Ejava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
      *valid characters are 0-9, A-Z 
      ******************** END TEST0697 ********************
      **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0
           STOP NORMSQX)    (norm2

      *    ****  Procedures for PERFORM statements

      *Test SQLCODE and SQLSTATE for normal completion. 
       CHCKOK      *(class = 01).  These equate to successful completion 
             DISPLAY "1) 0 NORMSQX2 1) then
             DISPLAY "SQLSTATE should be 00000; its value is ", SQLSTATE
P NOSUBCLASS java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
             
                0TO
.
             if (NORMSQ = "00000"  AND  NORMSQ NOT = SQLSTATE)
             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.      

           MOVE SQLSTATE TO NORMSQ

           MOVE 3 TO norm1
      *subclass begins in position 3 of char array NORMSQ 
      *valid subclass begins with 5-9, I-Z, end of ALPNUM table 
           PERFORM VARYING norm2 FROM 14 BY 1 UNTIL norm2 > 36
           if (NORMSQX(norm1)  =  ALPNUM(norm2)) then
             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   =   SQLSTATE) 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 FROMIDENTIFICATION.
           f((norm1   (norm2) then
"0" TONORMSQX)
           END-IFCONFIGURATIONSECTION
           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(      * DATE 1994/9/19 EMBEDDED COBOL LANGUAGE                           
             MOVE "0" TO NORMSQX      *  This program was written by employees of NIST to test SQL    
           END-IF
           .

       EXIT-NOSUBCLASS      *                                                              
           EXIT.

Messung V0.5
C=92 H=99 G=95

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

*Bot Zugriff






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