• Post category:Links
  • Reading time:9 mins read

Introductory learning materials

Start here: Here’s What Happens When an 18 Year Old Buys a Mainframe. Great video.

z/OS introductory video course

Master the Mainframe

The ABCs of System Programming redbooks

IBM z/OS Basic Skills page in Knowledge Center.

Introduction to the new mainframe

Introduction to CICS


DB2 for z/OS: Data Sharing in a Nutshell

Mq on z/os concepts

RelevantZ site

IBM Z Youtube

IBM Z YouTube channel

Introduction to CICS from IBM

Introduction to the (new) mainframe)

Books (search for 2nd hand versions)

Teach Yourself COBOL In 21 Days

Murarch’s Mainframe COBOL

Assembler training

Assembler training

IBM System z Tech

IBM System z tech zone

Love mainframe site

Relevant Z


Free training offers

IBM z/OS Introduction and Workshop for the IT Professional – 5 Day Edition (Next Offering: November 11th to 15th – USA CDT)

Free training at HPI

Many tutorials on Mainframetechhelp

Tutorialspoint on mainframe

Mainframe Playground

JCL course

Free COBOL course from CSIS

z/OS Introduction and Workshop’HTTPD2.APPS.ZOSCLASS.SHTML(ZOSCLASS)’

Mainframe playground on COBOL

Access to real mainframe

Community mainframe

Unfortunately there is no Community open source mainframe yet. How cool would that be – a z/OS system on real Z hardware not owned by our boss.


There is the emulator solution zD&T on which you can run z/OS legitimately. If you can afford it and like tinkering with an Intel machine an dLinux.

IBM Z trials – only 3 days

Only available for 3 days

Master the mainframe – free

Remote development programme on Dallas System z

When you have a software development company, or if you are rich.’HTTPD2.ENROL.PUBLIC.SHTML(ZOSRDP)’

Will start at something like $550 USD per month.

Compare Disk contents with Catalogs – a custom Rexx and JCL solution

  • Post category:Rexx
  • Reading time:2 mins read

This one is untested since 1997. A little warning, though I believe it will still work.

During a z/OS migration (probably still MVS/ESA or maybe OS/390) we needed to restructure the catalog layout. The client did not have a good catalog structure in place and almost everything had ended up in the master catalog. A small nightmare, especially for a smooth upgrade. BEtter worded: they made a mess of their catalogs. (The company does not exist anymore.)

I created some custom programs to compare catalog contents with contents on disks.

The job in CMPLCLVJ does the following:


  • Step INTRPOLD – Interpret an existing LISTCAT result for easier handling during the compare
  • Step LIST: Create LISTVTOC of desired volumes
  • Step INTRPLV – Interpret the LISTVTOC output for easier handling during the compare
  • Step COMPLCLV – Compare the Listcat and LISTVTOC

The following Rexx programs are used in this job:

INTLISTC – interprets the LISTCAT output.

INTLISTV – interprets the LISTVTOC results

CMPLCLV – compares the interpreted (transformed) listcat and listvtoc results and reports the results.

// Judd Froam

A simple Rexx program to find matches / unmatches in file contents

  • Post category:Rexx
  • Reading time:3 mins read

The problem were are solving here:

You have 2 files, one has records (lines) with “key” values in the first word, the second has records (lines) “key” values in the second word. (A Word here is defined as a string delimited by blanks – similar to the definition in Rexx – See Rexx Reference)

For all of the key entries in file1 you want to know if key entries exist in file2. If the key entry does not exist the record in file2 is written to the output file.

The solution in Rexx below works as follows:

Build a simple hash table of key entries in file1. For each record in file2, check if the key value has an entry in the hash table. If not, write the record to the outfile file.

BTW in Rexx programs for files that are not excessively large, I have the habit of reading them fully into a stem variable before processing. Similarly I use a stem variable to capture the output data, and write that in one go after processing is complete. Not sure if that is a good habit, but it makes programming easy.

/* Rexx */
trace off
/* Fill InpRec1. and InpRec2. */
Call ReadInput
/* Fill filter.     */
Drop filter.Do N = 1 To InpRec1.0  
entryname = Word(InpRec1.N,1)  
   filter.entryname = 1
