COBOL Manual for TNS/E Programs (H06.03+)
Procedure Division Verbs
HP COBOL Manual for TNS/E Programs—520347-003
9-25
CALL
7. The program name from Step 4 is converted back to uppercase and
compilation continues. When compilation ends (at the end of the source file), if
a COBOL program with the desired name has been compiled, then it is the
called program.
8. If no program is found using the above steps, then the calling program looks
for a VALUE phrase. If the VALUE phrase is absent, the calling program
assumes that the CALL statement is a COBOL CALL statement. It passes the
uppercase name to the eld utility and passes all parameters by reference as
extended addresses.
9. If the VALUE phrase is present, the calling program assumes that the CALL
statement is an X/Open CALL statement. It passes the name as it was
specified in program-name to the eld utility and passes all parameters as
extended addresses—the VALUE parameters by value and all others by
reference.
10. If you are calling a program written in a language other than COBOL, and it
has no VALUE parameters, you must make the program stub of the called
program available to the compiler using one of the files listed in Step 3.
11. If the program that program-name specifies is not available at execution
time, an exception exists.
12. If you want rld to run your program with unresolved externals, you must link
with either of these eld options:
•
-set rld_unresolved IGNORE
•
-set rld_unresolved WARN
•
Two COBOL Programs With the Same Name
Two or more COBOL programs in a run unit can have the same program name. If
this happens, the compilation distinguishes between them according to these
scope rules:
°
If program A lacks the COMMON attribute and is directly contained in program
B, then only CALL statements in B can call A.
°
If program A has the COMMON attribute and is directly contained in program
B, then only CALL statements in B and CALL statements in other programs
contained in B (except for A and those contained in A) can call A.
•
Linking a Program Called With a CALL identifier Statement
Binding or linking a program called with a CALL identifier statement into a run
unit is not automatic. Verify that all such programs are bound or linked into the run
unit by doing one of:
°
Compile all the program units in a single source file.
°
Use the eld utility to link them into the run unit (see the eld Manual).










