gtpi1m70 | System Installation Support Reference |
The following section describes the input to the MASM program.
Input to MASM is the partitioned data set containing the programs to be
assembled or compiled.
MASM requires the following data sets when executed:
- PDS
- DD card for the source libraries.
- MSGFILE
- SYSOUT data set containing diagnostic messages from the program and the
Assembly or Compilation Error Report.
- DRIVEIN
- Control card input files that select the program segments from the source
library (PDS).
If you request the listings-to-tape option, MASM needs 2 more data sets
defined:
- LIST
- DD statement for a SYSOUT device for listing of assemblies or compilations
with errors.
- LISTAPE
- DD statement specifying a tape or disk to hold the error-free listings
(see Figure 29).
The data sets described so far are those used by MASM directly. All
JCL cards normally required by either High-Level Assembler (HLASM) or a C or
C++ compiler are still required when running MASM, though MASM, in a few
cases, places extra requirements on them:
- The effects of MASM on the assembler:
- When MASM calls the assembler, the DECK parameter is used. This
places the object code into the data set specified by the SYSPUNCH data
definition. However, MASM disables the SYSLIN data set by passing the
NOOBJECT parameter to the assembler.
- MASM sets the assembler LINECOUNT to 55. See High Level Assembler /MVS & VM & VSE
Programmer's Guide for detailed information about this and other
assembler parameters.
- For a non-E-type program assembly, the SYSIN DD statement should point to
the same library as the PDS DD statement (see Figure 28).
- If you want to perform an E-type assembly, specify PARM=RT on the EXEC
card, specify a temporary data set in the SYSIN DD statement, and concatenate
the source library with the SYSLIB data set (see Figure 30). RENT should also be specified with RT to check for
reentrancy.
- As in any assembly, you must ensure that SYSLIB refers to the appropriate
macro, and if necessary, the appropriate source libraries.
- When the LIST and LISTAPE data sets are used, the assembler listings are
converted from fixed block machine (FBM) length 121 to fixed block ANSI (FBA)
length 133.
- The effects of MASM on the compiler:
- When MASM calls a C or C++ compiler, the object deck is placed into the
SYSLIN data set. The SYSPUNCH data set is not defined by the C or C++
compiler.
- The SYSLIB data set must point to the TPF-supplied C language
headers.
Attention: Do not add either the VM or MVS C language header
data set to SYSLIB.
These data sets have been deliberately omitted from the SIP-generated C
compilation procedures. The VM and MVS headers provide some functions
that are incompatible with the TPF system environment. If these headers
were added, the C program segment might compile without errors or warnings,
but would not be usable in a TPF system environment.
- MASM sets the following C or C++ compiler options that you cannot
change: LIST, OFFSET, SOURCE, NOSTART, NOANSIALIAS, and
AGGRC(OVERLAY). You can change the FLAG, LSEARCH, SEARCH, RENT,
OPTIMIZE, and LONGNAME options. All other parameters are allowed to
default. See your compiler User's Guide for detailed information
about these and other compiler options.
- OPT(n) passes the OPTIMIZE option to the compiler exactly as you
code it. Valid values for n are OPT(0), OPT(1), and
OPT(2). The default is OPT(2). You can also use OPT and
NOOPT.
- Note:
- See the OS/390 C/C++ User's Guide to
understand what effect these parameters have on the IBM OS/390 compiler
that you are using. For example, on some compilers OPT(1) is the same
as OPT(2), and OPT has the same effect as OPT (1).
- Either the RENT or NORENT option can be specified for a C or C++
program.
- For E-type compilations, specify PARM=RT on the EXEC card and
specify a temporary data set in the SYSIN DD statement (see Figure 31).
- When the LIST and LISTAPE data sets are used, the compiler listings are
converted from variable block length 137 to fixed block ANSI (FBA) length
133.
The following are the user options that are available as execution
parameters:
- TAPE
- Error-free assembly listing are put to tape.
- Note:
- This requires you to include a LISTAPE and LIST DD statement and to change
the SYSPRINT (or SYSCPRT for C) DD statement.
See Multiple Assembly/Compilation Print Program for the subsequent listing of the tape.
- SHORT
- See your appropriate assembler user's guide. (Not valid for a
C or C++ compiler.)
- XREF
- See your appropriate assembler user's guide.
- NOXREF
- See your appropriate assembler user's guide. NOXREF is the
default value. If XREF is requested, it is expanded to XREF(FULL) by
MASM.
- RT
- Indicates to MASM that real-time programs are being assembled or
compiled.
- Note:
- Requires a temporary data set for the SYSIN data definition.
For the assembler, the source libraries must be concatenated to the
SYSLIB data definition. For a C or C++ compiler, the only data sets
that can be concatenated are data sets containing C language headers.
- I
- MASM passes the program to the High Level Assembler (HLASM).
- RENT
- Passes the RENT option to the assembler or C or C++ compiler. This
causes the assembler or C compiler to verify that a segment is
reentrant. The RENT option is ignored if you specify the TARGET(TPF)
option.
- Note:
- C++ programs are always compiled as reentrant regardless of whether you
specify RENT or NORENT.
- NORENT
- Passes the NORENT option to the assembler or C or C++ compiler. The
assembler or C or C++ compiler will not do reentrancy checking. The
NORENT option is ignored if you specify the TARGET(TPF) option.
- Note:
- C++ programs are always compiled as reentrant regardless of whether you
specify RENT or NORENT.
- G
- MASM passes the program to the IBM OS/390 C/C++ compiler and the program
is compiled as C code.
- GPP
- MASM passes the program to the IBM OS/390 C/C++ Release 2 or Release 3
compiler and the program is compiled as C++ code.
- DLL
- Passes the DLL option to the compiler. This option is valid only
for the IBM C/C++ for MVS/ESA Version 3 Release 2 and IBM OS/390 C/C++
compilers. This option is valid for C programs only; the parameter
is ignored for C++ programs.
- NODLL
- Passes the NODLL option to the compiler. The parameter is ignored
for C++ programs.
- FL(x)
- A C or C++ compiler FLAG option, where x can equal I, W, E, or
S.
- Note:
- The value of x defaults to E for the C++ compiler.
- LSE(yyyyy)
- A C or C++ compiler LSEARCH option, where yyyyy can be any MVS
data set containing user include files.
- SE(zzzzz)
- A C or C++ compiler SEARCH option, where zzzzz can be any MVS
data set containing system include files.
- OPT(n)
- Passes the OPTIMIZE option to the compiler exactly as you code it.
Valid values for n are OPT(0), OPT(1), and OPT(2). The
default is OPT(2). You can also use OPT and NOOPT.
- Note:
- See the OS/390 C/C++ User's Guide to
understand what effect these parameters have on the IBM OS/390 compiler
that you are using. For example, on some compilers OPT(1) is the same
as OPT(2), and OPT has the same effect as OPT (1).
- LONGNAME
- Passes the LONGNAME option to the compiler.
- NOLONGNAME
- Passes the NOLONGNAME option to the compiler.
- TARGET(TPF)
- Passes the TARGET(TPF) option to the C or C++ compiler. This
parameter must be specified for TARGET(TPF) E-type programs and must not be
specified for C load module E-type programs.
The control card options provide the following facilities:
- Assemble or compile the entire directory (no control cards)
- Assemble or compile a list of programs
- Assemble or compile from a specified program to the end of the directory
- Assemble or compile from the beginning of the directory to and including a
specified program
- Assemble or compile a range of programs in a directory
- Attach a suffix to all object module names
- Option 1:
- Assemble or compile the entire directory
If no control cards are specified, all programs in the PDS directory will
be assembled/compiled. The DRIVEIN DD card may appear as follows:
//DRIVEIN DD DUMMY
or:
//DRIVEIN DD *
/*
- Option 2:
- Assemble or compile a list of programs
- Format:
-
LIST=name
LIST=(name1,name2,name3,...........name9)
One or more programs for C and one program for C++ can be supplied in the
LIST option. If there is only one program in the list, parentheses are
not required. The program names are not required to be in any
order; however, it is recommended that they appear in the order found in
the directory (alphabetic).
A list can appear on several cards. The following example shows a
list continued on more than one line:
LIST=(BMGL,BMPOX,CPTX,DMPO,
DMP1,SNXPD,
ZAPX,ZAPY,ZAPZ)
- Note:
- A list must be enclosed in parentheses (if more than one name). If
continued on the next card, the last name of the previous card must be
followed by a comma. There are no column restrictions.
- Option 3:
- Assemble or compile FROM option
- Format:
- FROM=name
This option allows one to assemble or compile all programs beginning with
the specified FROM name through the end of the directory.
- Option 4:
- Assemble or compile TO option
- Format:
- TO=name
This option allows one to assemble or compile all programs from the
beginning of the directory to and including the specified TO name.
- Option 5:
- Assemble or compile a range of programs
- Format:
- FROM = name1,TO = name2
This option will assemble or compile all programs in the directory from
name1 through name2 inclusive.
- Option 6:
- Attach a SUFFIX
- Format:
- SUFFIX = xx
This option allows you to specify a suffix that will be attached to the
object module name. The suffix can contain as many as 6 alphanumeric
characters. There is one requirement for this option. It must
precede the option (1-5) for which it is to apply.
- Note:
- You must consider the final length of the concatenated name, which cannot
exceed 8 characters. If greater than 8, the program will not be
assembled or compiled and a diagnostic will appear.
Options 1-5 are considered as individual tasks. One task can appear
on one line. The suffix parameter can precede any or all tasks
requested.
- Example 1:
- LIST=BMP0
Assemble or compile the program called BMP0.
- Example 2:
- SUFFIX=53,TO=DGR0
Assemble or compile all programs from the beginning of the directory to and
including the program DGR0. Attach the suffix 53 to all object module
names.
- Example 3:
- SUFFIX=54
Assemble or compile the entire directory, attaching the suffix 54 to all
object module names.
- Example 4:
- LIST=(BMP0,CRAS,DGR0)
Assemble or compile the 3 programs specified in the list.
- Example 5:
-
LIST=(BMP0,
CRAS,
DGR0)
An alternate way of showing Example 4.
- Example 6:
-
TO=CRAS
LIST=(DGR0,ASMM,ZAPX,ZAPY)
- Task 1:
- Assemble or compile from the beginning of the directory to and including
CRAS.
- Task 2:
- Assemble or compile the programs specified in the list.
- Example 7:
-
SUFFIX=44,LIST=(BMP1,BMP2)
FROM=ZAPA,
TO=ZAPF
SUFFIX=55,LIST=CRAS
- Task 1:
- Assemble or compile programs BMP1 and BMP2, attaching the suffix 44 to the
object modules.
- Task 2:
- Assemble or compile all programs between ZAPA AND ZAPF inclusive (no
suffix requested).
- Task 3:
- Assemble or compile the program CRAS attaching the suffix 55.
Following are some helpful hints and considerations for using the Multiple
Assembly/Compilation Program.
- Use the TIME parameter if your system has a maximum time limit for a
job. In estimating assembly or compilation time, consideration should
be given to the total number of assemblies or compilations requested.
- Under MVS, there is the possibility that the SYSOUT data set may run out
of space if many assemblies or compilations are done in one run. Either
provide more space for the SYSOUT data set (SYSPRINT DD card for assembler, or
SYSCPRT DD card for C), or go directly to the printer.
- Compile only one C++ program at a time with the LIST=control card because
the compiler creates names for static initialization routines based on the job
name and time stamp of the job. If more than one program has a static
initialization routine and those programs are linked together at a later time,
the link-edit will fail because the names for all static initialization
routines will be the same.
- Check CAREFULLY the macro libraries assigned to the SYSLIB DD. This
is not new to anyone running assembly jobs. However, when many
assemblies are being run, the entire run could be wasted if the wrong macro
library is used.
- When using the TAPE parameter be sure to provide a tape initialized in the
same manner as the LISTAPE data definition specifies (for example, standard
label, device type, and others).
- If desired with the TAPE parameter, the LISTAPE data definition can
specify a DASD. If so, carefully calculate the amount of space needed
based on number, size, and whether XREF is requested. The DCB
definition is preset at RECFM=FBA and LRECL=133 with the BLKSIZE user variable
based on needs (a multiple of LRECL).