* Standard COBOL (file "MPB011.SCO") calling SQL * procedures in file "MPB011.MCO".
**************************************************************** * * COMMENT SECTION * * DATE 1994/3/4 STANDARD 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. * * MPB011.SCO * WRITTEN BY: David W. Flater * TRANSLATED AUTOMATICALLY FROM EMBEDDED COBOL BY CHRIS SCHANZLE * * This program tests <grant statement> and <revoke statement> * in dynamic SQL. This is part B of a two-part * concurrency test. It must be run as HU after MPA011 is * run as FLATER. * * REFERENCES * FIPS PUB 127-2 14.1 Transitional SQL * ANSI SQL-1992 * ****************************************************************
MOVE"HU "TO uid CALL"AUTHID"USING uid MOVE"not logged in, not"TO uidx * EXEC SQL SELECT USER INTO :uidx FROM HU.ECCO; CALL"SUB1"USINGSQLCODE SQLSTATE uidx MOVESQLCODETO SQL-COD * EXEC SQL ROLLBACK WORK; CALL"SUB2"USINGSQLCODE SQLSTATE MOVESQLCODETO SQL-COD if (uid NOT = uidx) then DISPLAY"ERROR: User ", uid, " expected. User ", uidx, "
- " connected" STOPRUN END-IF MOVE0TO errcnt
DISPLAY "SQL Test Suite, V6.0, Module COBOL, mpb011.sco" DISPLAY "59-byte ID" DISPLAY"TEd Version #" *date_time print ACCEPT TO-DAY FROMDATE ACCEPT THE-TIME FROMTIME DISPLAY"Date run YYMMDD: " TO-DAY " at hhmmssff: " THE-TIME
DISPLAY"This is part B of a two-part test. It should be
- " started" DISPLAY"AFTER mpa011. Table TOKENS must exist in schema
- " HU."
*to debug program, set debug1 = 1 MOVE0TO debug1 MOVE1000TO maxfls MOVE1TO pauze MOVE2TO pauze2 *This is not a concurrency test. *Using TEd, increase variable pauze if there is MAYDAY message. MOVE11TO progno
******************** BEGIN TEST0629 ******************* MOVE1TO flag
DISPLAY" TEST0629 " DISPLAY" <grant statement> (dynamic)" DISPLAY" This is program 'B'" DISPLAY"References:" DISPLAY" 11.36 <grant statement>" DISPLAY" FIPS PUB 127-2 14.1 Transitional SQL features
- " 1, 3" DISPLAY" - - - - - - - - - - - - - - - - - - -"
COMPUTESQLCODE = -1 MOVE"xxxxx"TO SQLSTATE
DISPLAY"You should have already started Program A." MOVE1TO waitin
.
P194. if (debug1 NOT = 0) then DISPLAY"Debug trace: P194" END-IF if (waitin = -1) then GOTO P197 END-IF MOVE0TO fails COMPUTE oldtok = -1 DISPLAY"Waiting for the token to reach ", waitin, "."
.
P104. if (debug1 NOT = 0) then DISPLAY"Debug trace: P104" END-IF COMPUTE int1 = -1 * EXEC SQL SELECT TOKEN_NO INTO :int1 FROM HU.TOKENS * WHERE PROG_NO = :progno; CALL"SUB3"USINGSQLCODE SQLSTATE int1 progno MOVESQLCODETO SQL-COD if (SQLCODE < 0) then DISPLAY"SQLCODE = ", SQL-COD, " SQLSTATE = '",
SQLSTATE, "'" END-IF if (int1 NOT = oldtok ANDSQLCODENOT < 0AND SQLCODENOT = 100 ) then DISPLAY"Token = ", int1 MOVE int1 TO oldtok MOVE0TO fails END-IF if (SQLCODE < 0ORSQLCODE = 100OR int1 NOT =
waitin) then *Waste time and try again PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (NORMSQ = "21000") then GOTO P198 END-IF COMPUTE fails = fails + 1 if (fails > maxfls) then GOTO P199 END-IF *TEd hook for fixing delays: 018 PERFORM SLEEEP THRU P133 * EXEC SQL ROLLBACK WORK; CALL"SUB4"USINGSQLCODE SQLSTATE MOVESQLCODETO SQL-COD GOTO P104 END-IF
*date_time print ACCEPT TO-DAY FROMDATE ACCEPT THE-TIME FROMTIME DISPLAY"Date run YYMMDD: " TO-DAY " at hhmmssff: " THE-TIME
if (int1 = 1) then GOTO P196 END-IF if (int1 = 3) then GOTO P190 END-IF if (int1 = 5) then GOTO P189 END-IF GOTO P197
*token == 1
.
P196. if (debug1 NOT = 0) then DISPLAY"Debug trace: P196" END-IF DISPLAY"Program 'B' trying to access inaccessible table."
DISPLAY"dstmt=""SELECT COUNT(*) FROM FLATER.GRANT011""" MOVE"SELECT COUNT(*) FROM FLATER.GRANT011 " TO dstmt
DISPLAY"PREPARE S01111 FROM :dstmt;" * EXEC SQL PREPARE S01111 FROM :dstmt; CALL"SUB6"USINGSQLCODE SQLSTATE dstmt MOVESQLCODETO SQL-COD if (SQLCODE < 0) then GOTO P100 END-IF PERFORM CHCKOK DISPLAY" "
DISPLAY"DECLARE C01111 CURSOR FOR S01111;" * EXEC SQL DECLARE C01111 CURSOR FOR S01111 END-EXEC DISPLAY" "
DISPLAY"OPEN C01111;" * EXEC SQL OPEN C01111; CALL"SUB7"USINGSQLCODE SQLSTATE, SQLSTATE MOVESQLCODETO SQL-COD if (SQLCODE < 0) then GOTO P100 END-IF PERFORM CHCKOK DISPLAY" "
COMPUTE int1 = -1 DISPLAY"FETCH C01111 INTO :int1;" * EXEC SQL FETCH C01111 INTO :int1; CALL"SUB8"USINGSQLCODE SQLSTATE int1 MOVESQLCODETO SQL-COD
DISPLAY"int1 should not be 1; its value is ", int1 if (int1 = 1) then MOVE0TO flag END-IF
.
P100. if (debug1 NOT = 0) then DISPLAY"Debug trace: P100" END-IF DISPLAY"SQLCODE is ", SQL-COD DISPLAY"SQLSTATE should be 42000; its value is ", SQLSTATE PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODENOT < 0OR NORMSQ NOT = "42000") then MOVE0TO flag END-IF if (NORMSQ = "42000"AND NORMSQ NOT = SQLSTATE) then DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF DISPLAY" "
DISPLAY"SQLCODE should be < 0; its value is ", SQL-COD DISPLAY"SQLSTATE should be 42000; its value is ", SQLSTATE PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODENOT < 0OR NORMSQ NOT = "42000") then MOVE0TO flag END-IF if (NORMSQ = "42000"AND NORMSQ NOT = SQLSTATE) then DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF DISPLAY" "
DISPLAY"dstmt=""UPDATE FLATER.GRANT011 SET C1 = 0""" MOVE"UPDATE FLATER.GRANT011 SET C1 = 0 " TO dstmt
DISPLAY"SQLCODE should be < 0; its value is ", SQL-COD DISPLAY"SQLSTATE should be 42000; its value is ", SQLSTATE PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODENOT < 0OR NORMSQ NOT = "42000") then MOVE0TO flag END-IF if (NORMSQ = "42000"AND NORMSQ NOT = SQLSTATE) then DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF DISPLAY" "
DISPLAY"dstmt=""DELETE FROM FLATER.GRANT011""" MOVE"DELETE FROM FLATER.GRANT011 " TO dstmt
DISPLAY"SQLCODE should be < 0; its value is ", SQL-COD DISPLAY"SQLSTATE should be 42000; its value is ", SQLSTATE PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODENOT < 0OR NORMSQ NOT = "42000") then MOVE0TO flag END-IF if (NORMSQ = "42000"AND NORMSQ NOT = SQLSTATE) then DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF DISPLAY" "
COMPUTE int1 = -1 DISPLAY"FETCH C01112 INTO :int1;" * EXEC SQL FETCH C01112 INTO :int1; CALL"SUB16"USINGSQLCODE SQLSTATE int1 MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"int1 should be 1; its value is ", int1 if (int1 NOT = 1) then MOVE0TO flag END-IF
DISPLAY"SQLCODE should be < 0; its value is ", SQL-COD DISPLAY"SQLSTATE should be 42000; its value is ", SQLSTATE PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODENOT < 0OR NORMSQ NOT = "42000") then MOVE0TO flag END-IF if (NORMSQ = "42000"AND NORMSQ NOT = SQLSTATE) then DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF DISPLAY" "
DISPLAY"dstmt=""UPDATE FLATER.GRANT011 SET C1 = 0""" MOVE"UPDATE FLATER.GRANT011 SET C1 = 0 " TO dstmt
DISPLAY"SQLCODE should be < 0; its value is ", SQL-COD DISPLAY"SQLSTATE should be 42000; its value is ", SQLSTATE PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODENOT < 0OR NORMSQ NOT = "42000") then MOVE0TO flag END-IF if (NORMSQ = "42000"AND NORMSQ NOT = SQLSTATE) then DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF DISPLAY" "
DISPLAY"dstmt=""DELETE FROM FLATER.GRANT011""" MOVE"DELETE FROM FLATER.GRANT011 " TO dstmt
DISPLAY"SQLCODE should be < 0; its value is ", SQL-COD DISPLAY"SQLSTATE should be 42000; its value is ", SQLSTATE PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODENOT < 0OR NORMSQ NOT = "42000") then MOVE0TO flag END-IF if (NORMSQ = "42000"AND NORMSQ NOT = SQLSTATE) then DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF DISPLAY" "
COMPUTE int1 = -1 DISPLAY"FETCH C01114 INTO :int1;" * EXEC SQL FETCH C01114 INTO :int1; CALL"SUB24"USINGSQLCODE SQLSTATE int1 MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"int1 should be 1; its value is ", int1 if (int1 NOT = 1) then MOVE0TO flag END-IF
COMPUTE int1 = -1 DISPLAY"FETCH C01114 INTO :int1;" * EXEC SQL FETCH C01114 INTO :int1; CALL"SUB28"USINGSQLCODE SQLSTATE int1 MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"int1 should be 2; its value is ", int1 if (int1 NOT = 2) then MOVE0TO flag END-IF
COMPUTE int1 = -1 DISPLAY"FETCH C01113 INTO :int1;" * EXEC SQL FETCH C01113 INTO :int1; CALL"SUB33"USINGSQLCODE SQLSTATE int1 MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"int1 should be 2; its value is ", int1 if (int1 NOT = 2) then MOVE0TO flag END-IF
COMPUTE int1 = -1 DISPLAY"FETCH C01114 INTO :int1;" * EXEC SQL FETCH C01114 INTO :int1; CALL"SUB37"USINGSQLCODE SQLSTATE int1 MOVESQLCODETO SQL-COD PERFORM CHCKOK DISPLAY"int1 should be 0; its value is ", int1 if (int1 NOT = 0) then MOVE0TO flag END-IF
DISPLAY"SQLCODE should be >= 0; its value is ", SQL-COD DISPLAY"SQLSTATE should be 01007; its value is ", SQLSTATE if (SQLCODE < 0OR SQLSTATE NOT = "01007") then MOVE0TO flag END-IF
* EXEC SQL COMMIT WORK; CALL"SUB48"USINGSQLCODE SQLSTATE MOVESQLCODETO SQL-COD ******************** END TEST0629 ******************** ******************** BEGIN TEST0630 ******************* MOVE1TO flag
DISPLAY" TEST0630 " DISPLAY" <revoke statement> (dynamic)" DISPLAY" This is program 'B'" DISPLAY"References:" DISPLAY" 11.37 <revoke statement>" DISPLAY" FIPS PUB 127-2 14.1 Transitional SQL features
- " 1, 3" DISPLAY" - - - - - - - - - - - - - - - - - - -"
COMPUTESQLCODE = -1 MOVE"xxxxx"TO SQLSTATE
*date_time print ACCEPT TO-DAY FROMDATE ACCEPT THE-TIME FROMTIME DISPLAY"Date run YYMMDD: " TO-DAY " at hhmmssff: " THE-TIME DISPLAY"You should have already started Program A." MOVE1TO waitin
.
P160. if (debug1 NOT = 0) then DISPLAY"Debug trace: P160" END-IF if (waitin = -1) then GOTO P163 END-IF MOVE0TO fails COMPUTE oldtok = -1 DISPLAY"Waiting for the token to reach ", waitin, "."
.
P161. if (debug1 NOT = 0) then DISPLAY"Debug trace: P161" END-IF COMPUTE int1 = -1 * EXEC SQL SELECT TOKEN_NO INTO :int1 FROM HU.TOKENS * WHERE PROG_NO = :progno; CALL"SUB49"USINGSQLCODE SQLSTATE int1 progno MOVESQLCODETO SQL-COD if (SQLCODE < 0) then DISPLAY"SQLCODE = ", SQL-COD, " SQLSTATE = '",
SQLSTATE, "'" END-IF if (int1 NOT = oldtok ANDSQLCODENOT < 0AND SQLCODENOT = 100 ) then DISPLAY"Token = ", int1 MOVE int1 TO oldtok MOVE0TO fails END-IF if (SQLCODE < 0ORSQLCODE = 100OR int1 NOT =
waitin) then *Waste time and try again PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (NORMSQ = "21000") then GOTO P198 END-IF COMPUTE fails = fails + 1 if (fails > maxfls) then GOTO P199 END-IF *TEd hook for fixing delays: 021 PERFORM SLEEEP THRU P133 * EXEC SQL ROLLBACK WORK; CALL"SUB50"USINGSQLCODE SQLSTATE MOVESQLCODETO SQL-COD GOTO P161 END-IF
*date_time print ACCEPT TO-DAY FROMDATE ACCEPT THE-TIME FROMTIME DISPLAY"Date run YYMMDD: " TO-DAY " at hhmmssff: " THE-TIME
if (int1 = 1) then GOTO P162 END-IF if (int1 = 3) then GOTO P170 END-IF GOTO P163
*token == 1
.
P162. if (debug1 NOT = 0) then DISPLAY"Debug trace: P162" END-IF DISPLAY"Program 'B' trying to access insert-only table."
DISPLAY"dstmt=""SELECT COUNT(*) FROM FLATER.GRANT011""" MOVE"SELECT COUNT(*) FROM FLATER.GRANT011 " TO dstmt
DISPLAY"PREPARE S01121 FROM :dstmt;" * EXEC SQL PREPARE S01121 FROM :dstmt; CALL"SUB51"USINGSQLCODE SQLSTATE dstmt MOVESQLCODETO SQL-COD if (SQLCODE < 0) then GOTO P101 END-IF PERFORM CHCKOK DISPLAY" "
DISPLAY"DECLARE C01121 CURSOR FOR S01121;" * EXEC SQL DECLARE C01121 CURSOR FOR S01121 END-EXEC DISPLAY" "
DISPLAY"OPEN C01121;" * EXEC SQL OPEN C01121; CALL"SUB52"USINGSQLCODE SQLSTATE, SQLSTATE MOVESQLCODETO SQL-COD if (SQLCODE < 0) then GOTO P101 END-IF PERFORM CHCKOK DISPLAY" "
DISPLAY"FETCH C01121 INTO :int1;" * EXEC SQL FETCH C01121 INTO :int1; CALL"SUB53"USINGSQLCODE SQLSTATE int1 MOVESQLCODETO SQL-COD
.
P101. if (debug1 NOT = 0) then DISPLAY"Debug trace: P101" END-IF DISPLAY"SQLCODE is ", SQL-COD DISPLAY"SQLSTATE should be 42000; its value is ", SQLSTATE PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODENOT < 0OR NORMSQ NOT = "42000") then MOVE0TO flag END-IF if (NORMSQ = "42000"AND NORMSQ NOT = SQLSTATE) then DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF DISPLAY" "
DISPLAY"SQLCODE should be < 0; its value is ", SQL-COD DISPLAY"SQLSTATE should be 42000; its value is ", SQLSTATE PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODENOT < 0OR NORMSQ NOT = "42000") then MOVE0TO flag END-IF if (NORMSQ = "42000"AND NORMSQ NOT = SQLSTATE) then DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF DISPLAY" "
DISPLAY"dstmt=""DELETE FROM FLATER.GRANT011""" MOVE"DELETE FROM FLATER.GRANT011 " TO dstmt
DISPLAY"SQLCODE should be < 0; its value is ", SQL-COD DISPLAY"SQLSTATE should be 42000; its value is ", SQLSTATE PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODENOT < 0OR NORMSQ NOT = "42000") then MOVE0TO flag END-IF if (NORMSQ = "42000"AND NORMSQ NOT = SQLSTATE) then DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF DISPLAY" "
*token == 3
.
P170. if (debug1 NOT = 0) then DISPLAY"Debug trace: P170" END-IF DISPLAY"Program 'B' trying to access inaccessible table."
DISPLAY"dstmt=""SELECT COUNT(*) FROM FLATER.GRANT011""" MOVE"SELECT COUNT(*) FROM FLATER.GRANT011 " TO dstmt
DISPLAY"PREPARE S01122 FROM :dstmt;" * EXEC SQL PREPARE S01122 FROM :dstmt; CALL"SUB59"USINGSQLCODE SQLSTATE dstmt MOVESQLCODETO SQL-COD if (SQLCODE < 0) then GOTO P102 END-IF PERFORM CHCKOK DISPLAY" "
DISPLAY"DECLARE C01122 CURSOR FOR S01122;" * EXEC SQL DECLARE C01122 CURSOR FOR S01122 END-EXEC DISPLAY" "
DISPLAY"OPEN C01122;" * EXEC SQL OPEN C01122; CALL"SUB60"USINGSQLCODE SQLSTATE, SQLSTATE MOVESQLCODETO SQL-COD if (SQLCODE < 0) then GOTO P102 END-IF PERFORM CHCKOK DISPLAY" "
DISPLAY"FETCH C01122 INTO :int1;" * EXEC SQL FETCH C01122 INTO :int1; CALL"SUB61"USINGSQLCODE SQLSTATE int1 MOVESQLCODETO SQL-COD
.
P102. if (debug1 NOT = 0) then DISPLAY"Debug trace: P102" END-IF DISPLAY"SQLCODE is ", SQL-COD DISPLAY"SQLSTATE should be 42000; its value is ", SQLSTATE PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODENOT < 0OR NORMSQ NOT = "42000") then MOVE0TO flag END-IF if (NORMSQ = "42000"AND NORMSQ NOT = SQLSTATE) then DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF DISPLAY" "
DISPLAY"SQLCODE should be < 0; its value is ", SQL-COD DISPLAY"SQLSTATE should be 42000; its value is ", SQLSTATE PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODENOT < 0OR NORMSQ NOT = "42000") then MOVE0TO flag END-IF if (NORMSQ = "42000"AND NORMSQ NOT = SQLSTATE) then DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF DISPLAY" "
DISPLAY"dstmt=""UPDATE FLATER.GRANT011 SET C1 = 0""" MOVE"UPDATE FLATER.GRANT011 SET C1 = 0 " TO dstmt
DISPLAY"SQLCODE should be < 0; its value is ", SQL-COD DISPLAY"SQLSTATE should be 42000; its value is ", SQLSTATE PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODENOT < 0OR NORMSQ NOT = "42000") then MOVE0TO flag END-IF if (NORMSQ = "42000"AND NORMSQ NOT = SQLSTATE) then DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF DISPLAY" "
DISPLAY"dstmt=""DELETE FROM FLATER.GRANT011""" MOVE"DELETE FROM FLATER.GRANT011 " TO dstmt
DISPLAY"SQLCODE should be < 0; its value is ", SQL-COD DISPLAY"SQLSTATE should be 42000; its value is ", SQLSTATE PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODENOT < 0OR NORMSQ NOT = "42000") then MOVE0TO flag END-IF if (NORMSQ = "42000"AND NORMSQ NOT = SQLSTATE) then DISPLAY"Valid implementation-defined SQLSTATE accepted." END-IF DISPLAY" "
P198. if (debug1 NOT = 0) then DISPLAY"Debug trace: P198" END-IF DISPLAY"CARDINALITY VIOLATION"
.
P199. if (debug1 NOT = 0) then DISPLAY"Debug trace: P199" END-IF if (fails > maxfls) then DISPLAY"The number of attempts (fails) exceeds variable
- " maxfls." DISPLAY"Increase the value of variable maxfls, if
- " needed." DISPLAY"Or, increase the value of variable pauze." END-IF DISPLAY"MAYDAY MAYDAY PROGRAM ABORTING" DISPLAY"You will have to start this test over." **** TESTER MAY CHOOSE TO INSERT CODE FOR errcnt > 0 STOPRUN.
* **** Procedures for PERFORM statements
*Test SQLCODE and SQLSTATE for normal completion.
CHCKOK. DISPLAY"SQLCODE should be 0; its value is ", SQL-COD DISPLAY"SQLSTATE should be 00000; its value is ", SQLSTATE PERFORM NOSUBCLASS THRU EXIT-NOSUBCLASS if (SQLCODENOT = 0OR NORMSQ NOT = "00000") then MOVE0TO flag END-IF 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
MOVE3TO norm1 *subclass begins in position 3 of char array NORMSQ *valid subclass begins with 5-9, I-Z, end of ALPNUM table PERFORMVARYING norm2 FROM14BY1UNTIL 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 GOTO EXIT-NOSUBCLASS END-IF
MOVE4TO norm1 *examining position 4 of char array NORMSQ *valid characters are 0-9, A-Z PERFORMVARYING norm2 FROM1BY1UNTIL norm2 > 36 if (NORMSQX(norm1) = ALPNUM(norm2)) then MOVE"0"TO NORMSQX(norm1) END-IF END-PERFORM
MOVE5TO norm1 *valid characters are 0-9, A-Z *examining position 5 of char array NORMSQ PERFORMVARYING norm2 FROM1BY1UNTIL 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.
SLEEEP. COMPUTE repcnt = fails * pauze if (repcnt > 17) then COMPUTE repcnt = repcnt * repcnt + pauze2 END-IF MOVE1TO iii
.
P133. * EXEC SQL COMMIT WORK; CALL"SUB74"USINGSQLCODE SQLSTATE COMPUTE int1 = -1 * EXEC SQL UPDATE HU.WORKS * SET HOURS = -1 WHERE HOURS = :int1; CALL"SUB75"USINGSQLCODE SQLSTATE int1 COMPUTE iii = iii + 1 if (iii < repcnt) then GOTO P133 END-IF
.
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-06-14)
¤
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.
Angebot
Hier finden Sie eine Liste der Produkte des Unternehmens