A SERVICE OF

logo

142 Chapter 3
Command Definitions C-E
COB74XL
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 choose to append the code from SUB to SOMEUSL in
MPE V/E, like this:
COBOLII MAIN, SOMEUSL
COBOLII SUB, SOMEUSL
PREP SOMEUSL, SOMEPROG
RUN SOMEPROG
However, the LINK command (in MPE/iX native mode) does not append SUB. On MPE/iX,
you must compile the source files into separate object files and then use the Link Editor to
link the two object files into the program file, as in this example:
COB74XL MAIN, OBJMAIN
COB74XL SUB, OBJSUB
LINK FROM=OBJMAIN,OBJSUB;TO=SOMEPROG
RUN SOMEPROG
On the other hand, if an NMRL is used instead of an NMOBJ, the above can be simplified to
the following:
BUILD RLFILE;DISC=10000;CODE=NMRL
COB74XL MAIN, RLFILE
COB74XL SUB, RLFILE
LINK RLFILE,SOMEPROG
RUN SOMEPROG
Related Information
Commands COB74XLG, COB74XLK, LINK, RUN, XEQ, LINKEDIT Utility
Manuals HP COBOL II/XL Reference Manual
HP COBOL II/XL Programmer's Guide
HP Link Editor/iX Reference Manual