Previous topic |
Next topic |
Contents |
Contact z/OS |
Library |
PDF
COBOL z/OS Language Environment Writing Interlanguage Communication Applications SA38-0684-00 |
|
For COBOL to use z/OS® parameter passing, use the USING BY REFERENCE phrase for CALL and PROCEDURE DIVISION statements:
Figure 1. Parameter passing
by reference
To pass a pointer to a copy of the parameters in COBOL, use the USING BY CONTENT phrase.
Figure 2. Parameter passing
by content
To pass a parameter value directly in the parameter list in COBOL, as C does, use the USING BY VALUE phrase.
Figure 3. Parameter passing
by value
To pass and/or receive a function value in COBOL, as C does, use the RETURNING phrase. The returned function value is accessed using register 15, so the COBOL RETURN-CODE special register cannot be used.
Figure 4. Parameter passing
returning R
|
Copyright IBM Corporation 1990, 2014
|