ASSEMBLE

CMS Commands

assemble.helpcmd.txt
ASSEMBLE                                                  CMS User Area command

Use the ASSEMBLE command to invoke the assembler to assemble a file containing
source statements.  Assembler processing and output is controlled by the
options selected.  The format of the ASSEMBLE command is:
+----------+------------------------------------------------------------------+
| Assemble | fn [(options...[)]]                                              |
|          |                                                                  |
|          | listing control options:                                         |
|          |    ALOGIC|NOALOGIC     ESD|NOESD           FLAG(0)|FLAG(nnn)     |
|          |    LINECOUN(55|nn)     LIST|NOLIST         NOMCALL|MCALL         |
|          |    NOMLOGIC|MLOGIC     RLD|NORLD           NOLIBMAC|LIBMAC       |
|          |    XREF(FULL|SHORT)|NOXREF                 DIsk|PRint|NOPRint    |
|          | output control options:                                          |
|          |    NODECK|DECK         OBJect|NOOBJect     NOTEST|TEST           |
|          | SYSTERM control options:                                         |
|          |    NUMber|NONUM        STMT|NOSTMT         TERMinal|NOTERM       |
|          | other options:                                                   |
|          |    ALIGN|NOALIGN       BUFSIZE(amount)     RENT|NORENT           |
|          |    SYSPARM(string)|()|(?)                  YFLAG|NOYFLAG         |
+----------+------------------------------------------------------------------+
where:

fn       is the filename of the source file to be assembled and/or the filename
         of assembler output files.  The file must have fixed-length,
         80-character records.  By default, the assembler expects a CMS file
         with a filetype of ASSEMBLE.

Listing control options:

Use these options to control the assembler listing.  The default values are
listed first.

NOALOGIC|ALOGIC
         does not list or lists conditional assembly statements in open code.

NOEST|ESD
         does not list or lists the external symbol dictionary (ESD).

FLAG (0)|(nnn)
         does not include diagnostic messages and MNOTE messages below severity
         code nnn in the listing.  Diagnostic messages can have severity codes
         of 4, 8, 12, 16, or 20 (20 is the most severe); and MNOTE message
         severity codes can be between 0 and 255.  For example, FLAG (8)
         suppresses diagnostic messages with a severity code of 4 and MNOTE
         messages with severity codes of 0 through 7.

LINECOUN (55)|(nn)
         nn specifies the number of lines to be listed per page.

NOLIST|LIST
         does not produce or produces an assembler listing.  Any previous
         listing is erased.  NOLIST overrides ESD, RLD, and XREF.

NOMCALL|MCALL
         does not list or lists the inner macro instructions encountered during
         macro generation following their respective outer macro instructions.
         The assembler assigns statement numbers to these instructions.  The
         MCALL option is implied by the MLOGIC option; NOMCALL has no effect if
         MLOGIC is specified.

NOMLOGIC|MLOGIC
         does not list or lists all statements of a macro definition processed
         during macro generation after the macro instruction.  The assembler
         assigns statement numbers to them.

NORLD|RLD
         does not produce or produces the relocation dictionary (RLD) as part
         of the listing.

NOLIBMAC|LIBMAC
         does not list or lists the macro definitions read from the macro
         libraries and any assembler statements following the logical END
         statement.  The logical END statement is the first END statement
         processed during macro generation.  It may appear in a macro or in
         open code; it may even be created by substitution.  The assembler
         assigns statement numbers to the statements that follow the logical
         END statement.

XREF (FULL)
         includes in the assembler listing a cross-reference table of all
         symbols used in the assembly.  This includes symbols that are defined
         but never referenced.  The assembler listing also contains a cross-
         reference table of literals used in the assembly.
XREF (SHORT)
         includes in the assembler listing a cross-reference table of all
         symbols that are referenced in the assembly.  Any symbols defined but
         not referenced are not included in the table.  The assembler listing
         contains a cross-reference table of literals used in the assembly.
NOXREF   does not print the cross-reference tables.

