Editor’s note: This is part 1 of a 3-part series that describes the use of RDz for doing z/OS Assembler development. Parts 2 and 3 will be published some time in early 2016
If COBOL and PL/I are software languages from I/T’s Jurassic period, then Assembler programming (even its bespoke nephew HLASM (High Level Assembler) – must be from the Cambrian/pre-Cambrian period. Hard to believe that anything written in a language that old is actually alive and running – in production – on z/OS … right?
Ummmm…. no. There’s actually lots of Assembler out there. Sometimes it’s a bunch of fast and highly-efficient utilities and subroutines called by COBOL, PL/I and 4GLs like CA-Ezetrieve . Other times it’s fast and highly-efficient application code – providing sub-second response time for apps like airline reservation systems, etc. And of course I/O device drivers and such are virtually all written in Assembler (because they need to issue privileged and semi-privileged control instructions). In the 8 years that I’ve been working with z/OS shops doing consulting and training, over 90% of them are actively coding and maintaining application components in Assembler. As they say in metro NYC – “go figure”. As they say in the “C Suite” – about those fast/economical Assembler applications… I’ll drink to the R.O.I.
Who’s doing all this Assembler work?
So – while the art of Assembler programming hasn’t gone the way of the Velociraptor – it’s not like there are as many Assembler programmers as there are; COBOL, PL/I – or virtually any of the common z/OS application languages. Why then would IBM sink time & money into Assembler features for its flagship IDE (RDz)? Good question – but as I used to tell my classes, I’ll answer any questions, except for questions that starts with the word “Why”. So let’s begin a question with “what” -More to the point; What can RDz do for Assembler programmers?
Part 1 – RDz and Assembler
RDz’s Assembler support extends across the entire software lifecycle. There are Assembler-specific features in RDz for: Analysis, Edit, Build, Test and Debug… and if you combine RDz with UrbanCode, RDz’s support carries over into deployment. While RDz’s Assembler feature/function is not as deep it is for PL/I and COBOL, it’s still head-and-shoulders above ISPF … and (as far as we know) the only Eclipse IDE with rich Assembler tooling.
In this issue we’ll focus on RDz’s Assembler Analytic capabilities. In January we’ll continue with Coding/Syntax Check/Compile/Link and Debugging Assembler.
RDz’s Assembler analytics include Data Flow Analysis and procedural code/structure understanding – from the standpoint of branch (i.e. Go To) statements.
Data Flow Analysis – using Search/Pin Search View.
To use Search/Text/File in Data Flow Analysis you; 1. Select a starting variable to search. 2. Select Search/Text/File. 3. Use the Search Results View to navigate to, and study the variable’s usage. 4. Pin the Search View and 5. Select another (related) variable and begin again.
You can utilize as much of the RDz/Eclipse Windows/screen real estate as you can reasonably consume. That includes un-docking Search Results Views and moving them outside of the RDz Workbench or (better) – moving them to a dual monitor (the hyper-links will still work).
Ctrl+F – Advanced Search/Replace Functionality
Besides supporting standard ISPF Command Line Find/eXclude/NotXclude/and PF-Key searching,another option that simplifies Assembler code understanding is the Ctrl+F (Find/Replace) menu – which supports standard search options plus: Results Peek (which exposes lines above/below the found) and Regular Expressions. Regular Expressions provide a number of powerful approaches to filtering code, and pulling into view exactly (and only) the statements need to analyze
Figure 2 shows a Ctrl+F Find command for a series of nine Assembler variables, all related through program logic
Program flow analysis – Assembler program structure
For understanding the branching instructions RDz provides a filter that exposes all Assembler branching constructs – plus the program labels they reference. This Branch instructions… filtering feature as well as other code-clarifying options are available from the Context Menu Filter View (Figure 3).
Figure 3 – The Assembler editor’s Filter View options
The Filter View provides Context Menu filtering support for analysis requirements such as:
Note that you can also combine Filter Views, taking advantage of RDz’s superior Windows Screen Real Estate for your code (Figure 4). By doing this you can simultaneously view multiple filters … or in the case of Figure 4 – a Filter view and the “Show all source code” view of your entire program – using the Filter views as set of: source code Rolodexes – bouncing between them and hyper-linking to points-of-interest inside of the program, in orderv to accelerate your understanding.
Figure 4 – Assembler Branching and Execution Analysis using Filter > Branch instructions and labels
The Outline View for Assembler Programs
The RDz Outline View supports Assembler programs in three ways:
1. By single-clicking a Label or Macro RDz navigates through the source code to find the statement you’ve clicked in the Outline View
2. By right-clicking on a Label or Macro and selecting Filter, RDz will filter out all lines in the source file that do not reference the field selected. This is analogous to an ISPF stacked command: Top ; x all ; f ABCD All (but with a single click)
3. In RDz v9.5 the right-click Context Menu over a Macro provides an Open option – which allows you to open the Macro source into the editor much the same way that Open Copybook brings in a COBOL copybook or PL/I Include
Figure 5 – Navigating within your source program using the Outline view
As you can see from Figure 6 – the effect of Filtering on RETURN from the Outline View creates a compact display of all statements in the program containing that Label. Further, you can expand the source around the Filtered statements by:
Figure 7 shows the use of opening a Macro into the Editor from the Outline View. Note that this requires RDz v9.5 or later. And note that this works with most of the IBM-supplied Macro Library source, and with User Macro Libraries – provided you’ve setup your Property Group file correctly for Macro Libraries (Assembler Tab)
Figure 7 – IBM Macro source file opened from the Outline View
Net:Â It’s not IBM’s intention to create RDz as an “all-things-to-all-people” product. There are many specialized areas of z/OS work that benefit from other technologies, other products and even (!!) other technologies and products from other vendors. However, when it comes to the benefits provided by RDz for z/OS application developers, consider this list: – before assuming that what you want isn’t in the box.