After you import a COBOL source definition, you may need to configure some of the source properties. The COBOL source definition is similar to a fixed-width flat file definition. However, a COBOL file has some unique properties to consider when you configure the definition:
Review the following tabs and dialog boxes when you configure a COBOL source definition:
Configuring the Table Tab
Configure the Table tab of a COBOL source definition similar to the way you configure a flat file definition. However, with a COBOL definition, you also need to consider storage type.
The Integration Service supports COMP-1 word storage in network byte order and with the floating point in the IEEE 754 4 byte format. Also, the Integration Service supports COMP-2 word storage in network byte order and with the floating point in the IEEE 754 8 byte format.
You may need to switch to byte storage for IBM VS COBOL and MicroFocus COBOL-related data files by selecting the IBM COMP option in the source definition. The Integration Service provides COMP word storage by default.
COMP columns are 2, 4, and 8 bytes on IBM mainframes. COMP columns can be 1, 2, 3, 4, 5, 6, 7, and 8 bytes elsewhere, when derived through MicroFocus COBOL. Clear the IBM COMP option to use byte storage.
The following table describes the COBOL file properties that you can set on the Table tab:
Configuring Advanced Properties
Click Advanced on the Table tab to configure properties for fixed-width files.
When you import a COBOL file, you choose the code page of the COBOL file so the Designer can read the file correctly. After you import the COBOL file, you can change the code page to that of the source data so the Integration Service can read the data when you run a workflow. You can select the code page of the data file in Advanced Properties.
Configuring the Columns Tab
When you review the Columns tab of a COBOL source definition, you see several levels of columns in addition to multiple attributes for those columns. You might want to review and configure the following properties:
When you review the contents of the Columns tab in a COBOL source, you see several levels of columns. These levels represent the separate record sets contained within a single COBOL source.
For example, the following COBOL source contains a nested record set, HST_MTH. Each record set begins with a level 5 heading, indicating the beginning of the record. The columns within each record set must all be at the same level beneath the record heading. For example, the record set HST_MTH contains several columns, starting with HST_ ACCR _ REM. An OCCURS setting of 24 indicates that, when you review the data in this COBOL source, each record contains 24 nested records for HST_MTH.
The following figure shows a sample COBOL source definition with an OCCURS setting :
All of the columns in HST_MTH are at the same level, 7, in this COBOL source. The heading for the record HST_MTH is at level 5, two levels above the columns in that source.
You may need to configure the source definition to group fields. Although the Designer creates a separate source definition for each FD entry in the COBOL file, each entry may represent the functional equivalent of multiple tables of data. When you configure the source definition, you create different levels of fields within the source to group data into separate pseudo-tables.
When you review a COBOL source, you see several attributes for each field, the COBOL equivalent of a column, that represent how you can configure a field in a COBOL file.
Among these attributes, the picture clause is the most fundamental, since it shows how the COBOL file represents data. COBOL uses its own set of conventions for configuring how data is formatted within the column. For example, the picture X(32) indicates that text data in the field is 32 bytes long. The picture clause 9(7) indicates that the field contains numeric data of no more than 7 digits in length. The picture N(8), an Nstring datatype containing double-byte characters, indicates that the text data in the field is 16 bytes long.
You may need to adjust the definition of a field in the Source Analyzer, modifying the picture in the process. Since the Integration Service uses the source definition as a map for finding data in the source file, you need to be cautious when you make such adjustments.
The following table describes the attributes you can set in the Columns tab of a COBOL source definition:
All rights reserved © 2020 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.