REDEFINES statements in the copybook

When you generate a XOM from a COBOL copybook, a REDEFINES statement generates a Java™ type mapping for each data item that is associated with the REDEFINES statement, but you can use only one of them in the XOM.

You can select only one of these data items to be imported as an attribute in the generated XOM, because in COBOL redefined data items can share the same memory, but Java structures cannot.

For example, in the following copybook you have a REDEFINES statement that is related to DATEString and BIRTHDAY:

01 Borrower.
    05 DATEString PIX X(8).
    05 BIRTHDAY redefines DATEString.
       07 BIRTHYEAR PIC 9(4).
       07 BIRTHMONTH PIC 9(2).
       07 BIRTHDATE PIC 9(2).

When you import the copybook, the default entry on the Redefine page is the data item that is redefined, which in this example is DATEString.

If you want to use an alternative data item in the XOM, click the item and then select the alternative data item.