COBOL Manual for TNS and TNS/R Programs
Program Compilation
HP COBOL Manual for TNS and TNS/R Programs—522555-006
11-22
CALL and ENTER Statement Processing: Detailed
Explanation
Presenting Parameters to the Called Program
A formal parameter in the called program can have one of two attributes: value or
reference. Depending on the description of the actual parameter in the calling program
and the description of the formal parameter in the called program, the compiler
generates code to convert the value of the actual parameter to match the description of
the formal parameter
ENTER [language ]
“R”
Impossible Yes Irrelevant Irrelevant Yes
Impossible No Irrelevant Irrelevant No, error
reported
ENTER [TAL] “R” IN
MNEM
Search list not used—ENTER is qualified
ENTER [TAL] “R” Impossible Yes Irrelevant Irrelevant Yes
Impossible No Yes Irrelevant Yes
ImpossibleNoNoYes Yes
Impossible No No No No, error
reported
Parameter Explanation (page 1 of 2)
VALUE When a formal parameter in the called routine has the VALUE attribute
and is numeric, the compiler generates any code necessary to evaluate
the actual parameter, convert the value to the expected representation and
scaling, and pass the value to the called program.
When a formal parameter has the VALUE attribute but is nonnumeric, the
compiler generates code to pass the value to the called program.
When an actual parameter in the calling program is a literal or an
arithmetic expression, the corresponding formal parameter must have the
VALUE attribute.
Table 11-4. Resolution of External References (NMCOBOL
Compiler) (page 2 of 2)
Form
*
External reference found in ...
Target File
Created?
Current
Source
File
Primary
Search
List
Tertiary
Search
List
NMCOBEXT,
ZCOBSRL, or
ZCRESRL
* Bracketed keywords are optional.