COBOL Manual for TNS/E Programs (H06.03+)
Procedure Division Verbs
HP COBOL Manual for TNS/E Programs—520347-003
9-57
ENTER
OMITTED
must be specified in place of any omitted parameter surrounded by other
parameters (because parameters are recognized by their order). OMITTED is only
permitted when the called routine has the VARIABLE or the EXTENSIBLE
attribute.
return-value
is a numeric or numeric edited elementary data item where the return value is
stored when the called routine is a function. The return-value can be a 2-byte,
4-byte, or 8-byte integer or a 4-byte or 8-byte floating-point value (in TAL terms:
INT, INT(32), FIXED, REAL, or REAL(64)).
Usage Considerations:
•
language
If you call a routine with a particular value of language (or with language
omitted), you must use the same value of language each time you call that
routine in the same compilation unit.
•
file-mnemonic
If you specify file-mnemonic but the compiler does not find the called routine in
the associated object file, the compiler reports an error. For information on
resolving external references, see Finding the Entered Program.
•
USING Phrase
The number and type of the parameters in the USING phrase must be compatible
with the expectations of the called routine. The called routine might interpret the
parameters slightly differently than the calling program does (see Appendix B, Data
Type Correspondence).
•
GIVING Phrase
When calling a function (a routine that returns a value), include a GIVING phrase in
the ENTER statement. When control returns to the COBOL program, the value that
the function returns is assigned to return-value.
Scaling of the function’s value (if needed) is performed before the value is
assigned to return-value. If the function’s value is larger than the maximum
value allowed for a COBOL identifier, the COBOL program terminates with an
arithmetic overflow condition during the conversion process. The assignment
operation follows MOVE conventions (see MOVE TO).










