Thursday, October 08, 2009

New COBOL, Assembler, and EXEC CICS source code exectuion trace facility

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 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 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 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:

Don Higgins

No comments: