Custom types

You can add your own custom types and map COBOL data items to them.

Rule Designer provides an API that you can use to add your own type converters, so that you can map COBOL data items to your own Java™ types.

For example, you might have the following copybook entry:

01 Loan.
    05  approved PIC 9(2).

When you import the copybook to generate the XOM, the default Java type for the COBOL item approved is short. You might want to convert this type to a Java Boolean type, but with different behavior to the predefined Boolean type converter. In this case, you can create your own type converter.

Note:

You can define custom type converters only for zRule Execution Server for z/OS deployment, not for COBOL code generation.

You define custom types in a Java project and then reference this project from your rule project. You then use the type converter to replace the default Java type with the custom type. You use the type converter when you create the XOM from a COBOL copybook.