COBOL Manual for TNS/E Programs (H06.03+)

Program Compilation
HP COBOL Manual for TNS/E Programs520347-003
11-16
#RECEIVE Blocks
Delivering the Returned Value
When an ENTER statement has a GIVING phrase, the compiler generates code to
deliver the value that the program returns to a data item in the calling program. The
generated code performs any necessary scaling of the result value, then performs an
assignment according to the rules for an elementary move operation.
Linking the Object Code
When the compilation source text includes a separately compiled program, and the
compiler reports no error against that program, the target file includes the object code
for that program. The object code for nested programs is inseparable from the code for
their outermost separately compiled program.
When a separately compiled HP COBOL program or a non-COBOL program is
available in object form, and the compiler locates it using a file-mnemonic or
primary search list, the target file includes the object code for that program.
When the ECOBOL compiler finds a program in the ZCOBDLL, ZCREDLL, or
ECOBEXT file, the compiler validates parameters, but does not bind the object code
into the target file.
#RECEIVE Blocks
When the linker creates a run unit, it compares the #RECEIVE blocks of all the
programs and determines which argument values are to be used whenever another
HP COBOL object file opens $RECEIVE.
Table 11-3. How Final Values of #RECEIVE Arguments Are Chosen
#RECEIVE Argument Final Value
TABLE OCCURS Maximum value specified by a TABLE OCCURS argument in any
#RECEIVE block
SYNCDEPTH Maximum value specified by a SYNCDEPTH argument in any
#RECEIVE block
REPLY CONTAINS Maximum value specified by a REPLY CONTAINS argument in any
#RECEIVE block
REPORT Logical OR
QUEUE DEPTH Maximum value specified by a QUEUE DEPTH argument in any
#RECEIVE block*
* HP COBOL does not have a QUEUE DEPTH argument, so the value is assumed to be 1.