Jopaz 1.2.0 | Getting Started with Jopaz | Configuring Jopaz | Configuring Compiler (COMOPT) | Compiler Options
 
Compiler Options
Option
Description
-apost
Causes figurative constants QUOTE and QUOTES to be considered as single quotation marks.
-b
Treats characters as bytes in STRING, UNSTRING, and INSPECT statements.
-cax
Specifies the default file assignment as external.
-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 deffinitions with different lenghts, 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.
-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.
-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
This option represents the IBM COBOL compiler option TRUNC(STD).
This flag provides a relaxation of the size checking rules in compatibility with the micro focus NOTRUNC directive.
If this flag is set, the values that can be held in binary data types are limited only by the number of bytes of memory.
-la
Outputs full listing in ANSI fixed format. The list file contains all the source code. All thecopybooks 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 contigious 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 exapmple, 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 at the top of the source file:
>> SOURCE FORMAT FIXED
-sp=Copypath
Specifies all paths in which COPY files can be found.
-verbose
Displays verbose output such as the count of errors, informational, and warnings.
-wdbz
Show warnings for possible divison 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.