End /* Do */
/* Compare old file with new and write output */
Drop OutRec1.OutRec1.0 = 0
Do N = 1 To InpRec2.0  
   entryname = Word(InpRec2.N,2)  
   If filter.entryname = 1  
   Then Do
      NOP /* This entry exists in both, that's ok */      
      Say 'To be skipped : ' entryname    
    Else Do /* Write this line, this entry has to be processed */
       help = OutRec1.0 + 1     = InpRec2.N      
       OutRec1.0 = help    
End /* Do */
 Call WriteOutput
/* Routines ********************************************************/
Address Tso
'EXECIO * DISKR FILTER  (Stem InpRec1. Finis'
If RC <> 0
Then Do
    Say 'Error reading input file FILTER, Rc = ' RC
    Exit 69  
'EXECIO * DISKR INPLIST (Stem InpRec2. Finis'
If RC <> 0
Then Do
    Say 'Error reading input file INPLIST, Rc = ' RC
    Exit 69  End
Return /* ReadInput */
Address Tso
'EXECIO * DISKW OUTLIST (Stem OutRec1. Finis'
If RC <> 0
Then Do
    Say 'Error writing output file OUTLIST, Rc = ' RC
    Exit 69
Return /* WriteOutput */

Copy members from one PDS(E) to another using the IEBCOPY utility

  • Post category:Utilities
  • Reading time:3 mins read

This JCL script shows how to copy members from one PDS library to another. 

I have retained the input file being tape in the original JCL script for nostalgic reasons only; you will unlike ever use this nowadays. As unlikely, you will be allocating the output dataset on a specific volume, so normally you could omit the VOL=SER= clause as well.

If you omit the S M= (SELECT MEMBER=) clauses, the entire content of the INDD input PDS will be copied to the OuTDD output PDS.

//STEP01   EXEC PGM=IEBCOPY                  
//SYSPRINT DD SYSOUT=*                        
//*         VOL=SER=R6868A,UNIT=CTAPE                    
//         VOL=SER=DASD1A,UNIT=SYSDA,SPACE=(9600,(240,30,20))
//SYSIN    DD *                                    
COPY INDD=INDOC,OUTDD=OUTDOC                       
S M=MEMBER1                                         
S M=MEMBER2                                        
S M=OTHERMEM                                       
S M=MEM4          

THe IEBCOPY is a simple copy utility but it has many many options, of which you will only practically use a fraction. The application above I think is the one you will use in 99% of occasions. The DFDMDdfp Utilities manual sums all the options up.

How to authenticate to the z/OSMF API with a certificate

  • Post category:z/OSMF
  • Reading time:2 mins read

This is a brief description of how to use the z/OSMF API with certificate authentication, from a PHP application.

Create a certificate.For example with openSSL:

openssl req -newkey rsa:2048 -nodes -keyout yourdomain.key
 -out yourdomain.csr

Send the certificate to a certificate authority to get it signed.

Add the signed certificate to RACF:


When authentication, the userID in the ID field will be mapped to, and the z/OSMF tasks will run under this userID.

Save the signed certificate on the PHP server in a directory accessible for the PHP server.
The following PHP code will then issue a request with client certificate authentication: 

curl_setopt($curl, CURLOPT_SSLCERT, '/<server>/htdocs/<somesubdir>yourdomain.csr');
curl_setopt($curl, CURLOPT_SSLCERTTYPE, 'PEM');
curl_setopt($curl, CURLOPT_VERBOSE, 1);
curl_setopt($curl, CURLOPT_HTTPHEADER, array(
// this is the basic auth commented out: 'authorization: Basic ' . base64_encode($this->userid . ":" . $this->password),
etc for the reast of the header

Compile and run a COBOL program on z/OS – A mini-tutorial

  • Post category:COBOL
  • Reading time:2 mins read

With this mini-tutorial you may get a quick start with COBOL on z/OS. It gives you a handson overview of the process to get a COBOL program running on z/OS.

The tutorial will show you how to create a Hello World COBOL program on z/OS, compile it and then run in. You can find the program itseld and the JCL scripts for the compilation and run attached below to this post.

The following video describes the process

The following assets are used in this mini-tutorial.

The Hello World COBOL program


The JCL to compile the program


The JCL to run the program


/* Niek de Greef