🛠️ P3/COBOL 25.1.0-SNAPSHOT is available for preview.
Reference Manual
Compiler-Options

P3/COBOL Compiler Options

The P3/COBOL command-line command to compile COBOL programs into Java classes is a sub-command of the p3 command. See p3-utility for a description of the p3 command and its sub-commands, including the build command.

P3/COBOL Build Command

Syntax

p3{bbuild}[ p3CompilerOptions ]  {sourceFilePathsourceFilePattern} \mathsf{p3} \begin{Bmatrix} \small\mathsf{b}\\ \small\mathsf{build} \end{Bmatrix} \begin{bmatrix} \space \mathit{p3CompilerOptions} \space \end{bmatrix} \space \cdots \space \begin{Bmatrix} \mathit{sourceFilePath}\\ \mathit{sourceFilePattern} \end{Bmatrix} \space \cdots

The sourceFilePath is a batch command file (shell on *nix) specification, which may contain wild-card characters and environment variable substitutions, for example. Remember that if the file path specified contains space characters on Windows, you must quote the argument to prevent it from being interpreted as split at each space character.

As an alternative, you may specify a quoted string that will be processed as a source_file_pattern. The source file pattern is an environment-independent (same on Windows/UNIX/Linux/Mac OS X) pattern for locating target files. It is similar to a shell or command-line wild card path, but more flexible. In addition to the * and ? characters you may use ** to indicate an arbitrary number of directory levels of any name. Thus src/**/*.cbl will select any file with a .cbl extension at any level at or below the src directory, for example.

As a convenience, regardless of technique for selecting the files, p3 compile will exclude (as COBOL) any files that have a .java extension and will deposit the copies of those files in the configured generated-Java source directory. It will then compile both the generated Java classes and the copied Java source files into Java class files. Any Java source class files copied in this manner will, therefore, have a package name consistent with the directory structure of generated source directory to which they are copied, not their original location.

The options are described in detail below, and the javac_option_string is a string of any legal javac compiler options. p3 b will pass-through any javac options to the javac compiler when it is invoked to compile the generated P3/COBOL classes into byte-code class files.

Compiler Options

all-files-optional

<all-files-optional>false</all-files-optional>

This option, if set to true, causes the compiler to consider all files to have the OPTIONAL property set, even when not explicitly specified in the SELECT clause.

The possible values for boolean are:

ValueDescription
falseUse the standard means to determine if a file is to be treated as OPTIONAL.
trueTreat all files as if the OPTIONAL phrase is present in the SELECT clause, regardless of its actual presence.

binary-allocation

<binary-allocation>NORMALIZED</binary-allocation>

This option determines the number of bytes allocated for binary-usage data items.

The possible values for binaryAllocationStrategy are:

ValueDescription
MINIMALAllocate the fewest bytes possible that can contain the range of values described for this item.
NORMALIZEDAllocate the fewest bytes possible that can contain the range of values described for this item and, if not an integral power of two number of bytes, round up to the nearest power of two.
IBM_NORMALIZEDAllocate the fewest bytes possible that can contain the range of values described for this item and, if not an integral power of two number of bytes, round up to the nearest power of two. In any case, do not allocate fewer than two bytes for any item.

byte-order

<byte-order>BIG_ENDIAN</byte-order>

This option determines the order of bytes within binary or national usage data items whose binary layout must be determined at compile-time. If such a determination must be made, this option value is used, and the byte order is fixed at the value of this option. If the byte order is fixed, the runtime configuration file must either specify no byte order preference, or must specify the same byte order as this compiler configuration. It is recommended that this option be set only if required for interaction with native-code external libraries, as it limits the portability of the Java classes generated. Note that if the fast-initialize option is chosen, and any binary or national item uses the VALUE clause and a subsequent INITIALIZE statement is used for that item, it will require the byte order at runtime to match the chosen or default byte order at compile time.

The possible values for byteOrderEnumeration are:

ValueDescription
BIG_ENDIANStore binary and national items most-significant byte first by default.
LITTLE_ENDIANStore binary and national items least-significant byte first by default.
NATIVEStore binary and national items according to the native order of the processor the compiler is running on. Note, this will restrict the generated Java to running on a processor with the same byte order convention.

classpath

<classpath>/path/to/dir-or-file</classpath>

This option, if present, provides a javaClasspathString specification that is passed on to the built-in javac compiler. It is then used as if javac were invoked separately with the classpath specified.

The possible values for javaClasspathString is any valid Java classpath specification. There is no default value for this option.

commented-cobol-comments

<commented-cobol-comments>false</commented-cobol-comments>

Directs the compiler to retain and generate as Java comments any COBOL comments from the program(s) if and only if this option is true. In some cases, even when this option is set to true, the COBOL statement comments will be abbreviated or omitted.

The possible values for boolean are:

ValueDescription
falseDo not include COBOL comments in the generated Java.
trueInclude COBOL comments in the generated Java.

commented-cobol-statements

<commented-cobol-statements>false</commented-cobol-statements>

Directs the compiler to retain and generate as Java comments the COBOL statements from the program(s) if and only if this option is true. In some cases, even when this option is set to true, the COBOL statements will be abbreviated or omitted.

The possible values for boolean are:

ValueDescription
falseDo not include COBOL statements as comments in the generated Java.
trueInclude COBOL statements as comments in the generated Java.

computational-default

<computational-default>BINARY</computational-default>

Directs the compiler to use the indicated binary USAGE whenever USAGE IS COMPUTATIONAL is used or implied. For example, if RM/COBOL default behavior is desired, you may specify COMP_7 as the computational-default. This will cause unpacked decimal with a trailing combined sign to be the COMPUTATIONAL default.

The possible values for computationalDefaultUsageEnumeration are:

ValueDescription
BINARYSame as COMP_4.
COMP_1Single-precision internal floating point (IEEE).
COMP_2Double-precision internal floating point (IEEE).
COMP_3Packed decimal.
COMP_4Binary.
COMP_5Native-ordered binary.
COMP_6Unsigned packed-decimal.
COMP_7RM/COBOL default computational.
COMP_XExplicit length binary (MF).
PACKED_DECIMALSee COMP_3.

config-file

<config-file>compiler.p3c</config-file>

This option specifies the pathString to be used for an XML compiler configuration file.

The possible values for pathString is any valid file pathname. The default is compiler.p3c in the Current Working Directory, if not specified.

congruent-assignment-optimization

<congruent-assignment-optimization>true</congruent-assignment-optimization>

This option controls optimization of moving items to an item or items with the equivalent usage/picture. If the two items are "congruent", the move can often be done avoiding accessors and unnecessary size testing and truncation. The default value for boolean is true.

copy-directories

<copy-directories>cpy</copy-directories>

This and the following (if present) option’s value determines the directory paths used by the compiler for locating and loading COPY books. The paths searched to satisfy a COPY reference in the source program are:

  1. If a LIBRARY is specified in source, that path is searched for. If the name matches a library name, that directory will be the focus of the search.
  2. If not found or no LIBRARY, the current working directory is searched.
  3. If not found, any directories specified in this (the copyDirectoryStringList) option are searched in the order they are specified.
  4. If not found, an error is indicated.

The possible values for copyDirectoryStringList are a space-separated list of legal directory pathnames. The default is the Current Working Directory. The copyDirectoryStringList may contain replacement markers. See Replacement Markers for more information.

copy-extensions

<copy-extensions>cpy</copy-extensions>

This option’s copyExtensionsStringList determines the extension names used by the compiler for locating and loading COPY books. The name specified in the COPY directive is first used with no additional extension. If not found, the name is tried with each extension specified in this option in the order specified. This process is repeated in each of the locations referred to in the copy-directives option above.

