Notes to be Aware of Prior to Implementing COBOL Copybook Conversion
In the Sterling B2B Integrator Map Editor implementation of COBOL copybook conversions, the following additional notes apply:
- The description of data in a COBOL copybook contains hierarchical levels. To preserve these levels, the Sterling B2B Integrator Map Editor converts the top levels into groups. Additionally, records are created when necessary to preserve the necessary map component hierarchy. If a record is created to contain a field, the Sterling B2B Integrator Map Editor uses the field name and appends the suffix “_record” to use as the name of the generated record. This concept is illustrated in the diagram below:
- When possible, comments from the COBOL copybook
are added to the Additional Notes section of the Name tab of the applicable
map component Properties dialog box (this may be Group, Positional
Record, or Field Properties). This diagram illustrates an example
of an Additional Notes section
that contains a comment from the original copybook: Note: The maximum length allowed for any Sterling B2B Integrator Map Editor Description is 71 characters. To configure CB2XML to allow characters to be converted from COBOL to XML beyond this character limit in the COBOL source file, you need to create a cb2xml.properties file. See Create a CB2XML.properties File if Descriptions Exceed the Maximum Length.
- You are notified during the Map Wizard conversion
of the COBOL copybook if redefine statements are present in the copybook
file. REDEFINE is a COBOL term indicating that the parameter is redefining
data space. Additionally, this information is added to the Description
section of the Name tab of the applicable map component Properties
dialog box (this may be Group, Positional Record, or Field Properties).
When a map component is redefined, the description *REDEFINED* is
added to the map component. When a map component redefines another
map component, the description REDEFINES: [NAME_OF_MAP_COMPONENT] is
added to the map component. This diagram illustrates an example of
what redefined map components would look like in a map: Note: The maximum length allowed for any Sterling B2B Integrator Map Editor Description is 71 characters. To configure CB2XML to allow characters to be converted from COBOL to XML beyond this character limit in the COBOL source file, you need to create a cb2xml.properties file. See Create a CB2XML.properties File if Descriptions Exceed the Maximum Length.
- In general, the Sterling B2B Integrator
Map Editor converts
COBOL copybook data types to Sterling B2B Integrator
Map Editor data
types as described in this list:
- Packed decimal number
- Packed decimal number
- String
- String
- Implied decimal number
- Implied decimal number
- Real decimal number
- Real decimal number
- Signed zone decimal number
- Overpunched number
- Computation-3
- Packed decimal number
However, the supported data types in the Sterling B2B Integrator Map Editor are string, number, and date/time (the formats that are supported for positional file formats). See Formatting Data in Fields for a complete description of these data formats. Therefore, if an unsupported data format is present in the copybook file (such as the COMP format), the Sterling B2B Integrator Map Editor converts it to the string format and indicates this in the Description and Additional Notes section of the Name tab of the applicable map component Properties dialog box (this may be Group, Positional Record, or Field Properties). This diagram illustrates an example of Description and Additional Notes sections that contain information about an unsupported data format from the original copybook:
Note: The maximum length allowed for any Sterling B2B Integrator Map Editor Description is 71 characters. To configure CB2XML to allow characters to be converted from COBOL to XML beyond this character limit in the COBOL source file, you need to create a cb2xml.properties file. See Create a CB2XML.properties File if Descriptions Exceed the Maximum Length. - The following are examples of formats that may
appear in a COBOL copybook that are not supported in Sterling B2B Integrator:
- Computational (COMP)
- Computational-4 (COMP-4)
- Binary
- Index
- Pointer
- Computational-1 (COMP-1)
- Computational-2 (COMP-2)
- Exponential numerics
Note: Any fields in the COBOL copybook that use Computational-3 (COMP-3) format are automatically converted to the appropriate application number (packed decimal) format. - The Sterling B2B Integrator Map Editor only needs the record layout of your copybook file.
- The Sterling B2B Integrator Map Editor only converts the copybook file layout and does not convert any standard or extended rules.
- The input accepted by Sterling B2B Integrator Map Editor is a complete COBOL copybook file layout in ASCII text.
- Any dashes in the COBOL copybook are converted to underscores by the Sterling B2B Integrator Map Editor.
- You must follow the rules of COBOL (that is, your copybook must not contain errors or the translator will be unable to parse it correctly).