identification division.
program-id. exp.
author. "Original from Hopcroft/Motwani/Ullman Cobol from JD".
date-written. 25.10.2004.
date-compiled.
data division.
working-storage section.
77 ans pic 9(4).
77 j pic 9(4).
linkage section.
77 DFHEIBLK pic 9(4).
77 DFHCOMMAREA pic 9(4).
77 res pic 9(4).
PROCEDURE DIVISION USING DFHEIBLK DFHCOMMAREA.
******
* First part: set up the pointers and structures, perform
* sanity checks and the call the decode/encode functions.
******
* Just return if no commarea because there's nowhere to work.
******
IF EIBCALEN = 0
EXEC CICS RETURN END-EXEC
END-IF
******
* Set up addressability to the commarea.
******
EXEC CICS
ADDRESS COMMAREA(conv-pointer)
END-EXEC.
SET ADDRESS OF CONVERTER-PARMS TO conv-pointer.
******
* Validate the commarea eyecatcher.
******
IF (CONVERTER-EYECATCHER NOT = DECODE-EYECATCHER-INIT)
AND (CONVERTER-EYECATCHER NOT = ENCODE-EYECATCHER-INIT)
MOVE URP-INVALID TO CONVERTER-RESPONSE
MOVE URP-CORRUPT-CLIENT-DATA TO CONVERTER-REASON
EXEC CICS
RETURN
END-EXEC
END-IF
* computes i to the power of n
move 1 to ans.
perform varying j from 1 by 1 until j >n
multiply ans by j giving ans
end-perform.
move ans to res.
end-program exp.
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet)
¤
|
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 ist noch experimentell.
|