• August 12, 2020

Modern Assembler Programming for z/OS

When I started at Rocket in 2003, I was migrating from a 20-year career as an MVS Systems Programmer who dabbled in writing assembler tools to a fully-fledged software engineer. At the time, the style of assembler that I used and the tools at my disposal were based on what had been in existence for decades; ISPF for edit, SCLM for source control, and 1970s-style assembler full of branch labels and “spaghetti logic”.

The first notable change to my personal development style occurred in 2005 with the adoption of assembler Structured Programming Macros (SPMs). The IBM variety, offered as an optional feature on top of High Level Assembler, had been around for several years before I became convinced that SPMs could greatly improve the readability, reliability and serviceability of the code that I was writing. Gone forever was the “spaghetti logic” of traditional assembler programming with its strangely-named branch labels. I had now entered a single-entry, single-exit style of coding, full of “IF”, “DO” and “SELECT” clauses that could be more easily understood by developers unfamiliar with assembler, and let’s be honest here, even by me at “zero dark thirty” several weeks/months after originally writing the code.

This new way of coding did, however, come with a frustrating side effect that I found increasingly annoying. The minute you start to use clauses such as “IF” and “DO”, there is an instinctive desire to indent the code to reflect the current nesting level of logic. This need butted heads with the assembler’s rigid statement continuation rules of a non-blank character in column 72 and the next statement starting in column 16. All my attempts at code beautification collapsed against these archaic punched-card-based restrictions. When I wanted to use a macro with several parameters and it had to be continued on the next line, the logic indent could force the next line to start in a column further towards the left side of the screen than the owning macro. Anyone who knows me could safely predict the ensuing wringing of hands that this would cause.

My sanity was saved when I came across Ed Jaffe’s FLOWASM exit for IBM High Level Assembler. This exit relaxed the rigid continuation rules so that you could code more naturally, indicating continuation by a trailing comma and then beginning the next statement in ANY column. I could now line up my macro parameter keywords underneath each other anywhere within the logic nest indent.

FLOWASM coupled with the IBM SPMs transformed the style of assembler I use into something more akin to a “power user 3GL” and as Ed says in the presentation, “This isn’t your father’s assembler language”.

I have never looked back.

Rob Scott

Rob Scott 1 Posts

Principle Architect, Mainframe Systems Tools, and Distinguished Engineer at Rocket Software. Starting out as an MVS systems programmer in the mid 1980s, I quickly became interested in the public domain software arena and I designed and developed the "MXI" freeware tool in the 1990s. I moved into full-time software development in 2003 and am currently employed by Rocket Software as a Principal Architect in Mainframe Systems Tools. In 2019, I was honoured to be given the title “Distinguished Engineer”. Part of my responsibilities at Rocket is the architecture and development of SDSF.


  • Avatar

    Miley Cryus Reply

    November 26, 2019 at 6:36 am

    Thanks for sharing amazing information. I appreciate it, keep it up.

Leave a Comment

Your email address will not be published. Required fields are marked *