identificationdivision. program-id. exp. author. "Original from Hopcroft/Motwani/Ullman Cobol from JD". date-written. 25.10.2004. date-compiled. datadivision. working-storagesection. 77 ans pic9(4). 77 j pic9(4). linkagesection. 77 DFHEIBLK pic9(4). 77 DFHCOMMAREA pic9(4). 77 res pic9(4). PROCEDUREDIVISIONUSING 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 EXECCICSRETURNEND-EXEC END-IF
****** * Set up addressability to the commarea. ******
EXECCICS ADDRESS COMMAREA(conv-pointer) END-EXEC.
SETADDRESSOF 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
EXECCICS RETURN END-EXEC END-IF * computes i to the power of n move1to ans. performvarying j from1by1until j >n multiply ans by j giving ans end-perform. move ans to res. end-program exp.
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.