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

The error logging file is not an EDIT file. You can use it only with the FIXERRS TACL macro. For
more information about the FIXERRS macro, see FIXERRS Macro (page 700). For more information
about the ERRORFILE directive, see ERRORFILE (page 549).
IN and OUT are options of the TACL command RUN. Other RUN command options that you might
find useful when compiling HP COBOL programs are:
NOWAIT
If you specify
ECOBOL /IN XYZ, OUT $SPX.#LPPR, NOWAIT/; RUNNABLE
the TACL program does not wait while the compiler runs, but returns a TACL prompt after
starting the compiler. (The compiler runs in the background.)
CPU
If you specify
ECOBOL /IN XYZ, OUT $SPX.#LPPR, CPU 7/; RUNNABLE
the compiler runs in processor seven (processors are numbered from 0 through 15).
For more information about these and additional RUN commands, see the TACL Reference Manual.
Using an HP editor, you can create OBEY command files. OBEY command files contain TACL
commands, such as the ECOBOL command, which are executed when you specify the name of
the OBEY command file in an OBEY command. Here is a sample session:
45> EDIT CFILE1
TEXT EDITOR - T9601D10 - (08JUN92)
$VOL3.SUBVOL2.CFILE1 DOES NOT EXIST. SHALL I CREATE IT? Y
CURRENT FILE IS $VOL3.SUBVOL2.CFILE1
*ADD
1 ECOBOL /IN XYZ,OUT $SPX.#HOLD/
2 //
*EXIT
46> OBEY CFILE1
The command OBEY CFILE1 causes execution of the command:
ECOBOL /IN XYZ,OUT $SPX.#HOLD/
An OBEY command file can contain more than one command. If another OBEY command file,
CFILE2, contains the commands
ECOBOL /IN XYZ,OUT $SPX.#HOLD/
PERUSE
the command OBEY CFILE2 is equivalent to the command series
47> ECOBOL /IN XYZ,OUT $SPX.#HOLD/
48> PERUSE
For more information about OBEY command files, see the Guardian User’s Guide.
Naming the Object File
To simplify the compilation examples in the preceding topic, no name is specified for the object
file that the compiler produces. In these examples, the object file is given the default name RUNUNIT.
To specify a name for the object file, type the name after the final slash, as in this example, which
names the object file XYZOBJ:
88> ECOBOL /IN XYZ, OUT $SPX/ XYZOBJ; RUNNABLE
Although program compilation is a single-step process from the user’s viewpoint, producing a
loadfile actually involves the linker. The linker resolves the external references in CALL and ENTER
statements and the implicit calls to HP COBOL run-time library routines that many HP COBOL
statements cause.
If you specify the CALL-SHARED and RUNNABLE directives, and there are no compilation errors,
the ECOBOL compiler calls the eld utility, which produces a PIC loadfile. If you specify the SHARED
754 Creating and Compiling HP COBOL Source Programs