(Cross-posted to the Cat Herder Software blog.)
Last Tuesday, Feb 5, I presented at SHARE Winter 2013 in San Francisco, on z390, zCOBOL, zCICS, and the associated add-ons. This was my first time ever presenting at SHARE, or any user group at all. It was also my first attendance at a user group since, wow, 1989. (I am not counting my non-attendance at SHARE Summer 2012 in Anaheim, or the time I came down to SF to meet my boss at a Software AG user conference in the late 1990s.) it had been 18 months since Don Higgins presented on z390, and I thought that since SHARE was local, it would be a great opportunity to describe what is new, and what is coming.
I went in a bit nervous. The voice of my GA from my COMS 103 class at Sac State, Brie Adams, was whispering in my head on things not to do. I knew some friends of mine such as Ed Jaffe were attending. And then things got even more nervous. Not only was Mr. HLASM, Dr. John Ehrman, attending, but his successor. Sharuff Mousa (from Hursley) as well. And people I knew like Kristine Harper, and people I knew but had just finally met in person, like Rich Smrcina, Tom Conley, and Scott Fagen, were attending. And complete strangers as well. (I found out later that day that Mr. z/OS himself, Bob Rogers, wanted to attend but had a conflict. I think I would have died if he had made it.)
But onward I went. And I think I did pretty well. I handled questions, even having to answer some off the cuff. I made new contacts. I will admit that I haven't looked at the evaluations yet; I'm a bit scared to do so. And I probably was nervous some as well. Mary Anne Matyaz snapped a photo of me during my session, and my wife Cheri says I look nervous. I'm not surprised. (And having just looked again at the photo, I'm grabbing the chair.)
The rest of the day was a bit of a blur. Because of Mary Anne's gentle arm-twisting, I chaired a couple of sessions in the afternoon, and in one I finally met Kirk Wolf in person. Then I helped with some subterfuge and got my friend Chris Craddock (again, whom I had not met in person until he came to collect the badge) into the Expo. The next couple of hours were just tagging along with Chris and meeting even more folks whom I knew from the various mainframe-oriented mailing lists and Facebook. That evening was a CA-hosted party on the 45th floor, where I saw Meral Temel (sadly, I had no real chance to talk with her other than a quick "hello") and met Skip Robinson and Sam Knutson (again, finally in person!). And I'm sure I met a couple of others, and I apologize for forgetting already.
A big thanks to Crash Craddock for letting me crash at his place.
Unfortunately, unless the Braves are playing the Sox interleague that week, I won't be in Boston. But Winter 2014 is in Anaheim and I am already making plans. I hope to see you there!
My presentation can be downloaded from the SHARE web site (Session 12252), or if you are patient it can be loaded from the z390 or Cat Herder Software's web site later this week. (I will update with links when they are ready; I have to fix a couple of types I found.)
... read more
Welcome! Some changes have occurred with the z390 project since the last entry was published back in summer 2010. So here's what's happened since then.
The latest release of z390, including zCOBOL, zpar, zCICS, and other components was released in May of this year. You can download it here.
With the latest release, Don Higgins has retired from active management and participation, although he is still around to answer questions and give basic guidance. Taking over administration are Ray Mullins of Cat Herder Software, LLC (your author) and Abe Kornelis of Bixoft. Both have decades of experience with IBM z/Architecture assembler, with Ray's experience from the systems and internals side of z/OS, z/VSE, z/VM, and BS2000/OSD, and Abe's experience from the applications side, primarily z/OS. ... read more
z390 v1.5.01e now supports the creataion of alternate indexes using REPRO and also supports sequential access by alternate key via use of PATH defined in catalog. For more information visit www.z390.org.
The latest update to z390 v1.5.01c now has new open source mainframe compatible sort utility which uses the familiar SORTIN, SORTOUT, and SYSIN control file with SORT FIELDS+(...) supporting 7 standard key field types. Sort work files SORTWK01 and SORTWK02 are dynamically allocated if needed for merge. Regression tests are included with new sort. A 1,000,000 records can be sorted in less than 30 seconds on a 3 GHZ Dell with Windows or Linux. For more information visit this page on the new sort:
With the release of z390 Portable Mainframe Assembler and zcobol Portable Mainframe COBOL PTF v1.5.01a, there is now a new utility named ZPARTRS which can be used to generate COBOL, Assembler and EXEC CICS source code execution traces. The utility is documented on www.zpar.org and there are 4 examples with PDF source code, traces, and screen captures for COBOL, Assembler, smf EXEC CICS source code transaction traces. The utility includes options for including or excluding selected modules from trace plus option for including detail execution trace showing values for instruction operands as well as source code labels and comments. There are also options to include or exclude time stamps, messages such as WTO, traces, or errors.
For example see how a 1.5 MB EXEC CICS z390 exeution TRE trace file (similar to GTF trace) can be transformed into a 3 page COBOL and EXEC CICS source statement trace for specific COBOL transaction module TESTBEC1.CBL using ZPARTRS utility. Here is the EXEC CICS COBOL source transaction program:
Here is the source only trace with COBOL line numbers:
Here is alternate COBOL source and generated assembler source trace:
And here is the CICS TN3270 screen capture for the executed transaction BEC1:
These and similar links for 3 othere demos can be found on www.zpar.org. The COBOL source and assembler type traces provide excellent learning tool to see what kind of mainframe z9/z10 assembler code is generated for a specific COBOL statement. For example the COBOL Hello World demo program consisting of DISPLAY 'Hellow World" and STOP RUN, generates exactly 5 assembler instructions in the procedure division as shown here:
Of course this does not inlude the 29 initialization instructions generated for every zcobol
program to load the zcobol runtime load module and verify version. Hee is alternative trace of the same COBOL program with DETAIL option which forces COBOL and assembler source plus execution detail line showing values of instruction operands for all instructions including the standard initializtion instructions which were skipped in prior trace:
z390 v1.5.01a PTF can be downloaded from www.z390.org with InstallShield for Windows and file image for Linux. This PTF has been regression tested on Windows Vista, XP, and Ubuntu 8.o4 LTS Linux. The pre-requisites are z390 v1.5.01 base install and J2SE 1.6+. For more details on the enhancements and fixes in this PTF visit:
A new z390 webpage www.z390.org/java has been published to display java version installed on Windows or Linux with any web browser.
z390 and zcobol full release v.1.5.01 is now available for download and install using InstallShield for Windows from www.z390.org. This release includes new Unicode codepage support for ASCII and EBCDIC codepages compatible with z/OS. The zcobol compiler now compiles 408 of the NIST COBOL 1985 COBOL test suite programs with no hard assembler errors and MNOTE level 8 messages for those features not yet supported. See the latest NIST test statistics here:
The above page also contains new ZPAR frequency distribution report examples showing the COBOL macro calls generated by the zcobol zc390 translation program and also another frequency distribution report showing the generated 390 opcodes in the generated HLASM source code produced by the zcobol compiler.
This release also includes zCICS v8 support which includes 13 EXEC CICS COBOL programs you can compile and execute on Windows or Linux using z390 and zcobol.
The www.zcobol.org website has been updated with new zcobol NIST Test Suite Results:
The upcoming z390/zcobol full release v1.5.01 successfully translates and assembles 409 NIST test suite COBOL programs with no hard assembly errors and just MNOTE's identifying as yet unsupported features. Two new www.zpar.org reports have been added: The first shows the frequency distribution of translated macro call statements, and the second shows the frequency of all generated HLASM Basic Assembler Language (BAL) instructions.
Also included is a current pending priority list for future zcobol development. All users interested in participating should join the zcobol email group where you can submit your own priority list. In addition to the current HLASM target language enviroment, there are also plans to develop additional sets of zcobol code generation macros for Java, C, and Intel MASM.
A new ZPAR report ZPARSUM2 now automatically generates summary of all NIST COBOL 1985 test programs translated, assembled, and executed using test version of zcobol v1.5.01.
The summary report is on the www.zcobol.org site here:
457 out of the total 459 translate cleanly from COBOL source to HLASM compatible source. But there is still much work to do to get all 457 assembled without errors and then executed cleanly.
The latest z390 and zcobol PTF v1.5.00e contains new ZPAR utilities which are documented on www.zpar.org and includes:
1. ZPARGEN for batch compile of COBOL and assembler programs
2. ZPARERR summary report of all errors from batch compiles and/or assemblies. See example of latest compile results for 430 of the COBOL 1985 ANSI NIST test suite on www.zcobol.org
3. ZPARTRS trace program source statement execution for zcobol or z390 assembler program.
The latest z390 PTF with zcobol and ZPAR utilities is available from www.z390.org
zcobol v1.5.00b now supports ANSI/ISO 754 Decimal Floating Point (DFP) plus ANSI/ISO 754 Binary Floating Point (BFP) .
zcobol supports the new explicit COBOL USAGE types defined in the draft COBOL 2008 standard: FLOAT-DECIMAL-7, FLOAT-DECIMAL-16, FLOAT- DECIMAL-34, FLOAT-BINARY-7, FLOAT-BINARY-16, FLOAT-BINARY-34. In addition the IBM mainframe default standard Hexadecimal Floating Point (HFP) is supported using FLOAT-HEX-7, FLOAT-HEX-15, and FLOAT-HEX-30. The COBOL 2002 standard generic floating point usage types FLOAT-SHORT, FLOAT-LONG, and FLOAT-EXTENDED default to DFP, but can be reassigned to any of the 3 types using zcobol option FLOAT(HEX), FLOAT(BINARY), or the default FLOAT(DECIMAL). The default for COMP-1 and COMP-2 in zcobol is HFP for IBM mainframe compatibility.
In addition to the floating point extended data types, zcobol now also supports the following COMP fields: half word S9(4), full word S9(9), double word S9(18), and quad word S9(39) and also packed decimal and zoned decimal up to S9(31).
The zcobol verbs MOVE, ADD, SUBTRACT, MULTIPLY, DIVIDE, IF, and DISPLAY support the above data types in any combination. zcobol generates HLASM IBM mainframe compatible code which can be run at native speed on IBM z9/z10 mainframes or the code can be compiled, linked, and executed on any J2SE platform including Windows and Linux using z390. The InstallShield download for z390 and zcobol which is open source is available on www.z390.org. For more information on zcobol visit www.zcobol.org. The download includes demos and new regression tests for the new data types.
The demo zcobol\demo\powers.cbl displays powers of 2 up to 126 using the new COMP S9(39) 128 bit integer support. The 3 regression tests zcobol\test\TESTHFP1.CBL, TESTBFP1, and TESTDFP1 using FLOAT(HEX), FLOAT(BINARY), and the default FLOAT(DECIMAL) respectively illustrate the new floating point code generation and execution capabilities.
Finally you can define a decimal floating point fraction such as 0.1 in COBOL and have it result in exactly 0.1000000 using DFP short versus 0.09999999 for HFP or BFP short due to irrational result in base 2 versus base 10.
This first release includes demos, regression tests, and EXEC CICS COBOL programs which you can compile, link, and execution on any J2SE platform including Windows and Linux. The generated HLASM compatible source and object code can also be ported to run at native speed on mainframe a9/z10 processors. The generated HLASM compatible source code includes all data labels and paragraph labels and utilizes the latest z9/z10 instruction set to optimize generated code including support for 64 bit register instructions such as LG and DSG plus baseless procedure division code using relative branch instructions.
I hope folks will try it out this week and then come to SHARE session 8194 on Tuesday, March 3, 2009 at 8 AM in Austin TX to learn more. Melvyn Maltz, the zcobol EXEC CICS support developer and I will be there to present z390 and zcobol and answer questions. If there is enough interest, we could try and schedule a BOF Tuesday evening.
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.
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.
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.
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
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.
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.
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:
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.
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.
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:
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:
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:
Checkout the new z390 mainframe assembler coding problems and submitted solutions here:
You can join the growing group of participants and submit as many problems and solutions as your like.