Developing OTDs for Application Adapters

Creating COBOL Copybook OTDs

This topic describes how to use the COBOL Copybook Converter OTD Wizard to build OTDs and introduces the Converter’s OTD methods. You use the COBOL Copybook wizard within Netbeans IDE to create Copybook Converter OTDs. These OTDs can then later be used in Collaboration Definitions to create the business logic behind the Collaborations.

ProcedureTo create COBOL Copybook OTDs

  1. On the Project tree, right click the Project and select New > Object Type Definition from the shortcut menu. The New Object Type Definition Wizard window appears, displaying the available OTD wizards.

  2. Click COBOL Copybook and click Next. The New Wizard - Cobol Copybook window appears.

    Figure 1–15 COBOL Copybook Wizard—COBOL Copybook Selection

    COBOL Copybook Wizard—COBOL Copybook Selection

  3. Browse for the desired COBOL Copybook file and highlight it.

  4. Click the Add button to include a copybook file in a project.

  5. Repeat Steps 3 and 4 for each file to include in the project. To remove a copybook file from the project, highlight the file name in the Select Files container and click Remove.

  6. Click Next. The Configure Converter Options page appears.

    Figure 1–16 COBOL Copybook Wizard—Configure Converter Options

    COBOL Copybook Wizard—Configure Converter Options

  7. Optionally, add/remove checks from boxes to enable/disable options:

  8. Ignore copybook content beyond column 72 -- The Converter expects copybooks to be width-compliant with IBM’s COBOL reference format. Uncheck this box to process books with content (excluding comments/line numbers) beyond column 72. Default: enabled (box is checked).

  9. Check Item names against reserved words -- The Converter disallows data item names that match reserved words. Uncheck this box to process copy books that use reserve words for item names. When name checking is disabled, the Converter cannot process copy books with unnamed items (i.e., implicit ”FILLER’ items). Default: enabled (box is checked).

  10. Click Finish. The OTD Editor window appears, displaying the OTD.

Parsing Copybook Entries

New functionality in COBOL Copybook Converter 5.1.2 and above, allows for more accurate parsing of data entries. The Converter’s parser no longer assigns globally unique names to identical data entries. If there are more than two data entries with identical names, level numbers, and same direct parent data entry, an exception will be thrown at parsing time, as follows:


com.stc.cococo.builder.CocoParseException: CCCB4200:

Parse exception at line 126, column 64, item (n/a), token (n/a):

CCCB4201: Copybook item processing error.

CCCB4228: Identical data name ’9 DEDUCTIBLE-LOSS-SETTLMNT-COOL FQN = FORMATTER-COPYBOOK:SEEB-GROUP-LST-END-3-0006RG:NEW-IMPORT-GROUP-LST-END-3:IMPORT-GRP-LST-END-3-0026EV:IE01-ENDORSEMENT-SUBJEC-0026ET:DEDUCTIBLE-LOSS-SETTLMNT-COOL’ found under parent data item ’7 IE01-ENDORSEMENT-SUBJEC-0026ET FQN = FORMATTER-COPYBOOK:SEEB-GROUP-LST-END-3-0006RG:NEW-IMPORT-GROUP-LST-END-3:IMPORT-GRP-LST-END-3-0026EV:IE01-ENDORSEMENT-SUBJEC-0026ET’