asm

Description

Compiles one or more Assembler program file(s) or Assembler linker file(s).

Parameters

Attribute Description Required
configuration The name of the active directive set configuration to be used when searching for directive set files. No
connectionName The name of the remote connection. No
destdir The name of the directory where the output(s) from the compilation of Assembler program(s) or Assembler linker file(s) are to be written. This attribute is not considered when the defaults in MF370CTL.CFG are changed. No
failonerror If true, stops the build process if the task exits with a return-code other than 0. Defaults to false. No
forcecompile If true, compiles an Assembler program or Assembler linker file even if it is not out-of-date. Defaults to false. No
is64Bit If true, compiles to a 64-bit target. Defaults to false (i.e. 32-bit target). No
projectName The name of the project. No
settingsDir The name of the active directive set settings directory. No
sourcetype The type of the Assembler source file that is to be compiled. Possible values are pgm (when the source file is an Assembler program) and lin (when the source file is an Assembler linker file). Defaults to pgm. No
srcdir The name of the directory containing the Assembler program(s) or Assembler linker file(s). Must not be used if nested mffilelist elements have been specified. Defaults to the current directory. No
srcfile The name of the Assembler program or Assembler linker file to be compiled. Must not be used if nested mffilelist elements have been specified. No
threadCount The maximum number of parallel compilations to be used. Defaults to 1. No
useDirectiveSet If true, this indicates that the build should search for a directive set file. Defaults to false. No
userEnv The name of the properties file that contains the user specified environment variables. No
verbose If true, causes additional informational messages to be displayed by the task. Defaults to false. No

Parameters specified as nested elements

fileset
Use nested <fileset> elements to specify the source file name(s) to be compiled.
mfdirlist
Use nested <mfdirlist> elements to specify directives to be used to compile the program(s). See mfdirlist.
mffilelist
Use nested <mffilelist> elements to specify the source file name(s) to be compiled and the macro locations. See mffilelist.

Errors and return codes

By default, the return code of an <asm> task is ignored. When you set failonerror="true", any non-zero response is treated as an error and means the build exits.

Examples

Compile a single Assembler program with resulting output files in an output directory:

<asm srcfile="Asm1.mlc" srcdir="${basedir}" destdir="${basedir}/bin" verbose="true" forcecompile="true" failonerror="true" sourcetype="pgm"/>

Compile a single Assembler program with directives specified in a nested mfdirlist element:

<asm srcfile="Asm1.mlc" srcdir="${basedir}" destdir="${basedir}/bin" verbose="true" forcecompile="true" failonerror="true" sourcetype="pgm">
    <mfdirlist>
    <directive name="ANIM"/>
    <directive name="OPT"/>
    <directive name="RENT"/>
    <directive name="LIST"/>
    <directive name="AUTOLINK"/>
    <directive name="REUS"/>
    <directive name="CALL"/>
    <directive name="AMODE(31)"/>
    <directive name="RMODE(31)"/>
    <directive name="NOMPC"/>
    <directive name="AAT"/>
    <directive name="SYSPARM()"/>
    </mfdirlist>
</asm>

Use a referenced mffilelist element to specify a set of Assembler program files that are to be compiled:

<mffilelist type="srcfile" id="asm_program_file_set_1" srcdir="${basedir}">
    <file name="Mlc1.mlc"/>
    <file name="Mlc2.mlc"/>
</mffilelist>

<asm destdir="${basedir}/bin" verbose="true" forcecompile="true" failonerror="true" sourcetype="pgm">
    <mffilelist refid="asm_program_file_set_1"/>
</asm>

Use a referenced mffilelist element to specify a set of Assembler linker files that are to be compiled, together with a referenced mfdirlist for directives:

<mffilelist type="srcfile" id="asm_linker_file_set_1" srcdir="${basedir}">
    <file name="Lin1.lin"/>
    <file name="Lin2.lin"/>
</mffilelist>

<mfdirlist id="asm_linker_file_directive_set_1">
    <directive name="ANIM"/>
    <directive name="RENT"/>
    <directive name="REUS"/>
    <directive name="CALL"/>
    <directive name="AMODE(31)"/>
    <directive name="NOLIST"/>
    <directive name="RMODE(31)"/>
</mfdirlist>

<asm destdir="${basedir}/bin" verbose="true" forcecompile="true" failonerror="true" sourcetype="lin">
    <mfdirlist refid="asm_linker_file_directive_set_1"/>
    <mffilelist refid="asm_linker_file_set_1"/>
</asm>