Converting business objects to COBOL records

To convert a business object to a COBOL record, the binary host data handler loops through the attributes of the top-level business object definition. It processes the attributes recursively, in the order in which they appear in the top-level business object, writing attribute values as the elements of the COBOL record.

The binary host data handler processes business objects into a COBOL record as follows:

  1. The binary host data handler instantiates a binary byte array to hold the record data.
  2. It retrieves the business object definition corresponding to the Request BO.
  3. It parses the metadata stored in the business object definition (name, type of data, length in bytes)

    Processing of data involves the additional transformations:

    Data Type Processing
    ASCII/EDBDIC As is
    Numeric (General) As is
    Packed Decimal Unpack the bytes
    DBCS Decode using Cp930
  4. The data handler populates the business object instance with processed bytes.
  5. Finally, the data handler returns the populated business object back to the adapter.

Copyright IBM Corp. 1997, 2003