The possible values for copyExtensionsStringList are a space-separated list of extension names. The default value is "cpy".

copy-libraries

<copy-libraries>
    <library name="p3lib" path="copies/lib/p3"/>
</copy-libraries>

This option allows the specification of named copybook library directories. It encloses <library> elements each of which designates a copy library path and name attribute. See the <copy-directories> option for details.

data-element-caching

<data-element-caching>NUMERIC_COHERENT_WS</data-element-caching>

This option directs the compiler to generate optimized code to implement a specific type of data element caching. When this option is set to NUMERIC_COHERENT_WS if possible any numeric item in working storage will be cached in native Java type containers. This means that when a cached item is accessed a check is made to see if the item has been previously retrieved and cached. If so, the cached Java field is used to retrieve the value. If the option is set to NUMERIC_COHERENT, the caching takes place for linkage section items also. NONE specifies no caching is to be done. Redefined and renamed items are never cached, nor are filler items and externals. If the debug-level is other than NEVER or the generate-all-accessors option is specified as true the default for caching is NONE.

The possible values for cachingStrategyEnumeration are:

ValueDescription
NONENo data item caching is performed.
NUMERIC_COHERENT_WSIf possible,numeric items in working storage are cached in native Java types and subsequently written to COBOL memory only when required.
NUMERIC_COHERENTIf possible, all numeric items are cached and subsequently written to COBOL memory when required.

data-package

<data-package>data.*</data-package>

Directs the compiler to use the value of this option to determine the package name for generated Java data classes. If the directory name(s) comprising this value do not exist, the compiler will automatically create them.

The possible values for dataPackageNamePattern is any valid Java package name. At any point in the package name a * may be used to indicate the package segment name (flattened program name) corresponding the top-level program being compiled. This permits placing data packages under the name of the program they pertain to. If the dataPackageNamePattern does not contain a *, the compiler will attempt to generate a single data package will all group data classes in the current compilation. Identical group classes with the same name will be combined, if possible, to reduce the total number of data classes needed by the application. This combined data class is much slower than when program-qualified packages are used and it is recommended that it not be used for development and testing builds of an application. Further more, it must be used with either the command-line compiler or an Ant script-based build script within the Eclipse IDE.

debug

<debug>false</debug>

Directs the compiler to produce Java source and classes that can be controlled by the P3/COBOL debugger. This option also controls the insertion of source line/column information in the generated Java allowing that information to be provided in the traceback in case of abnormal termination. It is recommended that this option be specified during development and testing except when maximum performance is desired. This option is deprecated and the <debug-level> option offers greater control of the debug information and should be used instead.

The possible values for boolean are:

