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 COBOL copybook files to business objects during inbound 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 inbound processing.

Before you perform this task, make sure that:

  1. You created a module in IBM Integration Designer.

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

  3. You have created a local event directory.

  4. 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 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 in the figure, 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.

      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.

    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 inbound module.

    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 Inbound and click Next.

    5. In the Event directory field, click Browse and select the event directory.

    6. From the Function selector options list, select the default value.

    7. From the Data format options list, select the 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

    8. If the input file contains multiple COBOL program source files, you can enable file splitting by size or by delimiter. To enable file splitting, click Advanced, and then click Additional configuration. To enable file splitting by size, you must provide the correct length of each COBOL program source file. You can either open the business object in a text editor and add up the maximum lengths, or look for the content size of DFHCOMMAREA at the top of the file. See Specify criteria to split file content.

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

    10. In Specify the I/O Properties window, select User-defined type for the Data type for the operation field. Click Next.

    11. For the input type, click Browse and select the generated business object (DFHCOMMAREA). Click OK.

      Figure 5. Selecting the input type

    12. Click Finish.

    13. Click Next, and then Finish.

    The data bindings used by COBOL copybook, WSDL files, export 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, export files, and other artifacts

    data bindings used by COBOL copybook, WSDL files, export 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 inbound module. Artifacts are generated for an inbound operation that uses COBOL copybook data binding. This module can be deployed on IBM BPM or WebSphere Enterprise Service Bus and tested for an inbound operation.


What to do next

Deploy the module.

Configure the module for deployment


Previous topic: Converting business objects to COBOL copybook files during outbound processing


Next topic: Create a simple service with the adapter pattern wizard


Related reference:

Activation specification properties