
Chapter 3 151
Command Definitions C-E
COB85XL
Operation Notes
The COB85XL command compiles an HP COBOL II/iX program into an object file on disk.
If you do not specify textfile, HP COBOL II/iX expects the source text to be entered from
your standard input device. If you do not specify listfile, HP COBOL II/iX sends the
program listing to the current list device.
You cannot backreference the formal file designators used in this command (COBTEXT,
COBOBJ, COBLIST, COBMAST, COBNEW, COBWKSP, and COBXDB) as actual file designators in
the command parameter list. For further information, refer to the "Implicit FILE
Commands for Subsystems" discussion of the FILE command.
NOTE This command is implemented as a command file. If you set the HPPATH
variable to null (SETVAR HPPATH ""), the command file is not executed, and
the command fails.
Use
This command may be issued from a session, job, or program but not in BREAK. Pressing
Break suspends the execution of this command. Entering the RESUME command continues
the execution.
Examples
To compile an HP COBOL II/iX program stored in the file SOURCE into an object file called
OBJECT, and send the listing to the disk file LISTFL, enter:
COB85XL SOURCE,OBJECT,LISTFL
Program development in native mode uses the MPE/iX LINK command not the MPE V/E
PREP command. This produces a significant change in the method of compiling code. For
example, if you have created a program called MAIN and a subprogram called SUB, each
contained in a separate file, you might append the code from SUB to SOMEUSL in MPE V/E,
like this:
COBOLII MAIN, SOMEUSL
COBOLII SUB, SOMEUSL
PREP SOMEUSL, SOMEPROG
RUN SOMEPROG
When using NMOBJ, however, the COB85XL command (in MPE/iX native mode) does not
append SUB. MPE/iX compiles the source files into separate object files and then uses the
Link Editor to link the two object files into the program file, as in this example:
COB85XL MAIN, OBJMAIN
COB85XL SUB, OBJSUB
LINK FROM=OBJMAIN,OBJSUB;TP=SOMEPROG
RUN SOMEPROG
On the other hand, if an NMRL is used instead of an NMOBJ, the above can be simplified to
the following: