Business-Document: COBOL Importer

About the COBOL Importer

Using the COBOL Importer

Resolving errors

Rules for imported Business-Documents

About the COBOL Importer

The COBOL Importer is a tool for automatically creating Business-Documents from a description contained in a COBOL copy clause.

Use the COBOL Importer to perform the following actions:

  • Create both input Business-Documents and input/output Business-Documents
  • Create Business-Fields from field descriptions contained in copy clauses
  • Create several Business-Documents simultaneously
  • Automatically create Mapping-Templates from COBOL copy clauses
  • Delete prefixes from Business-Document and Leaf Element names.

Using the COBOL Importer

Import the COBOL copy clauses in the following stages:

  • Select the copy clause and type of Business-Document to import, that is, either an input or input/output Business-Document
  • Select the Business-Documents you want to generate from the list of Business-Documents detected in the copy clause
  • Import the selected Business-Documents

Prerequisites

To use the COBOL Importer, you must have access rights to the Business-Document object.

Importing copy clauses

Step 1- Specifying the copy clause and Business-Document type

  1. Select COBOL Importer from the Tools menu. The COBOL Import window is displayed.
  2. Complete the COBOL Import window as follows and click Next to validate your entries and proceed to Step 2:
  3. Action Description

    Select the copy clause

    In the File field, click Browse to select and display in Windows the file that contains the copy clause you want to import.

    Select the file and click Open to validate the selection

    Select the Business-Document type

    Select either:

    • input Business-Document
      This designates an input Business-Document. The system retains the original name as found in the specified file.
    • output Business-Document
      This designates an output Business-Document. The system assigns a three character name using the number sequence you specify in the adjacent field.

    [FOR DETAILS Rules for importing Business-Documents]

    Define details required for Input/output Business-Document

    • Set the increment number In the Start with field.
      The increment number becomes the output Business-Document name. The length of this name is limited to three characters.
      If you do not enter this number, the output Business-Document name will be 000.
    • (Optional) In the Select the root name to delete field, enter the alphanumeric string that corresponds to the prefix to delete in each of the imported fields.
      You can enter a maximum of ten characters of free text.

      AccountingIntegrator Enabler removes the prefix from the names of the fields and Business-Documents if you set this option in the File selection window.

      Example
      The file to import has the following Business-Document/ Field name combination:
      01 (LREC)-LBECAPI041
      05 (LREC)-REQUEST

      If, in the File Selection window, you specify (LREC)- as the prefix to delete, the system generates the Business-Document with the name LBECAPI041 and which possesses a Field named REQUEST.

    Set the Business-Field creation option

    • Select Create and select Business-Fields for each Leaf Element in the Business-Document to automatically create Business-Fields, provided they do not exist already.

Step 2- Selecting the Business-Document

After analyzing the copy clause, the importer displays in the File list a Business-Document for each first level detected in the copy clause structure.

  1. From the Business-Document File list, use the dual list buttons to import only those Business-Documents that you require. Highlight file names and then use Add or Add all to create the list of Business-Documents to import.
  2. The Business-Documents you select are displayed in the To import list.
  3. Note: In both lists you can use the following to view additional information about an object:
    • Double-click a line to view the contents of the object in a tree structure.
    • Place the cursor on an element in the tree structure to view the attributes of the object displayed as a Tooltip.
  4. Click Finish to generate the selected Business-Documents and proceed to Step 3 to view the generated Business-Documents.

Step 3- Viewing the generated Business-Document

The COBOL Importer inserts the set of Business-Documents and Business-Fields (if you specified that option) selected in Step 2 into the list of existing Business-Documents and Business-Fields in the Dictionary tab.

To view the properties of a Business-Document, right click the selected Business-Document and select . Composer displays the properties of the Business-Document in a tree structure in the Definition tab.

Rules for imported Business-Documents

The names and data types used in the tree structure respect the following rules:

Element Rule

Name

Name of Business-Documents

  • All dashes (-) are replaced by underscores (_).
  • Long names are not shortened to the 25 character limit. The Business-Document Check process indicates the excess length.

