You must know what data is being passed from the calling program and describe it in the LINKAGE SECTION of each program that is called directly or indirectly by the calling program.
Code the USING phrase after the PROCEDURE DIVISION header to name the parameters that receive the data that is passed from the calling program.
When arguments are passed to the subprogram BY REFERENCE, it is invalid for the subprogram to specify any relationship between its parameters and any fields other than those that are passed and defined in the main program. The subprogram must not:
If any of the rules above are violated, unexpected results might occur if the calling program was compiled with the OPTIMIZE compiler option.
related tasks
Coding the LINKAGE SECTION
related references
The USING phrase
(COBOL for Windows Language Reference)