Compiler Options
Note:
Some compiler options that can be set individually require that a standard option be explicitly disabled. This is noted in the entry for the respective option (for example, -dznt).
In principle, permanently implemented default compiler options can be disabled by explicitly listing them in the list of compiler options with a # at the beginning (for example, #dzta). This must be done before mentioning the additional compiler option. Since the # is not interpreted as # in some code pages, there is also the option of listing the corresponding standard compiler option with a preceding -no- in the list of compiler options (for example, -no-dzta). You can use the compiler listing (STDOUT) to check whether the compiler has actually disabled the option.

Option | Description
-apost | Causes the figurative constants QUOTE and QUOTES to be considered as single quotes. This corresponds to the IBM COBOL compiler option APOST.
-arc | Reports a severe error when the number of digits in the PICTURE clause is greater than 18. This corresponds to the IBM COBOL compiler option ARITH(COMPAT).
-b | Treats characters as bytes in STRING, UNSTRING, and INSPECT statements.
-cax | Specifies the default file assignment as external.
-cghv | Uses group host variables in ESQL statements. This option is useful when the program contains a group variable that exactly matches the list of fields used in the query. In this case, the user is not forced to list all the subordinate items in the ESQL statement, and can instead use only the name of the group variable.
-cod1 | Affects data items that appear after a variable-length table in the same record. With -cod1, these items always immediately follow the table, regardless of its size. The addresses of these items changes as the size of the tables changes.
-coe | Closes all files opened by the program at program exit.
-crv | Sets a varying size of implicit records for files with multiple record definitions with different lengths, and for files with varying records. If you do not set -crv, files are treated as fixed length and the maximum record length is used. This option affects files that include two or more record definitions with different sizes as well as files that include -cod1.
-csl | Treats the COBOL name in ASSIGN clause as a literal.
-csdb2 | Treats ESQL in a way that is compatible with IBM DB2. The SQL-INIT-FLAG data item is implicitly defined. Supports SQLDA for dynamic SQL. Peculiar handling of functions with date and time parameters. Supports DECLARE hostvar FOR BIT DATA. Supports the VALUES INTO statement.
-csqq | The compiler leaves quotes inside ESQL statements as they are. Without this option, the compiler translates all types of quotes to single quotes. This corresponds to the IBM COBOL compiler option APOSTSQL.
-csqq2 | The compiler switches quotes inside ESQL statements: single quotes become double quotes, and double quotes become single quotes. This corresponds to the IBM COBOL compiler option QUOTESQL.
-cudc | Treats numeric USAGE DISPLAY data as characters during a process of comparison or moving. If you set this option, numbers with a DISPLAY usage are compared byte by byte instead of comparing their numeric representation. The byte by byte comparison is used: when comparing two unsigned numbers with DISPLAY usage having the same length and the same number of decimal digits. when comparing an unsigned integer number and an alphanumeric elementary item with the same length. an unsigned number with DISPLAY usage with ZERO (ZEROES, ZEROS) or 0. The comparison is made comparing each digit within the number, byte by byte, with the character 0. when comparing an unsigned number with DISPLAY usage with SPACE (SPACES) or "". The comparison is made comparing each digit within the number, byte by byte, with the character ” ”. This option affects the MOVE statement when one operand is a USAGE DISPLAY unsigned numeric data item, a numeric constant, or a numeric literal and the other one is an unedited alphanumeric item. when the sender operand is an alphanumeric data item and the receiver operand is a USAGE DISPLAY numeric data item During the byte by byte move, the sender operand is considered as containing only one digit, the string representation of an integer number, and no check is performed on the real content. For example: MOVE "FA" TO PIC-XX MOVE PIC-XX TO PIC-9 = A MOVE PIC-XX TO PIC-99 = FA MOVE PIC-XX TO PIC-999 = 0FA MOVE PIC-XX TO PIC-Z = A MOVE PIC-XX TO PIC-ZZ = FA MOVE PIC-XX TO PIC-ZZZ = 0FA MOVE PIC-XX TO PIC-V9 = 0 MOVE PIC-XX TO PIC-9V9 = A0 MOVE PIC-XX TO PIC-9V99 = A00 when the sender operand is a USAGE DISPLAY unsigned numeric data item and the receiving operand is an unedited alphanumeric data item. During the byte by byte move, the first operand is considered as an alphanumeric item. when the sender and the receiver operands have an identical PICTURE and USAGE. During the byte by byte move, both operands are considered as alphanumerics.
-cv | IBM COBOL compatibility flag. This flag ensures that the Jopaz compiler supports IBM COBOL specific syntax. For example: USE FOR DEBUGGING and WITH DEBUGGING MODE.
-cva | IBM arithmetic compatibility. This flag ensures that IBM COBOL specific arithmetic operations are performed correctly. In the example compute res = (11/4) * 4 If you declare res as PIC 99, res is set to 8. If you declare res as PIC 99v99, res is set to 11.00. If the -cva option is not used, the result is 11.
-cva2 | IBM arithmetic compatibility is treated differently when it comes to powers. If the expression of the COMPUTE statement contains a power whose exponent is one of the following, the standard -cva rules are not applied: a number a data item with decimals an expression containing only numbers or data items with decimals In all other cases, the behavior is the same as when the -cva option is set.
-d | Includes debug information. An additional class file is generated to store debug information. The resulting classes don’t include the source code. Source files must be available to the Debugger during the debug session.
-dx | Enables extended debugger functions. This option implies -d. All variables in the class are generated. All variables that are not used in the program are also generated. The literal constants that are generated during the execution are generated not as static fields in the generated class. The Debugger is able to query and set all the items of the program Data Division including the items that are not used in the Procedure Division. The IDE allows the source code to be changed while debugging.
-dcii | Uses IBM sign encoding and IBM COMP sizes. COMP sizes are 2, 4, 8, or 16 depending on the item picture.
-dv=0 | If -dv is omitted, the compiler behaves as if -dv=32 was specified. That means that data items specified without a VALUE clause are filled with ASCII spaces by default.
-dznt | When this option is in effect, the values that can be held in binary data types are limited only by the number of bytes of storage. However, the PICTURE is used when moving data from a binary number to a non-numeric data item. This corresponds to the IBM COBOL compiler option TRUNC(BIN). By adding #dzta -dznt to the compiler options in COMOPT, Jopaz can use this option. This is necessary to overwrite the default option.
-dzta | Each numeric data item stores values up to the size of its PICTURE, but COMP-5 items ignore the PICTURE when determining the largest value they can hold. However, COMP-5 items do use their PICTURE when moving a value to a non-numeric data item. This corresponds to the IBM COBOL compiler option TRUNC(STD). This is the default behavior of the compiler.
-g | Includes SMAP information. When an exception occurs during the runtime session, the exception stack contains COBOL source code references. This makes it easier for the programmer to identify the statement that caused the exception. This feature does not work if the program is compiled with the javac option -g:none. This feature does not work if jopaz.exception.java is set to true in the configuration. This feature follows the Java guideline for remapping non-Java languages. Third-party tools (for example, some profilers) that are unaware of these guidelines may display Java source locations in the stacks even when -g is used.
-la | Outputs full listing in ANSI fixed format. The list file contains all the source code. All the copybooks are merged into it unless the SUPPRESS clause is used in the COPY statement. In most cases, it can be compiled as this is a standard COBOL program. If used along with -ld, only the source part is generated in ANSI fixed format, datamaps are always in free format.
-ld | Outputs full listing and data map to a .list file. The file contains all of the source code and the datamaps. All copybooks are merged into it unless the SUPPRESS clause is used in the COPY statement. The datamap information is stored at the bottom of the list file and provides the following information for each data item described in the program Data Division: source line, item name, offset in the case that the item is part of a group item, physical length, section in which the item is defined, type flags, item type, and how the item is referenced in the Procedure Division.
-lf | Outputs full listing to a .list file.
-lo=DirName | Specifies the directory where .list files are to be stored.
-m1 | Puts all of WORKING-STORAGE into a contiguous block of memory. If you use the -m1 option, you must comment out or remove the property jopaz.array_check=1, or change the value to 0.
-noadv | This option is used as an IBM COBOL compatibility for compiler option NOADV. Prevents the file from being created with an additional byte in the Logical Record Length (LRECL) if you are using a record format (RECFM) with ANSI (A) or machine code (M) formatting. Use -noadv if you already adjusted record length to include 1 byte for the printer control character.
-od=DirName | Specifies the output directory for classes.
-pt2 | The -pt options control the behavior of returns from code executed during a PERFORM statement. The flag -pt2 supports compatibility with mainframe behavior of OS/VS COBOL, DOS/VS COBOL, VS COBOL II, and COBOL/370.
-rw=word | Suppresses reserved words. Multiple words must be separated by commas. For example, when a program contains variable 77 PRINTER PIC X(32), this option must be used: -rw=PRINTER
-sa | Specifies Force Fixed (also known as ANSI) source format. The same effect can be obtained using the SOURCE directive by specifying the following at the top of the source file: >> SOURCE FORMAT FIXED
-sns=Statements | Use this option to avoid "code too large" compiler errors or to optimize the compiled class file. This option sets the maximum number of COBOL statements that the compiler should keep together in a single generated Java method. A reasonable value for this option is 200. If the ”code too large” error persists, try lower values. The "code too large" error occurs when the bytecode size of a single method exceeds 65,536 bytes, which is one of the static constraints on the instructions in Java virtual machine code in a class file. For COBOL, this means that the compiler code generator must split large COBOL paragraphs and sentences into multiple Java methods.
-sp=Copypath | Specifies all paths in which COPY files can be found.
-sqlj | Generates SQLJ code for the embedded SQL of the program.
-sqljdiag | Supports the COBOL GET DIAGNOSTICS statement during compilation.
-verbose | Displays verbose output such as the count of errors, informational, and warnings.
-wdbz | Show warnings for possible division by zero without ON SIZE ERROR messages.
-xjc | Generates the .class file.

Notes
You can set compiler options both in the source code and in the general configuration in COMOPT via the jopaz.compiler.options= property. Setting compiler options this way works similarly to other COBOL compilers with inline compiler options.
The IMP OPTION directive sets compiler options for a program. This directive must appear as first row in the source file and must start from column 12. It cannot be used in the body of the source code. For example:
>>IMP OPTION "-noadv"
IDENTIFICATION DIVISION.
PROGRAM-ID. PRTFCDEX.