Tuesday, December 30, 2008

zcobol Portable Mainframe COBOL Compiler www.zcobol.org

Come to SHARE session 8194 on what's new with z390 scheduled for Tuesday, March 3, 2009 in Austin, TX 8:00 AM to learn about a new z390 open source structured conditional macro assembler based tool - zcobol portable mainframe COBOL compiler. The new zcobol compiler supports multiple COBOL dialects such as IBM Enterprise COBOL Micro Focus COBOL, and has options to generate any one of several target language executable programs. The current target languages include HLASM compatible mainframe assembler for IBM z9/z10 processors, Java for any J2SE platform, C++ for any Windows platform, or HLA/MASM assembler for any Intel platform. The initial open source zcobol tool release included with z390 starting March 3, 2009 will primarily focus on compiling COBOL to HLASM compatible mainframe assembler that can be run using z390 on any J2SE platform or can be ported to z9/z10 for native mainframe speed. The zcobol compile generates intermediate target language source code which includes all the COBOL data names and paragraph names for use in debugging when required. Debugging options include paragraph trace, macro expansion trace, and execution trace The generated code includes support for static and dynamic linking of both COBOL and assembler programs and supports EXEC CICS and SOA extensions for SEND/RECEIVE.

To learn more about zcobol and get the latest updates visit http://www.zcobol.org join the zcobol user discussion group, and come to SHARE.

Don Higgins

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:


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:


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

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:


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:


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

Monday, September 08, 2008

z390 v1.4.03 now has integrated ZSTRMAC Support


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

Sunday, August 31, 2008

z390 ZSTRMAC Structured Conditional Macro Code Translator

The lastest z390 PTF v1.4.02e has a new open source translator to support structured programming extensions for mainframe conditional macro assembler coding. The extensions include:

1. AIF, AELSEIF, AELSE, AEND - for alternate selection of macro code blocks

2. AWHILE, AUNTIL, AEXIT, AEND - for repetition of macro code blocks

3. ASELECT, AWHEN, AELSE, AEXIT, AEND for selection of macro code block based on index

4. APM, AENTRY, AEXIT, AEND - for performing labeled macro code block.

The source for the translator including both bootstrap version and structured version can be found along with test programs on this web page:


The next full release of z390 v1.4.03 will have these extensions built into the macro processor so translation as a separate step is not required.

Don Higgins

Tuesday, July 01, 2008

z390 full release v1.4.02 with CICS compatible support for BMS plus

On June 30, 2008 z390 full release v1.4.02 was published with InstallShield for Windows and file image for Linux. This release has EXEC CICS compatible V5 support for BMS Basic Mapping Support plus the new SOA COBOL client application generation support using standard EZASOKET interface. Also this release has numerous HLASM and z9/z10 mainframe compatibility enhancements including HFP unnormalized instruction support.

Don Higgins

Thursday, June 05, 2008

Higher precision timestamps for COBOL and Assembler performance measurement

Recently new higher precision timestamp support for use in COBOL and z390 assembler applicaitons has been added. Functions are available to obtain interval timing in nanoseconds or microseconds. For more information, visit new web page documenting timestamp support:


Don Higgins

Tuesday, May 27, 2008

z390 SOA Support for COBOL calling z390 Assembler using EZASOKET interface

Starting with z390 PTF v1.4.01e, z390 now supports COBOL calling z390 assembler using the IBM standard EZASOKET interface. For demo with source code and screen shot using Micro Focus COBOL calling z390 running on Windows Vista visit:


This same interface can in theory be used with COBOL running on any platform including mainframes and Linux connected to z390 SOA server running on any platform supporting J2SE Java connected to the same TCP/IP network.

Don Higgins

Tuesday, April 01, 2008

Optimizing COBOL generated mainframe assembler

