Setting the copybook importer options

The COBOL copybook import options must match the locale and character settings of the COBOL calling program.

About this task

You can change the default COBOL copybook importer options to match the locale and character settings of the COBOL calling program you will use to execute the rules. You must configure the importer options before you import the copybook and generate the COBOL XOM.

Note:

If you change the copybook importer settings after you generate the COBOL XOM, it can cause unpredictable results for COBOL code generation.

Procedure

To set the copybook import options:

  1. In Rule Designer, right-click your rule project and then select Properties > COBOL Management > COBOL Import Options.
  2. On the COBOL Import Options page, change any of the following default settings, as required:
    Field Description
    Runtime code page

    Specifies the character coding set.

    For languages such as Chinese and Japanese, you can select a code page that includes the EBCDIC double-byte character set.

    Compile time locale name

    Select locale used by the COBOL importer to associate the copybook with correct locale.

    This option works in conjunction with the copybook import code page.

    Copybook import code page

    Select the required code page for the ASCII character.

    This code page ensures that the imported the copybook is correctly encoded for any ASCII characters.

    TRUNC

    Specifies how numeric type data items are truncated. It affects COBOL BINARY, COMP, and COMP-4 types. This value must match the value used to compile the COBOL calling program.

    • STD: The value is constrained to the PICTURE string. For example, if you have a PICTURE clause of PIC S999 the range of values that you can set are from -999 to 999.

    • OPT is a performance option. When TRUNC(OPT) is in effect, the compiler assumes that data conforms to PICTURE specifications in USAGE BINARY receiving fields in MOVE statements and arithmetic expressions. The results are manipulated in the most optimal way, either truncating to the number of digits in the PICTURE clause, or to the size of the binary field in storage (halfword, fullword, or doubleword).

      Use this option only if you are sure that the data being moved into the binary areas will not have a value with larger precision than that defined by the PICTURE clause for the binary item.

    • BIN: The value is constrained by the size of the storage required by the PICTURE string. For example, for 02 ANUM PIC 9999 BINARY which is an unsigned PICTURE string with four9s, the required storage size is 2 bytes. The valid range of values is 0 to 65535.

      Normally, CICS® or IMS COBOL programs are compiled with the TRUNC(BIN) option.

    NSYMBOL

    Identifies how the compiler should interpret the N symbol used in literals and picture clauses:

    • NATIONAL: Treat as a NATIONAL character. It indicates that the data being stored is UNICODE data, stored using UTF-16.

    • A COBOL data item with a USAGE DISPLAY-1 clause is treated as DBCS. If you select DBCS, even a NATIONAL item with USAGE NATIONAL will be handled as a DBCS character.

    This value must match the value used to compile the COBOL calling program.

  3. Click OK to save your changes.