Java Reference
In-Depth Information
01 MYSUB-CONTROL.
03 MYSUB-ACTION-SWITCH PIC X.
88 MYSUB-ACTION-INITIALIZE VALUE "I".
88 MYSUB-ACTION-EVALUATE VALUE "E".
88 MYSUB-ACTION-SET-AND-EVALUATE VALUE "S".
88 MYSUB-ACTION-GET-CALL-COUNTER VALUE "G".
03 MSG-TEXT PIC X(20).
03 MSG-SIZE PIC 9(8).
03 MYSUB-RETURNED-CALL-COUNTER PIC 9(10).
The next item contains the private items in MYSUB-CONTROL:
03 MYSUB-PRIVATE-ITEMS PIC X(20).
The MYSUB subroutine is expanded as follows:
IDENTIFICATION DIVISION.
PROGRAM-ID. MYSUB.
************************************************************************
* This routine accepts a text item as a parameter and *
* evaluates the text. If the text is all spaces, *
* MSG-SIZE will be set to 0. *
* If requested, the text item will also be stored in the *
* passed control structure. *
* If the text item is not passed, then MSG-TEXT *
* will be evaluated instead. *
* MYSUB will count the number of times it has been *
* with a particular MYSUBx-CONTROL and the number of *
* times it has been called using all CONTROLs. *
* MYSUB must be called with the INITIALIZE action when *
* any new CONTROL is to be used. *
************************************************************************
DATA DIVISION.
WORKING-STORAGE SECTION.
01 CALL-COUNTER PIC 9(10) VALUE 0.
01 ARGUMENT-COUNT PIC 9.
01 LOCAL-TEXT PIC X(20).
LINKAGE SECTION.
* Below you have a view of MYSUB-CONTROL that is used by the
* MYSUB subroutine:
01 MYSUB-CONTROL.
Search WWH ::




Custom Search