Showing posts with label cobol data source. Show all posts
Showing posts with label cobol data source. Show all posts

Sunday, February 16, 2020

Using the MicroFocus Relativity Designer Suite 23

As I understand it, the goal of the MicroFocus Relativity Designer is to take a Cobol data source and convert it to an Excel spreadsheet so that the data can be analyzed by creating tables, bar graphs, pie charts etc. to inform decision-making.  The neat thing about the Designer is that the structure of the Cobol source code and the source data for the program remain intact and not changed in any way.

In this project, instead of using my own Cobol data source, in the interest of expediency, I used the SHIRT-2 data source provided by MicroFocus in it Relativity Designer Samples found under MicroFocus Relativity Designer in the Microsoft Windows 10 Start Menu.

Before starting up the Designer, make sure you install your Product Licence on your computer.  Also, save the Catalog in the same folder as your Cobol data source.  For example, I used SHIRT-2 Cobol data source under Relativity Samples and saved my catalog name in this folder.  Also, the Cobol source code (orders02.cbl) is located in this folder.

Now, to start using Relativity Designer, select Relativity Designer in the start menu of Windows 10, and click on Designer.  The Designer worksheet opens.

Select File, Create Data Source.  Select a type of data source, then chose User Data source (applies to this machine only).
Select a driver for which you want to set up a data source.  Select MicroFocus Relativity Data Manager (32-bit).

Click Finish.

At this point, enter a Data Source Name (e.g. I used edward-- you can choose your own name).
Two options are then presented: Select a Catalog (if one is already created) or Create a Catalog.

Choose Create a Catalog.

In the window, "Create Catalog for data source, navigate to the SHIRT-2 folder (samples-> MF -> SHIRT-2).  Enter a name (any name would do) in the textbox,  For example, I entered harry.

A message will appear that harry.rcg was successfully created. Click on apply and then OK.

At this point, the following will show up in the Catalog Explorer:

  • File Definitions
  • Table Definitions
  • User Group and Users
Select User Group and Users-> new group-> add owner group-> add owner name (e.g. moe, no password).  Click Add.  (This will allow the database administrator to register only reliable users to use Relativity Designer and to have access to the Cobol data and program structure.  The individual signs up when they open up Relativity Designer).

Next, click on File->Import Cobol FDs.  This will Read File and Record Descriptions.

Select File Descriptions (FDs) to import.  These files will be added to the catalog:
  • orders02 -- Customer-2-File
  • orders02 -- order-file
  • orders02 -- Product2-file
  • orders02 -- Description-file
  • orders02 -- Sales-file

Under File Definitions in the Calalog Explorer, right click on order-file->show file definitions.
The order-file will appear in the Main Designer window.  The Cobol structure and the design names will appear.

Go to Table Definitions -> right click ->New Table Definitions.

Add columns to Table Definitions, e.g.
  • order number
  • order date
  • total order value
  • Item count
  • Product number
  • Quantity
  • Order value
Add selected columns.

The selected columns will then be added to the Orders-Table Definition.  Click on Save to catalog.

Right click on Orders Table (on the side), click on View Data.

The full table with the selected columns will appear.

The attached screenshots show two tables from two Cobol data sources run through Relativity Designer.


The table generated with Relativity Designer from the Customer table

The table generated with Relativity Designer from the orders table

At this point, you are still in the Designer.

The next step will be to transfer the Table to Excel and to analyze the data using charts, graphs, pie charts, etc.  The next blog will take you through these steps.







Saturday, February 8, 2020

My Understanding of the Use of Micro Focus Relativity Designer

The data in COBOL source files, whether sequential, relative or indexed, can be retrieved by the COBOL source program for which it is designed.  The results will be laid out based on the structure of the COBOL program.  For the results to be presented another way to gain new information, the program structure has to be rewritten.  Many IT service organizations use sometimes hundreds of COBOL programs with millions of lines of code to provide consistent, reliable, and secure service to their clients.  Any rewrite of COBOL programs and codes to get another desired result could cost service providers an enormous amount of downtime to their clients, probably loss of data security, and a significant amount of developers' time and effort.  One service provider estimated that it would take four program developers at least four years to reprogram the structures of all their COBOL programs at an enormous cost.  The return on investment (ROI) would not be worth the effort.

Micro Focus  has developed a tool, the Relativity Designer, to extract the structured data in COBOL programs and to present it in an Excel spreadsheet format.  The neat thing about this approach is that the Cobol program structure remains intact and is not broken in any way.  The data structure of the Cobol program also remains intact.

In Excel format, the data can be analyzed by means of tables, graphs, charts, etc. to assess relationships between various elements in the COBOL source data.  Secure data in Excel files can be passed on to secure clients of service providers to be used by them to retrieve relationships of interest to them.  Relativity has a built in measure to allow only authorized personnel to access the Relativity tool and the results of the Excel spreadsheets.

Recently, I had the opportunity to work with Relativity Designer on some of my clients' COBOL source data as well as on the Relativity Samples provided by Micro Focus.  I found Relativity Designer very easy to use and I would like to share my experience in using the tool.

My next blog will detail the use of Relativity.