DIsk     places the LISTING file on a virtual disk, searching for the disk in
         the following order:
         1.  An accessed read/write disk from which the source is read.
         2.  The  read/write "parent" disk, if the disk from which the source
             is read is a read/only extension.
         3.  The primary A disk with read/write access.
         If the primary A disk is not accessed read/write and the first two
         items do not apply, an error message is displayed.
PRint    writes the LISTING file to the printer.
NOPRint  suppresses the printing of the LISTING file.

Output control options:

The output control options are used to control the object module output of the
assembler.

NODECK|DECK
         does not write or writes the object module on the device specified on
         the FILEDEF statement for PUNCH.  If this option is specified with the
         OBJECT option, the object module is written both on the PUNCH and TEXT
         files.

NOOBJect|OBJect
         does not write, or writes the object module on the device, which is
         specified by the FILEDEF statement for TEXT, and erases any previous
         object modules.  If this option is specified with the DECK option, the
         object module is written on the two devices specified in the FILEDEF
         statement for TEXT and PUNCH.

NOTEST|TEST
         does not include or includes the special source symbol table (SYM
         cards) in the object module.  This option should not be used for
         programs to be run under CMS because the SYM cards are not acceptable
         to the CMS LOAD and INCLUDE commands.

SYSTERM options:

The SYSTERM options are used to control the SYSTERM file associated with your
assembly.

NONUM|NUMber
         does not write or writes the line number field (columns 73-80 of the
         input records) in the SYSTERM listing for statements for which
         diagnostic information is given.  This option is valid only if
         TERMINAL is specified.

NOSTMT|STMT
         does not write or writes the statement number assigned by the
         assembler in the SYSTERM listing for statements for which diagnostic
         information is given.  This option is valid only if TERMINAL is
         specified.

NOTERM|TERMinal
         does not write, or writes the diagnostic information on the SYSTERM
         data set.  The diagnostic information consists of the diagnosed
         statement followed by the error message issued.

Other options:

The following options allow you to specify various functions and values for the
assembler.

ALIGN|ALGN
         aligns all data on the proper boundary in the object module; for
         example, an F-type constant is aligned on a fullword boundary.  In
         addition, the assembler checks storage addresses used in machine
         instructions for alignment violations.
NOALIGN|NOALGN
         does not align data areas other than those specified in CCW
         instructions.  The assembler does not skip bytes to align constants on
         proper boundaries.  Alignment violations in machine instructions are
         not diagnosed.

BUFSIZE (amount)
         specifies the buffer size to be used by the assembler:
            STD chooses the buffer size that gives optimum performance.  The
                buffer size depends on the amount of virtual storage.  Of the
                assembler working storage in excess of minimum requirements,
                37% is allocated to the utility data set buffers and the rest
                to macro generation dictionaries.
            MIN uses the minimum buffer sizes (790 bytes) for each of the
                utility data sets (SYSUT1, SYSUT2, and SYSUT3).  Storage
                normally used for buffers is allocated to work space.  Because
                more work space is available, more complex programs can be
                assembled in a given virtual storage size; but the speed of the
                assembly is substantially reduced.
            MAX is useful when many macros and/or large macros are used in an
                assembly.  The assembler uses up to 15 save areas for input
                records and saves the areas according to their frequency of
                use, optimizing the macro generation phase.  This option has no
                effect unless a large enough region is available.  The number
                of allocated save areas is printed on the statistics page of
                the assembler listing.  Refer to the OS/VS-VM/370 Assembler
                Programmer's Guide, Appendix E for a description of the effects
                of BUFSIZE.

NORENT|RENT
         does not check or checks your program for a possible violation of
         program re-enterability.  Code that makes your program nonre-enterable
         is identified by an error message.

NOYFLAG|YFLAG
         suppresses or does not suppress the warning messages that indicate
         that relocatable Y-type address constants have been declared.

