Setting COBOL Importer Preferences

You can set the COBOL importer preferences for an individual file import through the J2C wizard, or you can change the default compiler options using the COBOL importer preference page.

Procedure

  1. Select Window > Preferences.
  2. Expand the Importer option and select COBOL under the General tab. The following parameters can be modified:

    COBOL importer preferences: general

    Parameter Options Description Default Value
    Platform
    • Win32
    • AIX®
    • x/OS
    • Not Specified
    The platform on which the COBOL program runs. Selecting a platform sets the other Platform Information attributes to default values that are appropriate for that platform. The platform default values still can be changed individually. For IMS™ select z/OS®.
    • Win32
    Code Page Selection
    • Numerous options
    The Codepage of the COBOL program on the target platform.
    • ISO-8859-1
    Floating Point Format
    • IEEE 754
    • IBM® Hexadecimal
    The floating point format (IBM or IEEE). When the byte representation of floating point numbers is as defined in IBM z/Architecture® Principles of Operation this is referred to as an IBM 390 Hexadecimal floating point format. When the byte representation of floating point numbers is as defined by IEEE standard 754, this is referred to as an IEEE Non-Extended floating point format.
    • IEEE 754
    Endian Little The little endian representation of integer data. When the byte representation of integers is ordered from the least significant byte to most significant byte, this is referred to as a little endian representation.
    • Little
    Big The big endian representation of integer data. When the byte representation of integers is ordered from the most significant byte to the least significant byte, this is referred to as a big endian representation.  
    Remote integer endian Little This property complements working with user exits, such as DFHCNV macros. The supplied DFHCNV macros manipulate 2 byte and 4 byte integers, but not 8 byte integers. You can use the endian property to control the format of 8 byte integers, and use the remote integer endian property to control the format of 2 byte and 4 byte integers. If no user exit exists, or if the user exit does not manipulate the endian character integers, then you must specify the same value that is used for the endian property.
    • Win32
    Big This property complements working with user exits, such as DFHCNV macros. The supplied DFHCNV macros manipulate 2 byte and 4 byte integers, but not 8 byte integers. You can use the endian property to control the format of 8 byte integers, and use the remote integer endian property to control the format of 2 byte and 4 byte integers. If no user exit exists, or if the user exit does not manipulate the endian character integers, then you must specify the same value that is used for the endian property.  
    External decimal sign ASCII Controls data conversion for external decimal COBOL data types. If the COBOL program is running on a machine whose codepage is American Standard Coded Information Interchange format (ascii), select ASCII.
    • ASCII
    EBCDIC Controls data conversion for external decimal COBOL data types. If the COBOL program is running on a machine whose codepage is Extended Binary Coded Decimal Interchange Format (EBCDIC), select EBCDIC.  
    EBCDIC Custom Controls data conversion for external decimal COBOL data types. This property allows DFHCNV macros to be used to convert external decimal data types, and then corrects the codepoint which contains the sign bit.
    Host Code Page:
    When ASCII-to-EBCDIC data conversion is performed by a DFHCNV macro inside a CICS® region, some of the code points in the EBCDIC code page are variant depending on the EBCDIC code page of the host system. In order to correctly convert the external decimal data, the EBCDIC code page must be specified for sign bit conversion
     
    Quote
    • double (")
    • single (')
    DOUBLE: A figurative constant or reserved word that represents one or more occurrences of the quotation mark character (") when the QUOTE compiler option is in effect. This value must match what was used to compile the COBOL program that you are targeting. Refer to the COBOL Programming Guide for details on these options.
    SINGLE: A figurative constant or reserved word that represents one or more occurrences of the apostrophe character (') when the APOST compiler option is in effect. This value must match what was used to compile the COBOL program that you are targeting. Refer to the COBOL Programming Guide for details on these options.
    • DOUBLE
    TRUNC
    • STD
    • OPT
    • BIN
    STD: Affects COBOL BINARY, COMP, and COMP-4 types. For STD, values that are set are constrained to the PICTURE string. This value must match what was used to compile the COBOL program that you are targeting. For example, if you have a PICTURE clause of PIC S999 the range of values that you can set are from -999 to 999. Normally, CICS or IMS COBOL programs would be compiled with the TRUNC(BIN) option. Refer to the COBOL Programming Guide for details on these options.
    OPT: Affects COBOL BINARY, COMP, and COMP-4 types. For OPT, the value matches the PICTURE string. For example, 02 ANUM PIC 9999 BINARY the range of possible values is 0 to 9999. This value must match what was used to compile the COBOL program that you are targeting. Normally, CICS or IMS COBOL programs would be compiled with the TRUNC(BIN) option. Refer to the COBOL Programming Guide for details on these options.
    BIN: Affects COBOL BINARY, COMP, and COMP-4 types. For BIN, the value is constrained by the size of the storage required by the PICTURE string. For example, 02 ANUM PIC 9999 BINARY an unsigned PICTURE string with 4 nines, the required storage size is 2 bytes. The valid range of values is 0 - 65535. This value must match what was used to compile the COBOL program that you are targeting. Normally, CICS or IMS COBOL programs would be compiled with the TRUNC(BIN) option. Refer to the COBOL Programming Guide for details on these options.
    • STD
    NSYMBOL
    • NATIONAL
    • DBCS
    NATIONAL: Controls the interpretation of the "N" symbol used in literals and picture clauses. NATIONAL means that the USAGE NATIONAL clause is specified. This indicates that the data being stored is UNICODE data, stored using UTF-16. This value must match what was used to compile the COBOL program that you are targeting. Refer to the COBOL Programming Guide for details on these options.
    DBCS: Controls the interpretation of the "N" symbol used in literals and picture clauses. DBCS means that the USAGE DISPLAY-1 clause is specified. This indicates that the data being stored is DBCS data. This value must match what was used to compile the COBOL program that you are targeting. Refer to the COBOL Programming Guide for details on these options.
    • NATIONAL
  3. To change the advanced COBOL compiler preferences, select the More COBOL options tab. The following parameters can be modified:

    COBOL importer preferences: More COBOL options

    Parameter Options Description Default Value
    Compile Time Locale Name For a list of the valid Locale and the corresponding code pages supported, see Locales and code pages supported
    COBOL for Windows uses the POSIX-defined locale conventions. Locale value syntax: ll _CC.codepageID where
    • ll refers to a lowercase two-letter ISO language code
    • CC refers to an uppercase two-letter ISO country code
    • codepageID refers to the code page to be used for native DISPLAY and DISPLAY-1 data

    You must code a valid value for the locale name (ll CC) and a valid code page (codepageID) that corresponds to the locale name, as listed in Locales and code pages supported.

    You can use the characters that are represented in a supported code page in COBOL names, data definitions, literals, and comments. The locale in effect determines the code page for compiling source programs (including alphanumeric literal values). That is, the code page that is used for compilation is based on the locale setting at compile time. Thus, the evaluation of literal values in the source program is handled with the locale in effect at compile time.

    en_US
    ASCII code pages IBM-1252

    For a given locale name, the last one in the set of ascii code pages is chosen as the default, since they more common (because they are newer).

    Error messages languages
    • EN_US
    • JA_JP
    • ZH_TW
    • ZH_CN
    • KO_KR
    • IT_IT
    • FR_FR
    • ES_ES
    • DE_DE
    • PT_BR
    This gives you the option to select the language that error messages appear in. Default is the current locale in which eclipse is running.
    Currency Sign   You can use the CURRENCY option to provide an alternate default currency symbol to be used for the COBOL source. The CURRENCY SIGN value must be a valid COBOL alphanumeric literal (including a hexadecimal literal) representing a single character. For example, '$' or "$" or X'9F" or x'9F'. Default value is "$".
    SOSI
    • Checked
    • Cleared
    Use the SOSI compiler option to specify if DBCS character strings in a literal are delimited by the shift-out and shift-in characters. The default is dependent on the platform that is selected in the General tab:
    • Win32: NOSOSI
    • AIX: NOSOSI
    • z/OS: SOSI
    COLLSEQ
    • EBCDIC
    • LOCALE
    • BIN
    • EBCDIC: Select this option to use the EBCDIC collating sequence rather than the ASCII collating sequence.
    • LOCALE: Select this option to use locale-sensitive collation (consistent with the cultural conventions for collation for the locale).
    • BIN: Select this option to use the hexadecimal values of the characters; the locale setting has no effect.
    The default is dependent on the platform that is selected in the General tab:
    • Win32: BIN
    • AIX: BIN
    • z/OS: EBCDIC
    NCOLLSEQ
    • LOCALE
    • BIN
    • LOCALE: Select this option to use the algorithm for collation order associated with the locale value in effect.
    • BIN: Select this option to use the hexadecimal values of the character pairs.
    The default is dependent on the platform that is selected in the General tab:
    • Win32: BIN
    • AIX: BIN
    • z/OS: BIN
    File Extension Support   Using the File Extension Support table, you can change the default extension behavior. You can assign an extension to contain a full program or data structures only.

    File Extension support

     

    Support for Copybooks In Arbitrary Directories

    To add the ability to import a COBOL source that has dependency on copybooks that are in arbitrary locations, you can add various directory locations using the COBOL preference page SYSLIB tab.

    SYSLIB page
    To add the ability to import a COBOL source which has dependency on copybooks that are in arbitrary locations, the user can add various directory locations using the COBOL preference page "SYSLIB" tab.

    You can add, remove, or edit these entries. Clicking Edit opens the following window:Edit dialog

    Move Up and Move Down allow you to change the order of these directories. The COBOL importer looks for copybooks in the directories in the specified order.


Feedback