Coding the PROCEDURE DIVISION for passing arguments
If you pass an argument BY VALUE
, code the
USING BY VALUE
clause in the PROCEDURE DIVISION
header
of the subprogram.
If you pass
an argument BY REFERENCE
or BY CONTENT
,
you do not need to indicate in the header how
the argument was passed.
PROCEDURE DIVISION USING BY VALUE. . .
PROCEDURE DIVISION USING. . .
PROCEDURE DIVISION USING BY REFERENCE. . .
The first header above indicates that the data items are passed
BY VALUE
; the second or third headers indicate that
the
items are passed BY REFERENCE
or BY CONTENT
.
related references
The procedure division header (Enterprise COBOL for z/OS® Language Reference)
The USING phrase (Enterprise COBOL for z/OS Language Reference)
CALL statement (Enterprise COBOL for z/OS Language Reference)
The procedure division header (Enterprise COBOL for z/OS® Language Reference)
The USING phrase (Enterprise COBOL for z/OS Language Reference)
CALL statement (Enterprise COBOL for z/OS Language Reference)