Mapping PL/I data items to boolean and date types

The boolean and date types do not exist in PL/I. When you generate a XOM from a PL/I include file, you can use a predefined type converter to change the default mapping of PL/I data items to Java™ boolean and date types.

About this task

If you want to use Java boolean and date types in your XOM, you can use the predefined boolean and date type converters to convert PL/I character, picture character (pic 'AX9'), or unsigned picture integer (pic '9') data items to the Java boolean or date type.

You access the predefined type converters when the XOM generation wizard displays the Configure PL/I XOM Mapping page. The page shows the default PL/I to Java type mappings.

Procedure

  1. On the Configure PL/I XOM Mapping page, click a data item in the PL/I Structure pane that you want to remap.
  2. In the XOM Mapping table, right-click a row and select Add Converter.
  3. On the Configure Converter Settings page, select a converter that you want to use.
  4. Type the value that you want to use:
    • To convert to boolean, define the True value and False value by using any string or number.

    • To convert to date, in the Date format field, enter the format in which the date is stored within the PL/I string, such as yyyyMMdd or dd/MM/yyyy.

    Important: Boolean and date types do not support signed numbers.
  5. Click OK.

    On the Configure PL/I XOM Mapping page, the Converter column displays Applied, indicating that the default mapping is changed.

  6. Click Finish when you are ready to generate the XOM.