Migration changes

The migration wizard completes most migration changes without any action on your part. However, in some cases, attributes or methods have changed or are no longer supported and you must take action to complete the migration.

Deprecated feature:

Deprecation icon The COBOL code generation feature is deprecated in V8.5. This feature will be removed in a future release of the product. Use the COBOL Generation Project Migration wizard to migrate your Rules for COBOL project to a zRule Execution Server for z/OS® compatible rule project. See Deprecated features for migration details.

The following sections describe migration changes for a Rules for COBOL project:

Changes that require no additional action

The following changes are made by the migration wizard, and require no additional action.

numeric types

The following table details the changes to numeric types:

Table 1. Changes to numeric types
Usage in COBOL COBOL Example Java™ type mapping in Rules for COBOL Java type mapping in Decision Server
S9(1) through S9(4) pic s9 binary int short
S9(10) through S9(18) PIC 9(10) COMP-3. int long
9(10) through 9(18) usage binary PIC 9999999999 BINARY. int BigInteger
S9(n)v9(n) usage binary PIC S999V9 BINARY. double BigDecimal
usage comp-1 Comp-1 double float
Note:

The business action language (BAL) is unaffected.

For more information, see Designing a BOM for a COBOL model.

Domains

The following table details the changes to domains:

Table 2. Changes to domains
Rules for COBOL implementation Decision Server implementation
  • Provides a dedicated UI for domain creation using Microsoft Excel.

  • Uses a translation property.

  • You must map the copybook item as a Java domain class type.

  • You must predefine the domain class as a Java execution object model (XOM).

  • A new configurable domain feature is supported.

  • The translation property is deprecated.

For more information, see Working with domains and COBOL.

Variable sets

The following table details changes to variable sets:

Table 3. Changes to variable sets
Rules for COBOL implementation Decision Server implementation

For a variable set, uses the initial value column to define both the type mapping and the initial value. For example:

DataItem.intitem(“pic 9(5)”, 12345)
DataItem.shortitem(“pic 9(3)”, 12)
DataItem.longitem(“pic 9(11)”, 123456)
DataItem.stringitem(“pic x(5)”, “C0”)
DataItem.doubleitem(“9v9”, 123.456)

Applies the COBOL type setting configuration for the Java to COBOL type mapping.

The initial value column contains only values.

Note:

The migration wizard extracts the initial values during the migration.

For more information, see Variable mapping for COBOL.

COBOL code generation

The following table details the change to the location of configuration data for COBOL code generation:

Table 4. Changes to COBOL code generation
Rules for COBOL implementation Decision Server implementation
Stores configuration data for COBOL code generation in a cobol_extension Business Object Model (BOM). Stores configuration data for COBOL code generation in CobolGenConfig.xml under <RuleProject_Dir>/resources/cobol.
Note:

The cobol_extension BOM is replaced with CobolGenConfig.xml during the migration.

For more information, see Generating a COBOL XOM.

Encoding and code pages

The following table details the change to encoding:

Table 5. Changes to encoding and code pages
Copybook sample Decision Server implementation
Uses the BOM properties. Uses a compile option at the project level.

For more information, see Setting the copybook importer options.

Changes that require you to take additional action

The following sections describe changes that require you to take additional action after running the migration wizard.

Variable length tables

The following changes are made to tables that use Occurs Depending On:

  • odoTable is changed from type Array to type List.

  • odoObject is deleted.

Table 6. Changes to variable length tables
Copybook implementation Rules for COBOL implementation Decision Server implementation
01 Root.
  05 odoObject pic 9.
  05 odoTable pic x(20) occurs 0 to 10 times depending on odoObject.
Root {
   int odoObject;
   String[] odoTable;
}
Root{
   List<String> odoTable;
}
Note:

The business action language (BAL) is unaffected.

Required action: Take either of the following actions to replace the deleted ODO object:

  • Use the size of the Root.odoTable List to represent the Root.odoObject usage in rules.

  • Add a read-only attribute to the BOM to replace the deleted Root.odoObject attribute and implement a B2X mapping for the added attribute using the size of Root.odoTable list.

Note:
  • If you add a read-only attribute to the BOM, you cannot generate COBOL code from the migrated rule project.

  • If you have rules that assign a value to Root.odoObject, you must rewrite these rules to handle the read-only restriction.

For more information, see Table mapping between COBOL and Java.

Redefines

The following table details the change to redefines statements. BOM attributes that you do not select in the migration wizard configuration are deleted.

Table 7. Changes to redefines statements
Copybook implementation Rules for COBOL implementation Decision Server implementation
01 Root.
  05 redefined-item pic 9.
  05 redefining-item redefines redefined-item pic x.
Root{
   int redefined_item;
   String redefining_item;
}

You choose one item to import. For example, if you choose redefined-item, the BOM contains:

Root{
    int redefined_item;
}

Required action: Update any rules that use the deleted BOM attributes.

For more information, see REDEFINES statements in the copybook

Level 88 data items

BOM Methods for Level 88 item conditions are deleted.

Required action: Rewrite the rules or regenerate the BOM methods for the level 88 data item conditions that were deleted.

To support the COBOL code generation, you must add the COBOL method mapping for manually created BOM methods.

Data types

The following table details changes to data types. Data types are not supported. The BOM items that correspond to these data types are deleted during migration.

Table 8. Changes to data types
Copybook sample Rules for COBOL implementation zRule Execution Server for z/OS implementation
01 Root.
    05 Alphabetic pic A(20).
    05 AlphaNumericEdited pic XBX
    05 NumericEdit pic 9B9.
    05 ExternalFloat pic +99V9E99
Mapped to string. Not supported.

Required action: Regenerate the deleted BOM attributes for the unsupported COBOL data types.

To regenerate the BOM attributes:

  1. Update the copybook to ensure that it uses only supported COBOL data types.

  2. Update the COBOL XOM to reflect the copybook changes.

  3. Update the BOM to reflect the updated Java XOM.

For more information, see COBOL data item mapping to Java structures and Handling data type differences between Java and COBOL.

Optional migration changes you can make manually

The following migration changes are optional because Decision Server for z/OS is compatible with their existing implementations.

COBOL mapped methods

The following table details a change to COBOL mapped methods. You no longer need to use an index value to reference the current element in an array. Instead, you use the {} placeholder.

Copybook implementation Rules for COBOL implementation Decision Server implementation
01 Root.
    05 CreditCard occurs 5 times.
       10 name pic x(20)
       10 name pic x(20)
       10 ids pic 9(10)
CreditCard{
public boolean 
validateCardbyID(int Ids);  }
Mapped method body:
move 'F' to <return> 
IF {ids} = ids of CreditCard of Root(Index1 of <this>)
set BoolValue of <return> to true
END-IF
Mapped method body:
move 'F' to <return>
IF {ids}=ids of {this}
set BoolValue of <return> to true
END-IF

If your rule project includes an index placeholder in a COBOL mapped method, choose one of the following options for the rule project:

  • Continue using index placeholders to refer to array elements in the project. This is the default option. It requires no manual action.

  • Enable the use of the new placeholders and update existing placeholders to use {} placeholders. Note that once you enable the use of the new placeholders, you cannot revert to using index placeholders.

To use the new {} placeholders in the rule project, change the default configuration for the migrated project by adding the following statements to its <rule project>/resources/cobol/CobolGenConfig.xml file:

<CobolGenConfig>
<CompatibleMode compatible="false" />
</CobolGenConfig>

For more information, see Implementing BOM methods for COBOL code generation.