To aid in analyzing mainframe COBOL programs a new z390 COBOL Portable Assembler option has been added in z390 PTF v1.4.01b. With this option installed, you can convert Enterprise COBOL or COBOL for OS/390 generated assembler listings into z390 assembler source programs which can be assembled, linked, and executed specifying starting and ending line numbers in order to unit test or benchmark specific generated code or supported COBOL statements with called functions. In this initial release only DISPLAY and STOP RUN function calls are supported, but requests for additional functions are welcome. Support for COBOL/370, COBOL for MVS, and VS COBOL II are also in development. For example generation and execution of DISPLAY and STOP RUN demo, install z390 v1.4.01, v1.4.01b PTF, and then enter the command cobol\paos\OSDEMO1. For additional information on this new option visit:


Suggestions on how to make this new option more useful for unit testing and benchmarking COBOL code running on Windows or Linux are welcome. Sample COBOL generated assembler listings along with requests for additional function call support are also welcome.

Don Higgins

Friday, March 21, 2008

Why is a slower MIP rate with new z10 instructions better?


Why is a slower MIP rate with new z10 instructions better? The answer based on the initial results of problem #18 solution posted today on the ZMFACC Mainframe Assembler Coding Contest would appear to be that by using the new compare and branch instruction for z10 replacing 2 separate compare and branch on condition instructions results in a lower MIP rate but a faster execution time. Even though the MIP rate is lower, there are fewer instructions required to do the same work, and the elapsed time required is less. For the solution posted, the MIP rate using z390 on Intel Duo Core 2.1 GHZ processor dropped from 8.7 to 7.3 MIPS or 15%but the elapsed time also dropped from 343 ms to 271 ms or an 8% reduction in elapsed time. To see the source code and execution log output for this solution plus new problem #19 posting visit:


Don Higgins

Friday, March 14, 2008

z390 with 11 new ASSIST and 226 new z10 instructions

You never know what will happen at SHARE. This year SHARE started several new ventures for the z390 project resulting in the release of v1.4.01 today with the following major additions:

1. The ASSIST instructions for simplifying assembler program I/O have been added at the request of Northern Illinois University for use by students in their computer science classes. After installation of z390 v1.4.01 enter the command ASSIST assist\DEMOAST1 for demo.

2. Following IBM's announcement of a new z10 mainframe on February 26 during SHARE, a total of 226 new z10 instructions have been added to z390 for use by students learning about the z10 and for developers wanting unit test code before implementing on the new z10 processors. The new z10 instructions include:

a. Compare and branch - based on z390 testing these appear to be 15% faster than the equivalent compare followed by branch on condition instructions.

b. Move with optional specifications - this instruction which was previously implemented based on preliminary information released at SHARE has been expanded to support lengths greater than 4k.

c. The new translate and test extended instructions now support forword and backward translation for any length with 4 different translate table sizes 256, 512, 64k, and 128k.

d. The new rotate and select bits intructions have been implemented along with an improvement in the speed for existing RLL and RLLG rotate instructions which now use new more efficient shared rotate functions.

Since the new z10 instructions did not include the SQXTR extended decimal floating point square root instructions, the first proto-type millicode z390 version of this instruction has been implemented. To see how SQXTR instruction works, see the DFP solution to the standard deviation contest problem #12. To run the program, enter the command ASMLG mfacc\P12DSH3 after installation of z390 v1.4.01. Also see ZMFACC Mainframe Assembler Coding Contest problem #18 requiring benchmark program for compare and branch on the new z10 mainframe:


Don Higgins

Monday, February 11, 2008

Come to SHARE Session 8194 Feb. 25, 2008 to learn about z390 VSAM and CICS support

Come to the Disney World Coronado Springs Resort in Orlando Florida on February 25, 2008 and attend SHARE Session 8194 at 4:30 in Coronado E for update on z390 VSAM and CICS support. Speakers will include Melvyn Maltz and Don Higgins. Melvyn will provide update on EXEC CICS V4 compatible support including multiple TN3270 clients on TCP/IP network and browse support for ESDS, RRDS, and KSDS VSAM files. Don will provide overview of the z390 portable mainframe assembler and emulator plus update on VSAM externals and internals including KSDS insert support using AVL balanced trees for maximum performance. For more information on SHARE in Orlando and Session 894 visit:


Don Higgins