You use mapped methods to implement more complex COBOL
bodies, using COBOL paragraphs.
About this task
Note: The COBOL code generation feature is deprecated
in V
8.5.1.
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. For more information, see
Migrating from Rules for COBOL.
You create a mapped method by creating a method in Rule
Designer and
then implementing the COBOL code for the method.
Procedure
To create a mapped method:
- In the Rule Explorer, open the BOM editor for the required
class.
- On the Class page, in the Members section,
click New.
- In the New Member dialog, on the Member page,
make the following entries:
- Select the Method radio button.
- In the Name field, type a name
for the method.
- Select the required Java™ Type for
the method.
- Click Add, and in the Method
Argument dialog, make the following entries.
- In the Name field, type a name
for the parameter.
- In the Type field, type or select
the required argument type.
- Click OK to close the Method
Argument dialog.
- Click Finish to close the New
Member dialog.
- In the BOM Editor, in the Member verbalization section,
type a navigation phrase in the Template field.
- Save your work.
The Mapped Method table
displays the data type definitions for the method.
Each line of the mapped method is stored as a BOM property
of the BOM class. You can change the default definitions at project
level and make certain changes at method level, using the COBOL
Data Type Editor. For information about changing data
definitions, see Changing data definitions for mapped method parameters.
- To implement the method in COBOL code:
- In the Rule Explorer, double-click the new method.
- On the Member tab, scroll down
to the COBOL method area and then click Create
a mapped method.
- In the Body section, use the COBOL
Method Body Editor to write a COBOL paragraph to implement
the method.
- Save your work.
Results
The method will be included in the generated COBOL code,
and the generated code can exchange data with the COBOL calling program.