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 > FTP

Converting COBOL copybook files to business objects during inbound processing

Use the external data 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 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. You have created a local event directory.

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

Use the external data wizard to generate a business object definition for a COBOL program source file. After you have generated the business object definition, you can optionally rerun the external data 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 > Business Object From External Data.

    2. In the Select an Input Source window, expand Languages and select COBOL.

    3. Click Next.

      Figure 1. Select an Input Source window

    4. In the Provide Details for the Mapping window, ensure that 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.

    5. Click Next.

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

    7. Select DFHCOMMAREA and click Next.

    8. 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 generation of wrapper business object definition is optional. The option to generate wrapper business object definitions are displayed only if the adapter RAR file is imported into the workspace.

    If you want to generate wrapper business object definitions, then you must generate them before running the external service wizard.

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

    2. In the Select an Input Source window, expand Adapters, select the adapter connector project for which you want to generate the wrapper business object. In this case, select FTP.

    3. Click Next.

    4. In the Select an Adapter window, select the connector project in which the new business object was saved and click Next.

    5. In the Specify the Properties window, click Browse and select the business object created in Step 1, for example, DFHCOMMAREA, for the data type.

    6. To generate a business graph, select the Generate business graph for each business object check box.

      Figure 2. Specify the Properties window

      Generate retrieve container to retrieve multiple business objects is applicable only for outbound retrieve operation.

    7. Click Finish.
    A wrapper business object and a business graph, called DFHCOMMAREAWrapper and DFHCOMMAREAWrapperBG, respectively 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 FTP under Adapters and click Next.

    3. In the Select an Adapter window, select IBM WebSphere Adapter for FTP (IBM : version) where version is the version of the adapter you want to use, and click the CWYFT_FTPFile connector project. Click Next.

    4. In the Processing Direction window, select Inbound and click Next.

    5. Click Browse and select the event directory.

    6. For the Function selector, select the default value.

    7. In the Data format options list, select Use COBOL, C or PL/I data binding option.

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

      Figure 4. Specify the Security and Configuration Properties window

    8. If the input file contains multiple COBOL program source files, you can enable file splitting by specifying a size or 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 the maximum length, or view the content size of DFHCOMMAREA at the top of the file. See Specify criteria to split file content property (splitCriteria).

    9. Click Next.

    10. In the Operations window, click Add.

    11. In the Operations window, select User defined type as the data type. Click Next.

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

      Figure 5. Specify the I/O Properties window

    13. Click Finish.

    14. 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 and tested for an inbound operation.


What to do next

Deploy the module.

WebSphere Adapter for FTP documentation


Related reference:

Activation specification properties