COBOL Manual for TNS/E Programs (H06.03+)
Program Compilation
HP COBOL Manual for TNS/E Programs—520347-003
11-15
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 [TAL] “R” Impossible Yes Irrelevant Irrelevant Yes
Impossible No Yes Irrelevant Yes
ImpossibleNoNoYes Yes
Impossible No No No No, error
reported
Parameter Explanation
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.
REFERENCE When a formal parameter has the REFERENCE attribute, the actual
parameter supplies access to an object in the calling program.
When an actual parameter is an identifier, the compiler generates code to
pass the address of the associated data item to the called program. In this
case, the calling program and the called program must agree on the
interpretation of the data item value.
When an actual parameter is a file name, the compiler generates code to
pass the address of the file control block. Use this option only where
specified for a program supplied by HP.
OMITTED When the parameter in the calling program is specified by the reserved
word OMITTED, the compiler generates no code to convert or pass
anything. The calling program can use OMITTED only when the called
program has the EXTENSIBLE or VARIABLE attribute. The calling
program and the called program must agree on which operands can be
OMITTED.
Table 11-2. Resolution of External References (page 2 of 2)
Form
*
External reference found in ...
Target File
Created?
Current
Source
File
Primary
Search
List
Tertiary
Search
List
ECOBEXT,
ZCOBDLL, or
ZCREDLL
* Bracketed keywords are optional.










