The *Initial Call field allows you to detect whether the function is being invoked for the first or subsequent times.
This field is only of use if the function option Closedown Program has been set to *No in which case the value of PGM *Initial Call is *Yes. For subsequent calls to this function the value is *No.
COBOL programs also use this field. Nested COBOL programs remain under the control of the calling program. The *Initial Call field is set to *YES the first time a nested COBOL program is called. Subsequent calls set the field to *NO.
In order to execute logic that is only performed once when a function is first invoked, the following action diagram logic can be inserted:
>USER: Initialize program
.—CASE |-PGM.*Initial Call is *Yes | Load Product Info array - Product ‘—ENDCASE
The field PGM *Initial Call is available for reference only and is set to *No by the function automatically.
For more information and examples on how to use the PGM *Initial Call field, see Building Access Paths in the chapter "Defining Arrays."
| Copyright © 2011 CA. All rights reserved. | Tell Technical Publications how we can improve this information |