Dan Bundus ([log in to unmask]) wrote:
: As we know, truly recursive applications make use of unique
: local variable values in each recursive call; in COBOL this can
: only be accomplished with a subprogram.
: Dan Bundus
You probably need $CONTROL DYNAMIC before the subprogram.
But you don't really have any "local" variables defined in the
WORKING-STORAGE section, so it works.
: IDENTIFICATION DIVISION.
: PROGRAM-ID. SUBPROG.
: DATA DIVISION.
: WORKING-STORAGE SECTION.
: 01 GLOBAL-CTR EXTERNAL PIC 99.