Name of Leaf Elements

  • All dashes (-) are replaced by underscores (_).
  • The name is truncated if it exceeds 10 characters. This also applies to field names modified to handle OCCURS.
  • If the name is already in use in the Business-Document, the system uses a counter to maintain the 10 character limit: <NAME>_<NN>

If this new name conflicts with an existing field, the system continues to increment the counter and test the uniqueness of the name until no conflict occurs.

Identical name for Business-Document and Leaf Element

  • A Business-Document you create can have the same name as a Leaf Element.

For example

01 REC-LCECAPI010 PIC X(500

)The generated Business-Document is named REC-LCECAPI010 and possesses a Leaf Element called REC-LCECAPI010 of data type A(500).

Input Business-Documents

For each 1st level of the found structure deleted, the name becomes the name of the Business-Document. If the name already exists, the Business-Document is created, but the Check process on the Business-Document indicates the name duplication. The prefix in the Business-Document name is deleted if you indicated this option in the File select window.

Input/Output Business-Documents

The name of the Business-Document is the increment number calculated from the number you entered.

Business-Fields

When you select the Business-Fields option in the File select window, the COBOL Importer automatically creates a Business-Field for each Leaf Element.

The COBOL Importer assigns the Business-Field the same name as the Business-Document field except in OCCURS cases.

Class and Data Types

[FOR DETAILS Field Types table]

Definition

Field lengths are retained without modification. However the system does run additional checks to ensure they are within technical limits stipulated for the application.

If the length value exceeds the 9999 limit during processing, the system stops creating the Business-Document field, but continues processing.

The system displays an information message that informs you either of the field name taken into account or that the system halted the import procedure for the Business-Document structure.

Label

The initial field name including the original prefix, if any, is used as the label.

RESERVED TERMS

VALUE

If a Leaf Element contains a default value (keyword VALUE), this is carried over into the Mapping-Template associated with the Business-Document.

The format of the Mapping-Template name is: 'MAP_<Business-Document name>'

FILLER

All Leaf Elements named Filler are transformed into AccountingIntegrator Enabler Fillers.

Fillers are not limited to 256 characters.

REDEFINES

If the keyword REDEFINES appears:

  • in a Filler or Leaf Element, the Cobol Importer ignores it.
  • in a first level representing the name of a new Business-Document, it is imported.

OCCURS

If you selected the Create Fields in Dictionary option, if the Leaf Element is defined in OCCURS, the Cobol Importer:

  • Generates as many Leaf Elements as there are OCCURS, within the limits specified in the Definition field.
  • Adds the suffix  _Number OCCURS to the Leaf Element name.

However, the Cobol Importer only creates the Fields in the dictionary once. All other occurrences reference the same Business-Fields.

For example

ZoneA OCCURS 1 TO 3 PICX.

generates

ZoneA_1 ZoneA_2 ZoneA_3

PIC or PICTURE

Picture elements are transformed into Alphanumeric.

For example

-(18)9,9 is interpreted as A(21) since the comma (,) and minus sign(-) are included when calculating the length.

Levels 66, 77, 78 and 88

Ignored.

First six characters of each line

Ignored.

Reserved for Cobol line numbering.

Field Types

The following table summarizes how the COBOLImporter generates AccountingIntegrator Enabler equivalences from COBOL data types in the copy clauses.

Cobol Data Types AccountingIntegrator Enabler Class AccountingIntegrator Enabler Data Type

PIC A(n)

String

Alphanumeric

PIC X(n)

String

Alphanumeric

PIC 9(n)

Integer

Numeric

PIC 9(n) COMP-3

Integer

Packed signed numeric

PIC S(n)

Integer

Signed numeric

PIC S(n) COMP-3

Integer

Packed signed numeric

PIC (n)

String

Alphanumeric with length = n+1 for the sign

Resolving errors

For information on resolving errors, refer to the AccountingIntegrator Enabler Enabler Error Messages Guide.

Back to top

Related Links