Sunday, September 28, 2008

Never code another unconditional branch in macro or assembler code

With the availability of both Structured Programing Extension (SPE's) for conditional macro code and Structured Programming Macros (SPM's) for assembler code, there is no reason to ever code another unconditional branch again! The z390 SPE and SPM support is free, and the benefits are easier to read and maintain code resulting in higher quality code and less cost to maintain the code. For more details on SPE's and SPM's visit:

http://www.z390.org/z390_ZSTRMAC_Structured_Macro_Support.htm

z390 v1403b now includes the follow SPE's supported by the mz390 macro processor:

* AIF, AELSEIF, AELSE, AEND - alternate selection
* AWHILE, AEXIT, AEND - iteration
* AUNTIL, AEXIT, AEND - iteration
* ACASE, AWHEN, AELSE, AEXIT, AEND - multiple selection using branch table
* ACALL, AENTRY, AEXIT, AEND - perform block of code and return

z390 v1403b now includes the following SPM's written in structured macro code using SPE's:

* IF, ELSEIF, ELSE, ENDIF - alternate selection
* DO, ENDDO - iteration
* SELECT, WHEN, OTHRWISE, ENDSEL - multiple compare selection
* CASENTRY, CASE, ENDCASE - branch table selection
* PM, PENTRY, PEXIT - perform block of code and return

There is also a translator included to translate the structured SPM macros to standard HLASM for use on systems which do not yet support the SPE's in the macro processor. The structured macros can be viewed in the ptf\z390\mac directory and the translated standard versions can be viewed in the ptf\z390\mac\spm directory in the following z390 PTF zip file for v1403b:

http://downloads.sourceforge.net/z390/z390_v1403b_ptf.zip

I believe most mainframe assembler developers are in favor of structured programming, but some are equally opposed ot it. Either way, your comments, suggestions, enhancement requests, and bug reports are welcome.

Don Higgins
don@higgins.net

Saturday, September 20, 2008

ZSTRMAC SPE and SPM Updates on www.z390.org

The z390 ZSTRMAC Structured Programming Extensions (SPE's) and the Structured Programming Macros (SPM'S) have been updated in z390 v1.4.03a which is now available.
The SPE ASELECT has been replaced with ACASE for more consistency with HLASM SPM's as suggested by Ed Jaffe. Also the SPE APM has been replaced with ACALL for more readability. The z390 ZSTRMAC SPE and SPM documentation web page has been updated here:

http://www.z390.org/z390_ZSTRMAC_Structured_Macro_Support.htm

This page now inlcudes links to updated source program utilities and regression tests, SHARE presentations, and the original 1977 public domain SHARE SPLA CBT tape #177 from which the z390 current SPM's were derived.

Note the above web page and all z390 web pages have moved from z390.sourceforge.net to www.z390.org following sourceforge.net server moves last week after which I could not get my web update using WinSCP SFTP/RSS to work. I am working to get redirection link on the old site and get the old pages removed. The z390 project remains on sourceforge.net here:

http://sourceforge.net/projects/z390/

And the "Summary", "Website" link has been updated to point to www.z390.org. Also download links continue to point to sourceforge.net download servers.

Don Higgins
don@higgins.net

Monday, September 08, 2008

z390 v1.4.03 now has integrated ZSTRMAC Support

All

z390 V1.4.03 now has integrated support for the new ZSTRMAC structured programming extensions for conditional macro assembler. So open code and macros can now be assembled and executed without translation using the extensions such as AIF, AELSEIF, AELSE, AEND AENTRY, AEXIT, APM, ASELECT, AUNTIL, AWHEN, and AWHILE.

For a few actual examples see the utilities in linklib named RTGENDIR.MLC, RTGENCMP.MLC< and RTGENDIF.MLC which all use ZSTRMAC extensions now to eliminate the need for any AGO or macro labels. These utilities are used in regression testing to compare all the files in two directories and list just those files which have differences and also show file totals.

Just for fun the very old demo DEMOM8Q1.MLC has also been rewritten as DEMOM8Q1.ZSM using the ZSTRMAC extensions to remove all AGO and macro labels. It can be run on v1.4.03 using the command: mac demo\DEMOM8Q1.ZSM

Don Higgins
don@higgins.net