IBM BPM, V8.0.1, All platforms > Authoring services in Integration Designer > Services and service-related functions > Access external services with adapters > Configure and using adapters > IBM WebSphere Adapters > Flat Files > Configure the module for deployment

Converting business objects to COBOL copybook files during outbound processing

Use the external service wizard in IBM Integration Designer to generate business object definitions from a COBOL program source file. These business object definitions are used during outbound processing.

Before you perform this task, make sure that:

  1. You have created a module in IBM Integration Designer.

  2. The COBOL program source file (.ccp file) is in a local directory on your workstation.

  3. If you are going to generate a wrapper business object definition, you have imported the adapter RAR file into your workspace.

Use the external service wizard to generate a business object definition for a COBOL program source file. After you generate the business object definition, you can optionally rerun the external service wizard to generate a wrapper business object definition from the generated business object.


Procedure

  1. Generate the business object definition for the COBOL program source file.

    1. In the Business Integration section of the window, right-click the module and select New > New Business Object From External Data.

    2. In the Select an Input Source window, select Languages -> COBOL. Click Next.

      Figure 1. The Select an Input Source window

    3. In the Provide Details for the Mapping window, make sure the Selected mapping value is COBOL to Business Object. Click Browse and select the .ccp file.

      For example, taderc99.ccp can be the name of the .ccp file. Click Next.

    4. In the Select Data Structures window, click Find. The new business object, called DFHCOMMAREA is displayed.

    5. Select the business object DFHCOMMAREA and click Next.

    6. In the Generate Business Objects window, specify the Module, Folder, Name. Select Generate style from the list and click Finish.
    A business object, called DFHCOMMAREA is created in the module.

  2. Optional: Generate a wrapper business object definition. Wrapper business object definitions wrap existing business object definitions with additional function. The option to generate wrapper business object definitions is displayed only when the adapter RAR file is imported into the workspace.

    1. In the Business Integration section of the window, right-click the module and select New > New Business Object From External Data.

    2. In the Select an Input Source window, expand Adapters and select Flat File. Click Next.

    3. In the Specify the Location window, select the module in the Module field and click Next.

    4. In the Specify the Properties window, click Browse and select the business object created in Step 1.

      For example, DFHCOMMAREA for the data type.

    5. To generate a business graph, select the Generate business graph for each business object check box. To generate a retrieve wrapper, select the Generate retrieve container to retrieve multiple business objects check box.

      Figure 2. The Specify the Properties window

    6. Click Finish.
    A wrapper business object and a business graph, called DFHCOMMAREAWrapper and DFHCOMMAREAWrapperBG as shown in the figure, are listed for the current module in the Business Integration window. If wrappers for retrieve are selected, then business object called DFHCOMMAREARetrieveWrapper and a business graph called DFHCOMMAREARetrieveWrapperBG are also listed for the current module in the Business Integration window.

    Figure 3. The wrapper business object and the business graph listed in the Business Integration window

  3. Generate the required artifacts for the COBOL copybook outbound module. This example shows the configuration for a Create operation.

    1. In the Business Integration section of the window, right-click the module and select New > External Service.

    2. Select Adapters and click Next.

    3. In the Select an Adapter window, select IBM WebSphere Adapter for Flat Files (IBM : 7.5.0.2) adapter and click the CWYFF_FlatFile connector project. Click Next.

    4. In the Select the Processing Direction window, select Outbound.

    5. Click Next.

    6. In the Specify the Security and Configuration Properties window, from the Data format options list, select Use COBOL, C or PL/I data format option. Click Next.

      This option is not a data binding, but a data binding generator. The tool generates the appropriate data binding code for you in the current module.

      Figure 4. The Specify the Security and Configuration Properties window

    7. In the Add, Edit, or Remove Operations window, click Add.

    8. In the Specify the I/O Properties window, select Create in the Operation kind field. For Retrieve operation, select Retrieve.

    9. Select User-defined type for the Data type for the operation field. Click Next.
    10. Browse for the input type (DFHCOMMAREA, DFHCOMMAREAWrapper, or DFHCOMMAREAWrapperBG) and click OK. For Retrieve operation, browse for the appropriate input type (DFHCOMMAREA, DFHCOMMAREARetrieveWrapper, or DFHCOMMAREARetrieveWrapperBG).

      Figure 5. The Data Type Selection window

    11. Click Next and complete the external service wizard.

    The data bindings used by COBOL copybook, WSDL files, import files, and other artifacts are generated. See the Project Explorer window for the generated data binding classes.

    Figure 6. Data bindings used by COBOL copybook, WSDL files, import files, and other artifacts

    data bindings used by COBOL copybook, WSDL files, import files, and other artifacts are listed in the Business Integration window" />


Results

A business object, a wrapper business object, and a business graph are created for the COBOL program source file for the outbound module. Artifacts are generated for an outbound Create operation that uses COBOL copybook data binding. This module can be deployed on IBM BPM or WebSphere Enterprise Service Bus and tested for a Create operation.

To generate artifacts for other supported operations (Append and Overwrite), follow the same steps, beginning with Step 3h.


What to do next

Deploy the module.

Configure the module for deployment


Previous topic: Defining business objects


Next topic: Converting COBOL copybook files to business objects during inbound processing