cobol

Description

Compiles one or more COBOL programs.

Parameters

Attribute Description Required
copyext Specify the filename extension of the copyfile that the compiler is to look for if a filename in a COPY statement is specified without an extension. Defaults to the COBOL compiler default "cbl,cpy".

Note: This attribute is deprecated.

Ignored
debug If true, compiles a COBOL program for debugging. Defaults to false. No
destdir The name of the directory where the outputs from a compilation are to be written. Defaults to the current directory. No
destfile The name of the output file to be created for a single compilation. Must not be used if nested mffilelist elements have been specified. Defaults to the source file's base name with the appropriate .o/.obj extension. No
desttype The type of output that the COBOL compiler is to produce. The value of this attribute must be one of "obj", "int", "gnt" or "jvm". 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 a COBOL program even if it is not out-of-date. Defaults to false. No
genlistingfile If true, a listing file is generated during compilation. Defaults to false. No
is64bit If true, compiles a COBOL program to a 64-bit target. Defaults to false (i.e. 32-bit target). No
retaindirectivesfile If true, the generated directives file is left behind after compilation. Defaults to false. No
srcdir The name of the directory where the COBOL source file(s) are to be picked up from. Defaults to the current directory. No
srcfile The name of the source file to be compiled. Must not be used if nested mffilelist elements have been specified. No
threadedrts If true, the -t (threaded) option will be passed to the Unix compiler. Defaults to false. Note that this attribute is applicable only on UNIX and is ignored on Windows. No
verbose If true, causes additional informational messages to be displayed by the task. Defaults to false. No
analysisData If set to standalone, the compiler only produces data to be analyzed by the code analysis task (see analysis task). No build artifacts are created.
If set to atCompilation, the compiler produces both the build artifacts and the data to be analyzed by the code analysis task.
If this parameter is omitted, the compiler only produces the build artifacts.
No
analysisDataDir The directory where the compiler creates the data to be analyzed by the code analysis task. Must be used with the analysisData parameter in the cobol task. No

Parameters specified as nested elements

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 a <cobol> task is ignored. When you set failonerror="true", any non-zero response is treated as an error and would mean the build exits.

Examples


Copyright © 1984-2015 Micro Focus. All rights reserved.