COBOL File Source

The COBOL File Source object holds the ability to fetch data from a COBOL source file if the user has the workbook file available. The data present in this file can then be processed further in the dataflow and then written to a destination of your choice.

Working with the COBOL Source Object In Astera Centerprise

1. Open the Sources section of the toolbox given to the left. Select the COBOL Source object.

02-Toolbox-COBOL

2. Drag and drop the COBOL Source onto the dataflow. It will appear like this,

03-COBOL-Source

By default, the COBOL Source object is empty.

3. To configure it according to your requirements, right-click on the object and select Properties from the context menu.

04-Properties

Alternatively, you can open the properties window by double-clicking on the COBOL Source object.

COBOL Source Properties

The following is the properties tab of the COBOL Source.

05-Properties-COBOL

File Path: Clicking on this option allows you to define a path to the data file of a COBOL File.

Note: It registers files with extensions of .dat and .txt (Additionally, it can also register files with an .EBC extension)

For our use case, we will be using a sample file with an .EBC extension.

06-Configure-COBOL

Encoding: This drop-down option allows us to select the encoding from multiple options.

In this case, we will be using the IBM EBCDIC (US-Canada) encoding.

07-COBOL-Properties-Encoding

Record Delimiter: It allows us to select the kind of delimiter from the drop-down menu.

(Carriage Return): Moves the cursor to the beginning of the line without advancing to the next line.

(Line Feed): Moves the cursor down to the next line without returning to the beginning of the line.

: Does both.

For our use case, we have selected .

08-Delimiter-Properties

Copybook: This option allows us to define a path to the schema file of a COBOL File.

Note: It registers files with the extensions of .txt and .cpy

For our use case, we are using a file with the .cpy extension.

09-Copybook

Next, three checkboxes can be configured according to the user application. There is also a record filter expression given underneath the checkboxes.

Ignore Line Numbers at Start of Lines: This box is checked when the data file has incremental values. It is going to ignore line numbers at the start of lines.

Zone Decimal Sign Explicit: It controls whether there is an extra character for the minus sign of a negative integer.

Fields with COMP Usage Store Data in a Nibble: Checking this box will ignore the COMP encryption formats where the data is stored.

COMP formats range from 1-6 in COBOL Files.

10-Options-Properties

Record Filter Expression: Here, we can add a filter expression that we wish to apply to the records in the COBOL File.

On previewing output, the result will be filtered according to the expression.

11-Record-Filter

4. Once done with this configuration, click Next, and you will be taken to the next part of the properties tab.

12-Next-Tab

COBOL Source Layout

The COBOL Source Layout lets the user check values which have been read as an input.

13-Source-Layout

Expand the Source node, and you will be able to check each of the values and records that have been selected as an input.

It gives the user data definition and field details on further expanding the nodes.

14-Source-Opened-Fields

5. Once these values have been checked, click on Next

15-Source-Layout-Next

Then, the Config Parameters window is opened. Here, you can further configure and define parameters for the COBOL Source Object.

Parameters can provide easier deployment of flows by eliminating hardcoded values and provide an easier way of changing multiple configurations with a simple value change.

Note: Parameters left blank will use their default values assigned on the properties page.

16-Config-Parameters

6. Click Next.

17-Config-Parameters

Now, a new screen will appear, showing the General Options.

18-General-Options

Here, you can add any comments that you wish to add. The rest of the options on this screen have been disabled for this object.

7. Once done, click on OK.

19-General-Ok

The COBOL Source object has now been configured. The extracted data can now be transformed and written to various destinations.

20-COBOL-Configured

This concludes our discussion on the COBOL Source Object and its configuration in Astera Centerprise.