ims

Description

Generates one or more IMS files.

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 generated IMS build artefact(s) are to be written. No
failonerror Stop the build process if the task exits with a return-code other than 0. Defaults to false. No
forcecompile If true, generates IMS file(s) even if the source file(s) are not out-of-date. Defaults to false. No
genfiledir The name of the directory where the generated files(s) are to be written. No
gentype The type of source file to generate. The value of this attribute must be one of "dbd", "mfs" or "psb". Yes
imsdbdir The name of the directory where the IMS database for the current project is to be picked up from. No
is64bit If true, compiles a COBOL program 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
srcdir The name of the directory where the source files are to be picked up from. Must not be used if nested mffilelist elements have been specified. Defaults to the current directory. No
srcfile The name of the source file to be generated. 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 copybook locations. See mffilelist.

Errors and return codes

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

Examples

Generate all IMS build artefacts of type dbd for a referenced mffilelist element using the directives in a referenced mfdirlist element:

<mfdirlist id="dbd_directive_set_1">
    <directive name="LIST" value="Listing/DBD/*.lst"/>
</mfdirlist>

<mffilelist id="dbd_file_set_1" srcdir="${basedir}" type="srcfile">
    <file name="DEMO01.dbd"/>
</mffilelist>

<mffilelist id="imscpy.locations">
    <path type="imscpy" name="${basedir}/imscpybooks"/>
</mffilelist>

<ims destdir="${basedir}" forcecompile="true" failonerror="true" genfiledir="${basedir}" gentype="dbd">
    <mfdirlist refid="dbd_directive_set_1"/>
    <mffilelist refid="imscpy.locations"/>
    <mffilelist refid="dbd_file_set_1"/>
</ims>

Generate all IMS build artefacts of type psb for a nested mffilelist element using the directives in a nested mfdirlist element:

<ims destdir="${basedir}" forcecompile="true" failonerror="true" genfiledir="${basedir}" gentype="psb">
    <mfdirlist>
        <directive name="LIST" value="Listing/PSB/*.lst"/>
    </mfdirlist>
    <mffilelist>
        <path type="imscpy" name="${basedir}/imscpybooks"/>
    </mffilelist>
    <mffilelist srcdir="${basedir}" type="srcfile">
        <file name="DEMO02.psb"/>
    </mffilelist>
</ims>

Generate all IMS build artefacts of type mfs for a referenced mffilelist element using the directives in a referenced mfdirlist element:

<mfdirlist id="mfs_directive_set_1">
    <directive name="LIST" value="Listing/MFS/*.lst"/>
</mfdirlist>

<mffilelist id="mfs_file_set_1" srcdir="${basedir}" type="srcfile">
    <file name="DEMO03.mfs"/>
</mffilelist>

<mffilelist id="imscpy.locations">
    <path type="imscpy" name="${basedir}/imscpybooks"/>
</mffilelist>

<ims destdir="${basedir}" forcecompile="true" failonerror="true" genfiledir="${basedir}" gentype="mfs">
    <mfdirlist refid="mfs_directive_set_1"/>
    <mffilelist refid="imscpy.locations"/>
    <mffilelist refid="mfs_file_set_1"/>
</ims>