ValueDescription
falseDo not generate debugger method calls in the Java code for this COBOL program(s).
trueGenerate debugger method calls in the generated program('s) Java source.

debug-kind

<debug-kind>CONCISE</debug-kind>

Determines the kind of generated debug code. At compile time the type of debug information included in the generated program is determined by the debugKindEnumeration.

The possible values for debugKindEnumeration are:

ValueDescription
MINIMALGenerates the minimum number of bytes possible to allow debugging. This value results in the most performance penalty for a running program.
CONCISEGenerates debugger methods that have minimal arguments. This has some performance penalty for running programs.
COMPLETEGenerates complete debug method calls that do not rely on runtime resolution of arguments. This value has the least impact on performance and the most impact on bytecodes used for debug purposes.

debug-level

<debug-level>NEVER</debug-level>

Determines the level of generated debug code. At runtime, the code is activated as determined by the debugLevelEnumeration.

The possible values for debugLevelEnumeration are:

ValueDescription
NEVERDo not generate any debugger calls in the Java code for this COBOL program(s). This level has no adverse effect on performance.
ALWAYSGenerate unconditional debugger method calls in the program('s) Java source. This level has the most adverse effect on performance and will usually slow program execution by a factor of 5 or more.
ASSERT_ONLYGenerate debugger assertion calls in the program('s) Java source. This level encloses debug events in Java assert statements and, therefore, will have minimal effect on performance.
CONDITIONALGenerate conditional debugger method calls in the program('s) Java source controlled at. This level encloses debug events in a conditional statement, and, therefore, will have minimal effect on performance.

debug-lines

<debug-lines>false</debug-lines>

This option directs the compiler to treat lines with “D” or “d” in the indicator column as normal COBOL code to be compiled if and only if this option is true.

The possible values for boolean are:

ValueDescription
falseDo not compile COBOL lines with a "D" or "d" in the indicator column. Treat them as comments.
trueCompile COBOL lines with an indicator column value of "D" or "d" as if they were normal, uncommented, lines.

debug-source-base-directory

<debug-source-base-directory>/path/to/debug-source-base-directory</debug-source-base-directory>

This option allows the specification of a common base directory to which all source files will be referenced by the embedded debug information in Java class files. This is done automatically when compilation is done by the IDE Eclipse builder. In that case, the common base directory for all source files is the Project directory. If this option is used in command-line mode, all file locations will be made relative to the specified source base directory, provided the file's absolute path has a left-hand path that exactly matches the base directory, and the device is the Same for both. If omitted, the default is to make file references relative to the current directory at the time of compilation (i.e., equivalent to "."). If not omitted, but its value is the empty string, absolute paths will be used.

decimal-type

<decimal-type>DECIMAL</decimal-type>

This option directs the compiler to generate code using the specified decimal data type for any fixed-point decimal quantities. The default is to use the built-in decimal type which is optimized for this COBOL. In some cases, the optimizations of the Java built-in BigDecimal type can yield better performance and should be chosen.

For debugging and special performance optimization purposes the CheckedDecimal type should be chosen. It is a subclass of BigDecimal with additional tools and options added for diagnostic purposes and should not normally be used in production programs.

The possible values for decimalTypeEnumeration are:

ValueDescription
DECIMALUse built-in int[] for decimal values.
BIG_DECIMALUse Java BigDecimal for decimal values.
CHECKED_DECIMALUse CheckedDecimal for decimal values.

default-binary-delimiter-rm

<default-binary-delimiter-rm>false</default-binary-delimiter-rm>

This option directs the compiler to generate code that uses the RM/COBOL protocol for delimiting binary sequential files if and only if this option is true. This option allows the RM/COBOL RECOVER2 utility to be used to reconstruct indexed files in the P3/COBOL environment. It may also be used when direct access to sequential files in the RM format is desired.

The possible values for boolean are:

ValueDescription
falseUse standard P3/COBOL delimiting protocol for binary sequential files.
trueUse the RM/COBOL delimiting protocol for binary sequential files.

default-delimiting

<default-delimiting>BINARY</default-delimiting>

This option directs the compiler to use the indicated record delimiting technique as the default for SEQUENTIAL organization files. This option is overridden by an explicit specification of the delimiting technique in the program.

The possible values for defaultDelimitingEnumeration are:

ValueDescription
BINARYDelimit sequential file records according to rules for binary files if not otherwise specified by the program.
LINEDelimit sequential file records according to rules for encoded character-based files if not otherwise specified by the program.

default-lock-delay

<default-lock-delay>100</default-lock-delay>

Directs the compiler to use the indicated delay in milliseconds as the time between each attempt to acquire a record lock, should such a wait be required. Typically lock attempts are queued and this timeout does not apply.

The possible value for delayTime is any positive integer. The default value is 100 (milliseconds). If frequent record locks are expected, especially when remote programs are contending with local programs, this option value may be reduced to prevent starvation of the remote user.

default-locking

<default-locking>NONE</default-locking>

Directs the compiler to use the indicated locking mode as the default for shared files. This option is overridden if locking mode is specified in the program. The setting for this to achieve RM/COBOL default behavior is AUTOMATIC.

The possible values for defaultLockingEnumeration are:

ValueDescription
NONERecord locking will be disabled by default.
MANUALRecord locking will be performed only when explicitly specified on a READ statement by default. Records will be unlocked by subsequent operations.
MANUAL_MULTIPLERecord locking will be performed only when explicitly specified on a READ statement by default. Record locks will be held until an UNLOCK statement is performed.
AUTOMATICRecord locking will occur on every READ by default. Records will be unlocked by subsequent operations.
AUTOMATIC_MULTIPLERecord locking will occur on every READ by default. Record locks will be held until an UNLOCK statement is performed.
EXCLUSIVEFiles will be locked for exclusive access when OPEN is performed by default.
OPTIMISTICThe contents of records will be captured at READ by default. Subsequent REWRITE and DELETE operations will fail with a lock error if the contents has changed since the READ was performed.

default-select-mode

<default-select-mode>DYNAMIC</default-select-mode>

Determines the file selection mode in the absence of explicit phrases in the SELECT clause.

The possible values for defaultSelectModeEnumeration are:

ValueDescription
DYNAMICThe file selection name will refer to a user-defined data item containing the actual name at the time of the OPEN execution unless it is an alphanumeric literal, which will refer to the literal name througout the execution of the program.
STATICThe file selection name will always be considered a (lower-case) literal value, even when it matches a user-defined data item name.
EXTERNALThe file selection name will always be considered a (lower-case) literal value, even when it matches a user-defined data item name.

default-sharing

<default-sharing>NOT_SPECIFIED</default-sharing>

Directs the compiler to use the indicated default sharing mode in the event no sharing mode is specified in the program.

The possible values for defaultSharingEnumeration are:

ValueDescription
NOT_SPECIFIEDFile sharing mode will be determined at OPEN time based on the open mode requested.
ALLBy default, files will be shared with all other users.
NONEBy default, files will be OPENed in exclusive access mode and any sharing prevented.
READ_ONLYBy default, files will be opened for exclusive access when the OPEN mode is OUTPUT, EXTEND or IO, and shared with any other programs OPENing the file in INPUT mode.

destination-directory

<destination-directory>bin</destination-directory>

This option’s value determines the directory path used by the compiler for generating the Java class files for program and data packages.

The possible values for path are any legal directory pathnames that can be written by the current user. If this option is not specified and the source-directory option is specified, the generated classes will be placed in that directory. If source-directory is not specified, this option will default to "bin".

diagnostic-levels

<diagnostic-levels>123/WARNING</diagnostic-levels>

Provides error level alterations. The levelAlterationList consists of a space-separated list of error numbers and error levels. The number is separated from the error level by a "/" character (e.g., "123/WARNING 456/CAUTION"). For errors with an original level of WARNING and below, any new level may be assigned. For errors of level ERROR and above, you may assign a higher, but not lower, level. The error level choices are as described below for <diagnostic-threshold>.

diagnostic-threshold

<diagnostic-threshold>WARNING</diagnostic-threshold>

Directs the compiler to suppress (filter out) reporting of errors with a level less severe than the specified level. Note that the errors still may affect the compiler and/or the generated Java code, even though they are not reported to the user.

The possible values for diagnosticThresholdEnumeration are:

ValueDescription
INFORMATIVEAll errors and advisories will be reported.
CAUTIONErrors as severe as or more severe than cautions regarding obsolete features or potentially unexpected runtime behavior will be reported.
WARNINGErrors as severe as or more severe than warnings regarding the use of extensions or potentially ambiguous constructs will be reported.
ERRORErrors as severe as or more severe than those causing compilation to complete unsuccessfully will be reported.
SEVERE_ERRORErrors as severe as or more severe than those preventing completion of compilation of the current program will be reported.
FATALOnly errors that immediately terminate the compiler will be reported.

dialect

<dialect>NONE</dialect>

Indicates to the compiler that the program source code may be assumed by the compiler to conform to the COBOL dialect specified. This option also determines the default values of several individual configuration options.

For other options in this section, the default values shown for individual options assume a dialect of NONE is in effect. For other settings of the dialect option, the effect on the default is noted below. Note that when a specific dialect is set, the compiler may or may not

The possible values for dialectEnumeration are:

DialectDescription
NONEThe full P3/COBOL language will be assumed for all source programs.
ANSI_85This is the ANSI/ISO 1985 COBOL dialect. It disallows many P3 extensions that the 1985 standard does not support
COBOL_2000This is the strict Siemens/Fujitsu COBOL2000 dialect. It disallows many P3 extensions that COBOL2000 does not support and includes some COBOL_2000-only extensions.
COBOL_2000_DMLThis is the strict Siemens/Fujitsu COBOL2000 dialect with DML. It disallows many P3 extensions that COBOL2000 does not support and includes some COBOL_2000-only extensions
COBOL_400This is the IBM AS400 (iSeries) COBOL/400 dialect. It disallows many P3 extensions that IBM does not support in that product
HPThis is the HP COBOL dialect. It disallows many P3 extensions that HP does not support
IBMThis is the permissive version of the modern IBM COBOL dialect(s) that include many P3 syntax extensions, 64-bit pointers, stacked perform, etc.
ISO2002This is the ISO 1989:2002 COBOL dialect. It disallows many P3 extensions that the standard does not support
ISO2014This is the ISO 1989:2014 COBOL dialect. It disallows many P3 extensions that the standard does not support
MFThis is the permissive Micro Focus dialect. It allows many P3 extensions that Micro Focus does not support
NET_COBOLThis is the Fujitsu NetCOBOL dialect. It disallows many P3 extensions that Fujitsu does not support in that version
OSVSThis is the strict IBM OS/VS COBOL dialect. It disallows many P3 extensions that IBM does not support
P3This is the native P3/COBOL dialect. It allows all P3/COBOL extensions and modern, natural default behavior
RMThis is the non-strict version of the RM/COBOL dialect (allows P3 syntax extensions)
RM_COBOLThis is the strict version of RM/COBOL (does not allow some P3 syntax extensions)
VSC2This is the strict IBM COBOL II dialect. It disallows many P3 extensions that IBM does not support in that version
XOPENThis is the P3-native version of the XOPEN COBOL dialect(s) (allows P3 syntax extensions, 64-bit pointers, stacked perform, for example)

When the RM or RM_COBOL dialect is specified, the following default options apply:

OptionDefault
perform-typeFLAT
perform-adhesionSTICKY
binary-allocationIBM_NORMALIZED
computational-defaultCOMP_7
default-sharingALL
default-delimitingLINE
default-lockingAUTOMATIC
locking-behaviorRM
sticky-linkageNOT_ACTUAL_ARG
x-zoned-decimal-typeRM
pointer-size24
rm-compatible-comp1true
default-binary-delimiter-rmtrue

When the MF dialect is specified, the following default options apply:

OptionDefault
perform-typeSTACKED
perform-adhesionNONE
binary-allocationNORMALIZED
computational-defaultBINARY
default-sharingNONE
default-delimitingBINARY
default-lockingNONE
locking-behaviorSTANDARD
sticky-linkageNONE
x-zoned-decimal-typeASCII
pointer-size8
rm-compatible-comp1false
default-binary-delimiter-rmfalse

When the OSVS dialect is specified, the following default options apply:

OptionDefault
perform-typeFLAT
perform-adhesionSTICKY
binary-allocationIBM_NORMALIZED
computational-defaultBINARY
default-sharingNONE
default-delimitingBINARY
default-lockingNONE
locking-behaviorSTANDARD
sticky-linkageNONE
x-zoned-decimal-typeASCII
pointer-size4
rm-compatible-comp1false
default-binary-delimiter-rmfalse

When the IBM dialect is specified, the following default options apply:

OptionDefault
perform-typeSTACKED
perform-adhesionNONE
binary-allocationIBM_NORMALIZED
computational-defaultBINARY
default-sharingNONE
default-delimitingBINARY
default-lockingNONE
locking-behaviorSTANDARD
sticky-linkageNONE
x-zoned-decimal-typeASCII
pointer-size8
rm-compatible-comp1false
default-binary-delimiter-rmfalse

When the XOPEN dialect is specified, the following default options apply:

OptionDefault
perform-typeSTACKED
perform-adhesionNONE
binary-allocationIBM_NORMALIZED
computational-defaultBINARY
default-sharingNONE
default-delimitingBINARY
default-lockingNONE
locking-behaviorSTANDARD
sticky-linkageNONE
x-zoned-decimal-typeASCII
pointer-size8
rm-compatible-comp1false
default-binary-delimiter-rmfalse

When the VSC2 dialect is specified, the following default options apply:

OptionDefault
perform-typeFLAT
perform-adhesionCOUNTED
binary-allocationIBM_NORMALIZED
computational-defaultBINARY
default-sharingNONE
default-delimitingBINARY
default-lockingNONE
locking-behaviorSTANDARD
sticky-linkageNONE
x-zoned-decimal-typeASCII
pointer-size8
rm-compatible-comp1false
default-binary-delimiter-rmfalse

When the COBOL_2000 or COBOL_2000_DML dialect is specified, the following default options apply:

OptionDefault
perform-typeFLAT
perform-adhesionSCOPED
binary-allocationIBM_NORMALIZED
computational-defaultBINARY
default-sharingNONE
default-delimitingBINARY
default-lockingNONE
locking-behaviorSTANDARD
sticky-linkageNONE
x-zoned-decimal-typeEBCDIC
pointer-size8
rm-compatible-comp1false
default-binary-delimiter-rmfalse

When the NET_COBOL dialect is specified, the following default options apply:

OptionDefault
perform-typeSTACKED
perform-adhesionNONE
binary-allocationMINIMAL
computational-defaultBINARY
default-sharingNONE
default-delimitingBINARY
default-lockingNONE
locking-behaviorSTANDARD
sticky-linkageNONE
x-zoned-decimal-typeASCII
pointer-sizeDefault native pointer size
rm-compatible-comp1false
default-binary-delimiter-rmfalse

When the HP dialect is specified, the following default options apply:

OptionDefault
perform-typeFLAT
perform-adhesionSCOPED
binary-allocationIBM_NORMALIZED
computational-defaultBINARY
default-sharingNONE
default-delimitingBINARY
default-lockingNONE
locking-behaviorSTANDARD
sticky-linkageNONE
x-zoned-decimal-typeASCII
pointer-size4 unless POINTER-64 specified
rm-compatible-comp1false
default-binary-delimiter-rmfalse

When the COBOL_400 dialect is specified, the following default options apply:

OptionDefault
perform-typeFLAT
perform-adhesionCOUNTED
binary-allocationIBM_NORMALIZED
computational-defaultBINARY
default-sharingNONE
default-delimitingBINARY
default-lockingNONE
locking-behaviorSTANDARD
sticky-linkageNONE
x-zoned-decimal-typeASCII
pointer-size16
rm-compatible-comp1false
default-binary-delimiter-rmfalse

When the ANSI85 dialect is specified, the following default options apply:

OptionDefault
perform-typeSTACKED
perform-adhesionNONE
binary-allocationNORMALIZED
computational-defaultBINARY
default-sharingNONE
default-delimitingBINARY
default-lockingNONE
locking-behaviorSTANDARD
sticky-linkageNONE
x-zoned-decimal-typeASCII
pointer-sizeDefault native pointer size
rm-compatible-comp1false
default-binary-delimiter-rmfalse

When the ISO2002 or ISO2014 dialect is specified, the following default options apply:

OptionDefault
perform-typeSTACKED
perform-adhesionNONE
binary-allocationNORMALIZED
computational-defaultBINARY
default-sharingNONE
default-delimitingBINARY
default-lockingNONE
locking-behaviorSTANDARD
sticky-linkageNONE
x-zoned-decimal-typeASCII
pointer-sizeDefault native pointer size
rm-compatible-comp1false
default-binary-delimiter-rmfalse

When the P3 dialect is specified, the following default options apply:

OptionDefault
perform-typeSTACKED
perform-adhesionNONE
binary-allocationMINIMAL
computational-defaultBINARY
default-sharingALL
default-delimitingLINE
default-lockingAUTOMATIC_TRANSACTIONAL
locking-behaviorTRANSACTIONAL
sticky-linkageNOT_FORMAL_ARG
x-zoned-decimal-typeASCII
pointer-size8
rm-compatible-comp1false
default-binary-delimiter-rmfalse

direct-storage-access-optimization

<direct-storage-access-optimization>true</direct-storage-access-optimization>

Directs the compiler to optimize access to stored items by using inline, direct manipulation of storage without using generated accessors if and only if this option is true. The most likely use case for setting this to false is when the readability of the generated code supersedes the potential performance improvements of this option, for example, if the generated code is intended to be used as a human-modifiable Java base.

The possible values for boolean are:

ValueDescription
falseDo not use direct storage access in the generated code.
trueIf possible optimize direct access to stored items.

display-numeric-conversion

<display-numeric-conversion>false</display-numeric-conversion>

Forces the compiler to convert display-usage numerics in an ANSI mode DISPLAY statement to a digits-only, leading-signed, representation (without decimal place) if and only if this option is true. If set to false, all items will be displayed in a type-appropriate string representation.

The possible values for boolean are:

ValueDescription
falseUse alegebraically accurate string representation to display numeric items.
trueConvert numeric display-usage items to signed, digits-only form.

embedded-sql

<embedded-sql>false</embedded-sql>

Directs the compiler to process embedded SQL (ESQL) and generate calls to a built-in library that uses JDBC to carry out the specified actions if and only if this option is true. If set to true, the database-associations runtime option should be used to configure the connection to the database to be used.

The possible values for boolean are:

ValueDescription
falseDo not compile embedded SQL statements. They will treated as errors.
trueCompile embedded SQL statements into operations performed on a configured JDBC connection.

event-type-filter

<event-type-filter>BANNER ERROR DIAGNOSTIC</event-type-filter>

Selects which compiler event categories are reported. The value is a space-separated list of eventType names.

The possible values for eventType are:

ValueDescription
BANNERCompiler identification and banner messages
BEGIN_PHASEStart-of-phase progress messages
DEBUGDebug-level internal messages
DIAGNOSTICDiagnostic messages
END_PHASEEnd-of-phase progress messages
ERRORError messages
TRACETrace-level internal messages

The default is BANNER ERROR DIAGNOSTIC.

fast-initialize

<fast-initialize>false</fast-initialize>

Directs the compiler to generate optimized code for data initialization if and only if this option is true. If this option is true and the program(s) contain one or more initialized binary items, the byte order determined by the compiler will determine the byte order that must be used at runtime. It is recommended that this option be left set to the default value unless the optimization is required, as it will restrict portability of the generated Java classes.

The possible values for boolean are:

ValueDescription
falseGenerate initialization using normal accessor methods.
trueGenerate optimized initialization using byte images.

floating-point-rounding

<floating-point-rounding>NONE</floating-point-rounding>

This option determines how the presence of floating point operands affects the rounding of the other operands and result in arithmetic expressions.

The possible values for floatingPointRoundingEnumeration are:

ValueDescription
NONEDo not force rounding of any operands or result(s).
OSVSRound all results if there are any floating point operands.
VSC2Round all results if there are any floating point operands or results.

force-default-charset

<force-default-charset>false</force-default-charset>

The compiler will force the default charset choice for the source files if and only if this option is true. If false (the default), the source charset will be automatically determined by sampling the source file(s), and the default will be chosen only if no charset can be determined by the automatic sampling. See the source-charset-default option for more detail.

The possible values for boolean are:

ValueDescription
falseThe source charset will be automatically determined by sampling the source file(s), and the default will be chosen only if no charset can be determined by the automatic sampling.
trueForce the source charset to be the default.

fractional-exponentiation-type

<fractional-exponentiation-type>DOUBLE</fractional-exponentiation-type>

This option determines the method of performing exponentiation when exponent is a fixed-point decimal fraction.

The possible values for fractionalExponentiationTypeEnumeration are:

ValueDescription
DECIMALUse the configured DECIMAL type for both base and exponent to compute the result.
DOUBLEUse Java double (16 digits of precision) for both base and exponent to compute the result. Note: this may affect the behavior of the entire computation as a function of the floating point rounding option.
FLOATUse Java float (7 digits of precision) for both base and exponent to compute the result. Note: this may affect the behavior of the entire computation as a function of the floating point rounding option.
NATURALUse the normal types and precision of the base and exponent to compute the result.

generate-all-accessors

<generate-all-accessors>false</generate-all-accessors>

Directs the compiler to generate all possible data access methods regardless of use by the compiled program(s). If debug mode or is selected, this option defaults to true to enable all declared items to be accessed by the debugger. If explicitly set to false, only variables used by the program will be accessible in debug mode and only accessors that are used by the program logic will be generated.

The possible values for boolean are:

ValueDescription
falseGenerate data access methods only for data items that are referenced in the compiled program(s) and which are used by the program(s).
trueGenerate all possible data access methods regardless of whether or not they would be used by the compiled program(s).

generate-all-data-annotations

<generate-all-data-annotations>[true|false]</generate-all-data-annotations>

Directs the compiler to generate data annotations for every data item regardless of other option settings if this option is set to true. If set to false, directs the compiler to only annotate data items that also have generated accessors regardless of any other option settings. By default, the compiler will decide when items should have data annotations based on the other options set.

The possible values for boolean are:

ValueDescription
falseGenerate data annotations only if accessors are generated and without regard to other option settings.
trueGenerate all data annotations without regard to other option settings.

generate-class-files

<generate-class-files>true</generate-class-files>

Directs the compiler to generate the Java class files ("*.class") for the COBOL program(s) if and only if this option is true. This option is typically used in IDE-based projects when it is desirable to have the Java Builder compile the generated "*.java" files into "*.class" files rather than the P3/COBOL compiler.

The possible values for boolean are:

ValueDescription
falseDo not generate Java class files.
trueGenerate all necessary program and data class files.

generate-entry-classes

<generate-entry-classes>true</generate-entry-classes>

Directs the compiler to generate Java class files for ENTRY statements if and only if this option is true.

The possible values for boolean are:

ValueDescription
falseDo not generate separate classes for ENTRY points
trueGenerate class files for ENTRY statements

generate-filler-annotations

<generate-filler-annotations>false</generate-filler-annotations>

Directs the compiler to generate data annotations for every FILLER data item regardless of other option settings if this option is set to true. If set to false, directs the compiler to only annotate data items that also have generated accessors or need annotation for some other reason regardless of any other option settings. By default, the compiler will not generate filler data annotations unless they are required by some other selected option or program action (e.g., debugging or import/export).

The possible values for boolean are:

ValueDescription
falseGenerate filler annotations only if the filler item is a group, is an occurs item, or has 88 conditions.
trueGenerate all filler data annotations.

generate-java-beans

<generate-java-beans>false</generate-java-beans>

Directs the compiler to generate the necessary accessor methods to allow top-level group classes to be used as Java Beans if and only if this option is true. This allows other Java-based tools and frameworks to access COBOL data structures as standard Java Beans without consideration of the COBOL nature of the data.

The possible values for boolean are:

ValueDescription
falseDo not generate Java Bean accessors.
trueGenerate all appropriate Java Bean accessors for top-level group items.

generate-javadocs

<generate-javadocs>true</generate-javadocs>

Directs the compiler to generate Javadocs commentary as needed if and only if this option is true.

The possible values for boolean are:

ValueDescription
falseDo not generate Javadocs.
trueGenerate Javadocs when possible.

generate-program-classes

<generate-program-classes>true</generate-program-classes>

Directs the compiler to generate the Java classes for the COBOL program(s) if and only if this option is true. This option is typically not used for application development and testing.

The possible values for boolean are:

ValueDescription
falseDo not generate Java source and class files for the COBOL Program class(es). Generate data class(es) only.
trueGenerate all necessary program and data classes.

generate-synchronized-accessors

<generate-synchronized-accessors>false</generate-synchronized-accessors>

Directs the compiler to generate synchronized data accessors for this program if and only if this option is true. If set to true, non-COBOL concurrent threads can access COBOL data in a thread-safe manner provided they synchronize their accesses on the run unit in the same way. Utility methods are provided in DataUtil to accomplish this. There is a measurable performance penalty for enabling this option, so it should not be used unless thread-safe data access is required by the application.

The possible values for boolean are:

ValueDescription
falseGenerate normal accessor methods for data in programs compiled with this option.
trueGenerate data accessors that synchronize on the runUnit for programs compiled with this option.

help

--help

This option causes command line help information to be written to standard output.

histogram

<histogram>false</histogram>

Directs the compiler to generate histogram events for the COBOL program(s) if and only if this option is true. See also the histogram-smallest-bucket option below.

⚠️

This option should not be used with any debug-level explicitly specified. Essentially, debugging and histogram collection should be considered mutually exclusive as they use the same event mechanism, but with different configurations.

The possible values for boolean are:

ValueDescription
falseDo not generate histogram events.
trueGenerate all necessary histogram events.

histogram-smallest-bucket

<histogram-smallest-bucket>STATEMENT</histogram-smallest-bucket>

Specifies the smallest collection bucket size to be supported by the generated code. This smaller than or equal to the histogram-bucket-size runtime option(s) to be used.

💡

You may specify a smaller bucket size that the one chosen at runtime, but specifying a larger one will result inaccurate, and probably meaningless, results.

The possible values for smallest-bucket-at-runtime in smallest to largest order are:

ValueDescription
STATEMENTGenerate events necessary to allow statement level histogram collection at runtime.
PROCEDUREGenerate events necessary to allow section/paragraph level histogram collection at runtime.
PROGRAMGenerate events necessary to allow program/source level histogram collection at runtime.

ignore-uncaught-arithmetic-overflow

<ignore-uncaught-arithmetic-overflow>true</ignore-uncaught-arithmetic-overflow>

This option, if set to false, causes the compiler to generate code that catches OVERFLOW conditions when neither ON OVERFLOW nor NOT ON OVERFLOW clauses are present in a statement in which they are allowed and arithmetic overflow conditions may occur and subsequently terminate execution of the program.

The possible values for boolean are:

ValueDescription
trueIgnore arithmetic overflow unless ON OVERFLOW or NOT ON OVERFLOW specified.
falseDetect arithmetic overflow and terminate the program unless ON OVERFLOW or NOT ON OVERFLOW clauses are present.

implicit-recursion

<implicit-recursion>false</implicit-recursion>

Directs the compiler to assume an implicit IS RECURSIVE aspect for all programs. This has the effect of causing the return address and base address of LINKAGE SECTION items, if any, to be saved upon entry to each program and restored upon exit. This option interacts with the <sticky-linkage> option.

The possible values for boolean are:

ValueDescription
falseGenerate code that permits recursion only if the PROGRAM ID specifies it explicitly.
trueImplicitly assume that code supporting recursion is to be generated regardless of the presence or absence of the RECURSIVE aspect.

integer-arithmetic-safety

<integer-arithmetic-safety>SAFE</integer-arithmetic-safety>

🎯 Allows the compiler to generate unsafe long (64-bit) arithmetic if the user believes that there are no operations on integers that would exceed the capacity of a 64-bit item. SAFE is the default, causing the compiler to promote to BigInteger any operation that could exceed the algebraic maximum or minimum value containable in a 64-bit long, thus avoiding any potential loss of significance. When narrowing conversions of integer values are performed, this mode ensures that the narrowed value can be properly stored with decimal trucation if needed. UNSAFE allows the compiler to assume that the result of any integer operation on int or long operands can be held in a long without loss of significance. It CHECKED directs the compiler to make the UNSAFE assumption, but also to check to make sure that the assumption is true for each operation that would potentially lose significance. If such a loss is detected, it is treated as a catchable SIZE error similar to division by 0. It is recommended that either SAFE or CHECKED be selected, unless compute performance is critical, a large number of long integer multiplications, additions, or subtractions are performed, and the user is very sure that no significance-losing operations would be performed.

The results of operations involving int operands that could overflow that data type are always automatically promoted by the compiler to long within arithmetic expressions regardless of the setting of this option.

The possible values for longArithmeticSafetyEnumeration are:

ValueDescription
SAFEDirects the compiler to promote any operation that could exceed the algebraic maximum or minimum value containable in a 32-bit int or 64-bit long to BigInteger, thus avoiding any potential loss of significance. For narrowing conversions this setting performs decimalization in order to preserve the ability to properly truncate the value when it is subjected to potential PICTURE-based reduction of precision when stored.
UNSAFEDirects the compiler to assume that the result of any integer operation on int or long operands can be held in a long without loss of significance. Narrowing conversions are performed with binary truncation according to native Java behavior.
CHECKEDDirects the compiler to make the UNSAFE assumption, but also to check to make sure that the assumption is true for each operation that would potentially lose significance. If such a loss is detected, it is treated as a catchable SIZE error similar to division by 0. This setting may be used to audit program behavior to ensure that the UNSAFE option can be used without affecting correct behavior.

This option was formerly named <long-arithmetic-safety>. That name is deprecated but remains accepted for compatibility with existing configuration files. If both names are present, the deprecated <long-arithmetic-safety> value takes precedence over <integer-arithmetic-safety>. Use <integer-arithmetic-safety> in new configuration; the deprecated name may be removed in a future release. The deprecated name is accepted only as a configuration element and has no command-line equivalent.

java-arguments

<java-arguments>-cp mylib.jar</java-arguments>

This option specifies a javac argument string to be passed through to the built-in javac compiler. If this option is specified on a command line (rather than in a configuration file), a # must be used as the first character of its value to distiguish it from a subsequent P3/COBOL compiler option. If present, this guard character will be removed by the P3/COBOL compiler and will not be passed on to the java compiler. For passing multiple java compiler arguments from the command line using this option, the shell must also be prevented from interpreting a space as a command argument separator, so the entire argument string value should be escaped by some means dictated by the shell being used. In most cases, this can be accomplished by quoting the arguments (including the guard #), or by escaping the space separators with \\. The guarding and escaping are unnecessary if this option is provided in the configuration file.

The possible value for compilerJavaArguments is any valid javac argument list, with the above modifications if necessary.

java-properties

<java-properties>NORMALIZED</java-properties>

This option specifies list of java properties to be set during compilation. The list takes the form of space-separated name=value pairs providing the value(s) for the property(ies) to be set.

java-source-base-directory

<java-source-base-directory>src-generated</java-source-base-directory>

This option specifies the path of a directory containing Java source packages to be compiled into "*.class" files with any generated Java source files. If not specified, the default is to compile any Java files in the current directory.

list-output

<list-output>false</list-output>

Directs the compiler to generate a COBOL listing file if and only if this option is true. The generated listing file may be subsequently compiled by P3/COBOL and, if so, will produce exactly the same generated Java as the original COBOL program file with the original COPY files. The listing file is completely self-contained (i.e., has no COPY references to other files). The storage map, if any, will also be written to the effective listing output file (see list-output-file option).

The possible values for boolean are:

ValueDescription
falseDo not generate a program listing.
trueWrite a program listing to the listing output file.

listeners

<listeners>
    <listener name="custom" value="com.example.MyCompilerListener"/>
</listeners>

This option allows the specification of named compiler listener classes. It encloses <listener> elements each of which designates a listener name and value attribute. The value is a fully qualified Java class name that implements a P3/COBOL listener interface and provides a public no-argument constructor.

This option may only be used within the compiler configuration file; there is no command-line equivalent. There is no default value for this option.

listing-output-file

<listing-output-file>*</listing-output-file>

This option’s value determines the file/directory path used by the compiler for generating the listing components. A * may be included instead of the file name, in which case the listing file, if any, will be written to a file whose name is the same as the source file with an extension of .lst. If this option is specified and includes directories that do not exist at the time the listing(s) is written, the missing directories will be created if possible. If this option is not specified and one or more of the listing components are requested, they will be written as if * alone was specified for this option.

The possible values for listingOutputFilePathPattern are any legal file pathname (with the above modification if present).

literal-compaction-optimization

<literal-compaction-optimization>true</literal-compaction-optimization>

Directs the compiler to compact literal storage and optimize frequently used literals for speed if and only if this option is true. The default value for boolean is true.

locking-behavior

<locking-behavior>STANDARD</locking-behavior>

Directs the compiler to use the indicated locking behavior when reading shared files. STANDARD indicates that the locking behavior specified in the 201x draft standard should be used. RM indicates that RM/COBOL default locking behavior should be used. RM also causes the indexed file access to be performed in a manner equivalent to RM/COBOL indexed file handling, including some undocumented and non-standard behavior (e.g., no loss of currency after AT END if read direction changed). This option should be set for maximum RM/COBOL runtime compatibility.

The possible values for lockingBehaviorEnumeration are:

ValueDescription
STANDARDProduce record locking behavior complying with the 2014 COBOL standard.
RMProduce record locking behavior that matches that of RM/COBOL.

max-init-count

<max-init-count>1000</max-init-count>

Directs the compiler to break initialization of very large groups such that no single initialization method initializes more than the indicated number of elementary items. This option may be necessary if the program contains very large (more than 10,000 items) initialized groups.

The possible values for count are any positive non-zero integer. The default value is 1000.

maximum-decimal-digits

<maximum-decimal-digits>31</maximum-decimal-digits>

Directs the compiler to limit the maximum number of decimal digits that may be specified in a numeric or numeric-edited picture to the indicated number. This option does not affect the precision of arithmetic results or intermediate values, but may affect the value of the runtime configuration option, maximum-decimal-precision, that may be safely set.

The possible values for the maximumDecimalDigits are the integers 1 through 64 inclusive. The default value is 31.

native-charset

<native-charset>NATIVE</native-charset>

The value of this option specifies the Java Charset encoder/decoder to use when converting to/from Strings and COBOL alphanumeric items. These conversions occur when processing the VALUE clause of a data definition entry or 88-condition, when ACCEPTing an alphanumeric value from a console, and when DISPLAYing an alphanumeric value upon a console. No conversion takes place for national and national-edited items, as these items can represent all characters in the Unicode set. The default value (NATIVE) causes all conversions to assume the native codeset. If option is set here, it must be compatible with the corresponding runtime option specified when the program is run.

The possible values for charsetEnumeration are:

ValueDescription
NATIVEUses the 1:1 default native charset.
ISO_8859_1Uses the ISO 8859-1 charset.
ISO_8859_15Uses the ISO 8859-15 (latin-9) charset.
EBCDICUses IBM EBCDIC (USA) charset.
EBCDIC_DEUses IBM EBCDIC (Germany with Euro).
WINDOWS_1252Uses Windows standard US codepage.
CP_437Uses the IBM PC Latin US code page (OEM 437).
CP_850Uses the MS-DOS Latin-1 codepage.
CP_852Uses MS-DOS Latin-2 codepage.
CP_858Uses the variant of Cp850 with Euro character.
MAC_ROMANUses Apple Mac OS X standard (US).
NONESpecifies unknown charset.
UTF-8Uses the UTF-8 charset (not 1:1).
SHIFT_JISUses the Shift JIS charset (not 1:1).

overwrite

<overwrite>true</overwrite>

Directs the compiler to overwrite existing generated Java source files if and only if this option is true. This option may only be specified in the compiler configuration file; there is no command-line equivalent.

The possible values for boolean are:

ValueDescription
falseDo not overwrite existing generated Java source
trueOverwrite existing generated Java source as needed

perform-adhesion

<perform-adhesion>NONE</perform-adhesion>

Determines the persistence of PERFORM statement return points. This option interacts with the perform-type option to determine the overall behavior of PERFORM. The default for this option is determined by the dialect chosen unless explicitly overridden.

The possible values for performAdhesionEnumeration are:

ValueDescription
NONENo adhesion rule applies. This is only meaningful for STACKED type PERFORM (see below).
SCOPEDPERFORM return points persist until a return point for the same or a higher PERFORM level occurs. No other restrictions on overlap exist.
COUNTEDPERFORM return points persist until a return point for the same or a higher PERFORM level occurs as in SCOPED adhesion, except in the case of a common return, which is cleared when all active PERFORMs specifying that return have returned. Otherwise returns are cleared upon return to the same or higher level PERFORM.
STICKYPERFORM return points persist indefinitely and may not concurrently exist for more than one PERFORM. The most recent PERFORM that has not returned overrides common return points for overlapped PERFORM ranges. A return point is cleared upon return to the same or higher level PERFORM.

perform-type

<perform-type>STACKED</perform-type>

Determines the type of PERFORM statement return behavior. This option interacts with the perform-adhesion option to determine the overall behavior of PERFORM. The default for this option is determined by the dialect chosen unless overriden explicitly.

The possible values for performTypeEnumeration are:

ValueDescription
STACKEDAt any given point in execution, only the return point of the most recently executed PERFORM that has not yet returned is active (i.e., will cause a return to occur).
FLATReturn points apply without regard to the order of execution of the PERFORM statements (i.e., they are not "stacked").

pointer-math

<pointer-math>false</pointer-math>

Directs the compiler to allow subtraction of POINTER items that are pointing to the same 01-level group item if and only if this option is true. This permits the relative displacement of items to be determined by a running program. This is sometimes done by COBOL programs originally running in IBM mainframe computer environments and is supported by P3/COBOL for compatibility. A preferred technique to accomplish this is to use the intrinsic functions or special register extensions to determine the length and offset of data items directly.

The possible values for boolean are:

ValueDescription
falseDo not allow pointer arithmetic.
trueAllow limited pointer arithmetic to determine relative displacement of data items that are in the same 01-level group.

pointer-size

<pointer-size>8</pointer-size>

This option value determines the number of significant bytes allocated in POINTER data items. The number of bytes of storage allocated for the POINTER item must be large enough to accommodate the runtime environment’s pointer size, but may be larger. If larger, the additional bytes reserved in memory are ignored. If no pointers refer to directly allocated memory (see the allocate-all-direct runtime option), the pointer size is only required to be large enough to identify all active pointers. In this case, any size over 2 will likely satisfy this constraint.

In 32-bit environments the pointer size may be safely set to any number 4 or greater. The default value of 8 is sufficient for both 32 and 64-bit environments. Note that the number of bytes reserved in memory for pointers may be forced to a number greater than or equal to this option size by use of the binary allocation override in the USAGE clause (e.g., USAGE IS POINTER(16) would cause allocation of the associated POINTER item as 16 bytes even if this option is set to 8).

The possible values for size are any positive non-zero integer. The default value is 8.

program-package

<program-package>programs</program-package>

Directs the compiler to use the value of this option as the package name for generated Java program classes. If the directory name(s) comprising this value do not exist, the compiler will create them.

The possible values for packageNamePattern are any valid Java package name. At any point in the package name a * may be used to indicate the package segment name (flattened program name) corresponding the top-level program being compiled.

replacement-word-wrapping

<replacement-word-wrapping>false</replacement-word-wrapping>

The value of this option determines if the preprocessor should ensure space separators before and after replacement text specified as a COBOL word (rather than pseudo text).

The possible values for boolean are:

ValueDescription
falseDirects the compiler to not wrap text replacing COBOL words with space separators.
trueDirects the compiler to ensure that text replacing COBOL words is surrounded by separator spaces.

rm-compatible-comp1

<rm-compatible-comp1>false</rm-compatible-comp1>

Directs the compiler to use the RM/COBOL semantics and format for COMPUTATIONAL-1 if and only if this option is true. This causes COMPUTATIONAL-1 items to use 16-bit binary rather than single-precision floating point representation.

The possible values for boolean are:

ValueDescription
falseDirects the compiler to interpret COMP-1 usage to be single-precision internal floating point.
trueDirects the compiler to interpret COMP-1 usage to be 16-bit twos-complement binary.

sign-default-leading

<sign-default-leading>false</sign-default-leading>

Directs the compiler to assume a default configuration of SIGN IS LEADING for DISPLAY-usage items if and only if this option is true.

The possible values for boolean are:

ValueDescription
falseDirects the compiler to assume a default of TRAILING for display usage signed items.
trueDirects the compiler to assume a default of LEADING for display usage signed items.

sign-default-separate

<sign-default-separate>false</sign-default-separate>

Directs the compiler to assume a default configuration of SIGN IS ... SEPARATE for DISPLAY-usage items if and only if this option is true.

The possible values for boolean are:

ValueDescription
falseDirects the compiler to assume a default of combined sign for display usage signed items.
trueDirects the compiler to assume a default of SEPARATE for display usage signed items.

source-charset-default

<source-charset-default>ISO_8859_1</source-charset-default>

The compiler will use the charset specified by this option if automatic charset determination fails or if the force-default-charset option is true.

The possible values for charsetEnumeration are:

ValueDescription
ISO_8859_1Default to ISO 8859-1 charset for the source file(s).
ISO_8859_15Uses the ISO 8859-15 (latin-9) charset for source file(s).
EBCDICUses IBM EBCDIC (USA) charset for source file(s).
EBCDIC_DEUses IBM EBCDIC (Germany with Euro) for source file(s).
WINDOWS_1252Uses Windows standard US codepage for source file(s).
CP_437Uses the IBM PC Latin US code page (OEM 437) for source file(s).
CP_850Uses the MS-DOS Latin-1 codepage for source file(s).
CP_852Uses MS-DOS Latin-2 codepage for source file(s).
CP_858Uses the variant of Cp850 with Euro character for source file(s).
MAC_ROMANUses Apple Mac OS X standard (US) for source file(s).=
UTF-8Default to UTF-8 charset for source file(s).
AUTO_JISDefault to automatically configured Shift JIS for the source file(s).

source-directory

<source-directory>src-java</source-directory>

This option’s value determines the directory path used by the compiler for generating the Java source for program and data packages.

The possible values for path are any legal directory pathnames that can be written by the current user. If this option is not specified, the generate source classes will be placed in a temporary directory and discarded after the actual Java class files are written.

source-format

<source-format>FIXED72</source-format>

Determines the initial setting for the COBOL source format. The initial setting may be changed at any point in the source program(s) or COPY modules by use of compiler directives (e.g., >>imp set format FIXED72). Other custom formats and settings may be specified by the SET compiler directive.

The possible values for sourceFormatEnumeration are:

ValueDescription
FIXED72Default to the standard COBOL fixed “card” format, with columns 1-6 treated as commentary, column 7 as the indicator column, columns 8-12 as Area A, columns 13-72 as Area B, and columns 73-80 as commentary.
FIXED80Default to a modified “card” format where columns 1-6 are treated as commentary, column 7 as the indicator column, columns 8-12 as Area A, and columns 13-80 as Area B.
FREEFORMATDefault to a “terminal” format having no fixed column positions and allowing Area A and B text (the program area) to occupy any positions. There is no limit to the length of a single line.
TANDEMDefault to a fixed format using column 1 as the indicator column, columns 2-6 as Area A, and 7-80 as Area B.
WIDEDefault to a fixed format where columns 1-6 are treated as commentary, column 7 as the indicator column, and columns 8-12 as Area A, and columns 13-512 as Area B.
JAVAThis format is used automatically within embedded Java code. None of the COBOL compiler directives are effective when this format is in effect. This format should not normally be specified for a COBOL program.
LISTFORMATThis format is used by the list-output option in order to permit a program listing to be compiled and produce the same Java class files as the original source program. It specifies a sequence area from columns 1-16, an indicator area in column 17 and a program text area from column 18 to the end of the line.

sticky-linkage

<sticky-linkage>DIALECT_DEFAULT</sticky-linkage>

Directs the compiler to use a particular behavior for LINKAGE SECTION items.

The possible values for linkageEnumeration are:

ValueDescription
NONEthe base address of all LINKAGE SECTION items is always initialized to null prior to receiving actual arguments. Only LINKAGE SECTION items referenced by non-omitted actual arguments are based at the time of each program start. All others will cause a runtime exception if referenced. This behavior is automatically selected if the is recursive aspect is set.
NOT_FORMAL_ARGthe base address of all formal arguments is set to null prior to receiving actual arguments. All other LINKAGE SECTION items will retain the base address (if any) set by previous executions of the program. This is the default behavior of RM/COBOL.
NOT_ACTUAL_ARGthe base address of all actual arguments is set to the address of the actual argument passed. All other LINKAGE SECTION items will retain the base address (if any) set by previous executions of the program, including any items referenced by formal arguments omitted by the calling program.
ALLthe base address is always preserved across calls and is set at initialization time unless set by a SET statement or actual argument.

storage-map

<storage-map>false</storage-map>

Directs the compiler to generate a COBOL storage allocation map if and only if this option is true. The storage map will always be written to the effective listing-output-file.

The possible values for boolean are:

ValueDescription
falseDo not generate a storage map listing.
trueWrite a storage map listing to the listing output file.

synchronize-size

<synchronize-size>0</synchronize-size>

Specifies the alignment size in bytes used when SYNCHRONIZED is specified. The default is 0. This option is accepted in the compiler configuration file. The corresponding command-line form is the internal option --x-synchronize-size and is not documented here.

tab-size

<tab-size>4</tab-size>

The value of this option determines the number of space characters represented by any tab characters found in the COBOL source program. This will normally only affect program behavior when tabs are included within alphanumeric literals since COBOL treats multiple spaces elsewhere as equivalent to a single space. It is recommended that tab characters not be used in COBOL source, as they may unpredictably affect program behavior as outlined.

The possible values for size are any non-zero positive integer. The default value is 4.

terminal-accept-display-mode

<terminal-accept-display-mode>false</terminal-accept-display-mode>

Directs the compiler consider ACCEPT and DISPLAY statements to be RM/COBOL style terminal operations if possible. This is equivalent to specifying CONSOLE IS CRT in the environment division of the program(s).

The possible values for boolean are:

ValueDescription
falseConsider ACCEPT/DISPLAY statements to be strictly "ANSI" mode unless CONSOLE IS CRT is specified or the construction of the statement can only be interpreted as terminal mode.
trueConsider all ACCEPT/DISPLAY statements to be terminal mode if possible.

truncate-binary

<truncate-binary>true</truncate-binary>

Directs the compiler to assume binary data items should be truncated according to the picture provided. This option interacts with the runtime option of the same name in that the runtime option will have no effect if this option is specified as false, since the code to truncate the binary items will not have been generated.

The possible values for boolean are:

ValueDescription
trueGenerate the code to truncate binary items according to the associated picture clause in the data definition and at run time use the setting of the runtime option controlling this behavior.
falseDo not generate any code to truncate binary items according to their picture.

version

--version

Directs the compiler to write the compiler version information to the standard output file.

when-compiled-date-format

<when-compiled-date-format>hh.mm.ssMMM dd, yyyy</when-compiled-date-format>

Determines the format of the alphanumeric data item returned when the "WHEN-COMPILED" special register is referenced in the program(s).

The possible values for dateFormat are any legal strings according to the SimpleDateFormat Java class. The default value is hh.mm.ssMMM dd, yyyy.

words-to-unreserve

<words-to-unreserve>TAB</words-to-unreserve>

The value of this option specifies COBOL words that would normally be reserved words but should be “unreserved” and allowed to be used as user-defined words in the source program. Note that any such unreserved words may no longer be used as keywords and, to the extent that the unreserved word is essential, the features or language elements that normally rely on such keywords may no longer be recognized.

The possible values for the reservedWordList are a space-separated list of valid COBOL keywords. The default is that no words are unreserved. If a word is immediately preceded by a minus - character, the following word is re-reserved if it is unreserved by the chosen dialect, for example.

wrap-control-threshold

<wrap-control-threshold>500</wrap-control-threshold>

Directs the compiler to wrap the control-flow cases when more than the integer number of sections/paragraphs are present. The default should be sufficient for almost every program encountered, but might have to be adjusted for programs with an unusually large number of paragraphs.

The possible values for integer are any non-zero positive integer. The default is 500 paragraphs/sections.

wrapping-threshold

<wrapping-threshold>500</wrapping-threshold>

Directs the compiler to wrap lists of statements in anonymous classes when they contain more statements than the number specified by this option. A slight performance penalty is incurred when this happens, but it substatially eliminates the Java limitation of 65,535 byte-codes per method as a limitation on COBOL program size. The default should be sufficient for almost every program encountered, but might have to be adjusted for particularly unusual programs.

The possible values for integer are any non-zero positive integer. The default is 500 lines (250 when compiling for debug).

xml-declaration-is-standard

<xml-declaration-is-standard>true</xml-declaration-is-standard>

Directs the compiler to specify a standard XML declaration when the XML GENERATE statement is used. The declaration would then include the encoding which, if an alphanumeric target is specified, would specify the actual encoding of the bytes generated. If set to false, the encoding is only included if the target is usage national (i.e., UTF-16), otherwise the encoding is not specified in the declaration. This setting is believed to be consistent with the Micro Focus COBOL standard behavior in this case.

The possible values for boolean are:

ValueDescription
falseOmit the encoding from the XML declaration if it is not UTF-16.
trueAlways include the encoding in any generated XML declaration element.

Z

-Z

Can be used to terminate the parsed options on the command line. This is only necessary if the last parsed option allows a list of values to be specified.