COB85XL [ MPE/iX Commands Reference Manual Volume I ] MPE/iX 5.0 Documentation
MPE/iX Commands Reference Manual Volume I
COB85XL
Compiles an HP COBOL II/iX program using the 1985 ANSI standard entry
point and creates an object file. HP COBOL II/iX is not part of the 900
Series HP 3000 Computer System Fundamental Operating Software and must be
purchased separately. This command is recognized only if HP COBOL II/iX
is installed on your system. (Native Mode)
Syntax
COB85XL [textfile] [,[objectfile][,[listfile][,[masterfile][,newfile]]]]
[;INFO=quotedstring][;WKSP=workspacename] [;XDB=xdbfilename]
NOTE This command follows the optional MPE/iX command line syntax.
Refer to "Optional Format for MPE/iX Commands" at the beginning of
this chapter.
Parameters
textfile The name of the file that contains the source code
that is to be compiled. This can be any ASCII or
toolset access method (TSAM) file. The formal file
designator is COBTEXT.
If you are running HP COBOL II/iX from your
terminal, you will probably specify a disk
textfile. If you do not specify textfile, the
default file is $STDIN. $STDIN is the current input
device, usually your terminal.
objectfile Actual file designator of the object file, which is
the output of the compiler. This file is stored in
binary form and has a file code of either NMOBJ
(1461) or NMRL (1033). Its formal file designator
is COBOBJ. If the objectfile parameter is omitted,
the object code is saved to the temporary file
$OLDPASS if it exists, or to $NEWPASS which then
becomes $OLDPASS.
If you specify objectfile, the compiler stores the
object file in a permanent file of the correct
size, type, and name you specified.
If either a file of the same name or the default
file $OLDPASS already exists, the new object code
overwrites the old if the file code is NMOBJ or is
appended to the old if the file code is NMRL. If
the file code is NMRL, any existing version of the
code module is first purged.
Refer to the HP COBOL/XL Programmer's Guide
(31500-90002) for information on the RLINIT and
RLFILE commands that cause creation of an NMRL by
default or initialization.
The compiler may issue an error message telling you
that a new or existing object file is too small to
contain the compiler's output or number of modules.
In that case you must build a larger file or use
the Link Editor to clean the NMRL. You may then
recompile to the new file.
You may use the MPE/iX SAVE command to store
$OLDPASS as a permanent file under another name.
listfile The name of the file to which the compiler writes
the program listing. This can be any ASCII file.
The formal file designator is COBLIST. If you do
not specify listfile, the default is $STDLIST.
$STDLIST is usually the terminal in a session or
the printer in a batch job.
masterfile Actual file designator of the master file with
which textfile is merged to produce a composite
source. This can be any ASCII input file. The
formal designator is COBMAST. Default is that the
master file is not read; input is read from
textfile, or from $STDIN if textfile is not
specified.
newfile Actual file designator of the merged textfile and
masterfile. This can be any ASCII output file.
Formal file designator is COBNEW. Default is that
no file is written.
quotedstring A quoted string of no more than 255 characters,
including the single or double quotation marks that
enclose it, that specifies compile time options.
The quotedstring string may be used to pass
dollar sign ($) commands to the compiler:
"$command1$command2$command3...". The $ must be
the first character in the string, and it must be
used to separate multiple commands. To extend the
quotedstring string over more than one physical
line make an ampersand (&) the last character of
one line and continue the quotedstring string onto
the next physical line. Each $ command is limited
in length to the same size as in the source file:
COB85XL SALARIES,SALOBJ;INFO="$CONTROL &
BOUNDS,MAP,VERBS$SET &$X9=ON" &
COB85XL ACCOUNTS;INFO="$DEFINE %A=5#"
workspacename This parameter is the actual file designator of an
HPToolset workspace. The formal file designator is
COBWKSP.
xdbfilename Actual file designator for the file to be used by
the symbolic debugger (XDB). This is a permanent
file created by the compiler that contains the
listing of the source files. The formal file
designator is COBXDB.
If this file exists, then it must be in a special
format created by a previous compile using this
option. In this case it is first purged. If the
file is of the wrong type, the compile is not
attempted. The user must either use a different
name or purge the file.
Once the file is created, XDB expects the fully
qualified name of the file to be unchanged. A FILE
equation could be used if the file is renamed.
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:
BUILD RLFILE;DISC=10000;CODE=NMRL
COB85XL MAIN, RLFILE
COB85XL SUB, RLFILE
LINK RLFILE, SOMEPROG
RUN SOMEPROG
Related Information
Commands COB85XLG, COB85XLK, LINK, RUN, XEQ, LINKEDIT Utility
Manuals HP COBOL II/XL Reference Manual (31500-90001)
HP COBOL II/XL Programmer's Guide (31500-90002)
HP Link Editor/iX Reference Manual (32650-90030)
MPE/iX 5.0 Documentation