MPE/iX Commands Reference Manual (32650-90877)

224 Chapter6
Command List IV
Commands FCOPY thru GETRIN
Use
This command may be issued from a session, job, or program. It may not be used in
BREAK. Pressing
Break suspends the execution of this command. Entering the RESUME
command continues the execution.
Examples
The following example compiles an HP FORTRAN 77/iX program entered from your
standard input device and stores the object program in the object file $OLDPASS. The listing
is then sent to your standard list device.
FTNXL
The next example compiles an HP FORTRAN 77/iX program contained in the disk file
FORTSRC, and stores the object program in the object file FORTOBJ. The program listing is
stored in the disk file LISTFILE.
FTNXL FORTSRC,FORTOBJ,LISTFILE
NOTE
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 linking code.
If you have created a program called MAIN and a subprogram called SUB, each contained in
a separate file, you might choose to handle it this way in MPE V/E:
FTN MAIN, SOMEUSL
FTN SUB, SOMEUSL
:
PREP SOMEUSL, SOMEPROG
:
RUN SOMEPROG
The second command appends the code from SUB to SOMEUSL.
However, LINK (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:
FTNXL MAIN, OBJMAIN
FTNXL 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
FTNXL MAIN, RLFILE
FTNXL SUB, RLFILE
LINK RLFILE,SOMEPROG
RUN SOMEPROG