Visualize a COBOL application with interactive callgraphs
Use technology in enterprise applications to make them easier to understand and maintain
Enterprise applications are made up of so many pieces that even if each piece is very simple, the end-to-end flow can quickly become complicated. Then there are additional levels on top of the execution flow, like the data model — what data is being used, where is it updated, where is it changed, etc. Enterprise applications aren’t for the faint of heart. Luckily, you can apply technology to these complicated solutions to make them easier for developers to understand, and thus maintain.
This tutorial will introduce you to this type of technology using a sample COBOL application. Using a virtual lab environment, you will use IBM Application Discovery and Delivery Intelligence to generate diagrams of the sample application. You will even be able to interact with these diagrams after they are generated so you can see just the right amount of detail to quickly understand how the pieces of the sample fit together.
- You will need the ability to connect to a lab environment via Remote Desktop Protocol (RDP).
- An understanding of COBOL is not neccesary but may be helpful.
- No back-end systems or front-end applications are necessary; everything is hosted in the lab environment.
It should take about one hour to complete this tutorial.
Provision a lab environment
The software you’re going to use in the tutorial consists of both front-end and back-end systems. Everything can be self-provisioned using this IBM Z software trial. All you need is an IBM ID to sign up for the trial. After signing up, you should immediately receive an email thanking you for signing up. Once your private lab environment is set up, you should then receive a second email with connection details.
Connect to your lab environment’s desktop
You can connect to your lab by following the instructions in the second email. You’re going to use the Microsoft Remote Desktop application and the IP address, username, and password provided in the email. Once you’re connected, you should see the IBM Z Trial Program desktop.
Start the Z Trial wizard
This lab environment includes multiple self-paced scenarios. To get started, click on the IBM Z Trial Wizard icon in the lower-left of the screen (a hexagon with the letter Z in it). After the wizard launches, you should see a list of the available scenarios:
Let’s use the first scenario, “Assess and improve the maintainability of a COBOL application.” The wizard will cover additional material beyond what is covered in this tutorial. Feel free to follow the wizard’s screens at your own pace.
Launch IBM Developer for z/OS
Start IBM Developer for z/OS (IDz) by clicking its icon in the bottom-left of the screen. This will launch the Application Discovery browser in IDz. You should see a list of applications that have previously been defined; for this exercise, you will use the
Click on the application to select it, then double-click on Mainframe Graphs -> Program Callgraph alongside it on the right:
Select programs to include in the callgraph
You should then see a confirmation panel where you can select top-level applications to include in your analysis. Click on the button that corresponds to select all (which looks like double arrow pointing to the right), then uncheck in the Callgraph limits checkbox on the bottom right. Click Finish to generate the graph.
Explore the callgraph
The initial graph is impossible to read, but it does reinforce how complicated applications can get:
Right about now you might be wondering how this is any better than reading code.
The toolbar provides a few useful tools for interacting with the graph. If you use one of the magnifying graphs to zoom in on the top of the graph, you should see a series of COBOL applications. You can use the mousepan tool (hand icon) to move around in the graph to see what the COBOL applications are called by. For example, you can see that application
LGTESTP3 is called by CICS transaction
SSP3. (Who comes up with these names anyway?)
Want to see what’s going on inside
LGTESTP3? Double-clicking the application using the select tool will bring up its source. Let’s stick with the visual approach. Right-click the
LGTESTP3 application and select Mainframe Graphs -> Program Callgraph. You’ll see another too-small graph:
You should be starting to realize how you can drill down to smaller levels of detail. For example, this Callgraph shows SQL being executed and a file being updated. Zoom in to see for yourself.
Find out where file KSDSPOLY is used
Let’s say you need to understand how the file
KSDSPOLY shown in this callgraph is used. This is as easy as right-clicking the file and selecting Files -> Programs under Mainframe Reports -> Where Used Reports. This will generate a report document that will appear in another tab:
Page 5 of the report shows the number of occurrences of read, write, rewrite, and delete statements performed on the file. If you needed to know where this file was originally written from, now you know!
This tutorial has shown you how to build an understanding of the end-to-end flow in an enterprise application. You’ve gone from an eyestrain graph down to file-level actions (even if you did have to put up with crazy eight-character names). There are additional scenarios available in your IBM Z Trial lab environment. Feel free to take advantage of them or make up your own scenarios as you see fit.