SYSPARM (string)|()|(?)
         passes a character value to the system variable symbol, SYSPARM.  The
         variable (string) may be up to 100 characters long, and may not
         contain any blanks or parentheses.  If you want to enter a string
         containing blanks or parentheses, use the SYSPARM (?) format.  With
         the SYSPARM (?) format, CMS prompts you with the message:
            ENTER SYSPARM:
         You can enter up to 100 characters.  SYSPARM () enters a null string
         of characters.  Note:  If ASSEMBLE is called as a command, the SYSPARM
         information is translated to uppercase.


Usage notes:

1.  When you issue the ASSEMBLE command, default FILEDEF commands are issued
    for assembler data sets.  You may want to override these with explicit
    FILEDEF commands.  The ddnames used by the assembler are:
         ASSEMBLE  (SYSIN input to the assembler)
         TEXT      (SYSLIN output of the assembler)
         LISTING   (SYSPRINT output of the assembler)
         PUNCH     (SYSPUNCH output of the assembler)
         CMSLIB    (SYSLIB input to the assembler)
         SYSUT1    (workfile of the assembler)
         SYSUT2    (workfile of the assembler)
         SYSUT3    (workfile of the assembler)
    The default FILEDEF commands issued by the assembler for these ddnames are:
         FILEDEF ASSEMBLE DISK fn ASSEMBLE fm (RECFM FB LRECL 80 BLOCK 800
         FILEDEF TEXT DISK fn TEXT fm
         FILEDEF LISTING DISK fn LISTING fm (RECFM FBA BLOCK 1210
         FILEDEF PUNCH PUNCH
         FILEDEF CMSLIB DISK CMSLIB MACLIB * (RECFM FB LRECL 80 BLOCK 800
         FILEDEF SYSUT1 DISK fn SYSUT1 fm4 (BLOCK 7294 AUXPROC asmproc
         FILEDEF SYSUT2 DISK fn SYSUT2 fm4 (BLOCK 7294 AUXPROC asmproc
         FILEDEF SYSUT3 DISK fn SYSUT3 fm4 (BLOCK 7294 AUXPROC asmproc
    At the completion of the ASSEMBLE command, all FILEDEFs that do not have
    the PERM option are erased.

2.  If you want to use any CMS macro or copy libraries during an assembly,
    issue the GLOBAL command to identify the macro libraries before you issue
    the ASSEMBLE command.  For example:
         global maclib cmslib osmacro testlib
    identifies the MACLIB files named CMSLIB, OSMACRO, and TESTLIB.

3.  To use OS macro libraries during an assembly, issue the FILEDEF command for
    the OS data set.  Use a ddname of CMSLIB and assign a CMS file identifier;
    the filetype must be MACLIB, and you must use the filename on the GLOBAL
    command line.  For example:
         filedef cmslib disk oldtest maclib c dsn oldtest macros
         global maclib oldtest
    assigns the OS data set OLDTEST.MACROS, on the disk accessed as mode C, a
    CMS fileid of OLDTEST MACLIB and identifies it as the macro library to be
    used during assembly.

4.  You cannot assemble programs using DOS macros from the DOS/VS source
    statement libraries under CMS/DOS.  You should use the SSERV, ESERV, and
    MACLIB commands to create CMS MACLIBs to contain DOS macros for assembly
    under CMS/DOS.

5.  You need not make any logical assignments for input or output files when
    you use the assembler under CMS/DOS.  File definitions are assigned by
    default under CMS, as described in Usage Note 1.

8.  When assembling large files you may want to issue your own FILEDEF for the
    SYSUTn data sets omitting the AUXPROC option to avoid a DISK FULL
    condition.  CMS builds the SYSUT1 data set incore until there is no more
    space to hold the data set at which time the file is placed on disk. The
    SYSUTn files are changed to have record length 8000 and record format
    fixed.  When not processing with the AUXPROC option, there is no incore
    file built.  The SYSUTn files are built only on the disk with record format
    V, record length 7294.

Responses:

Responses are documented in IBM OS/VS and VM/370 Assembler Programmer's Guide,
GC33-4021, available from bitsavers.org.