DBAOTM – The mainframe box, a big box

In this post and subsequent ones, I will discuss the main hardware concepts of mainframe environments. I will not go into the tiniest detail, but I must be a bit technical. To make things easier to understand, I will compare the mainframe technology with mainstream x86 and Unix technology. You will see there is often a difference in terminology.

The mainframe has a long history. Some hardware terminology is different from what we know. To get some understanding of this hardware we need to talk a little bit about mainframe jargon.

This post appears as part of a number of articles in the category “Don’t Be Afraid Of The Mainframe.

A box full of CPU and memory

A mainframe is a large refrigerator-size box with computing capacity. The box houses the computing units, the CPUs. These are not x86 CPU’s like in your PC. But a mainframe uses CPU’s build according to the processor architecture called IBM z/Architecture.

In your PC, the CPU, the memory and other chips are soldered on a motherboard. Like in your PC, you find a sort of motherboard in the big mainframe box. The mainframe motherboard is called a drawer.  The drawer is a bit bigger than your PC motherboard because it carries more components.

On the drawer the CPU and memory chips for the mainframe are soldered, and some more components.  A drawer can have a number of CPU chips. In the z14 model the number of CPU chips in a drawer can be 6.

Each CPU chip on the drawer has a number of processor cores, the actual CPUs. The number of processor cores varies per mainframe model. In the z14 mainframe model there are 10 cores on a chip.

Finally you can have multiple drawers in a mainframe box. In the z14 there can be 4 drawers.

Now let’s count. You can have a maximum of 4 drawers, each with a maximum of 6 CPU chips, each chip with 10 cores. Thus, you can have 240 processor cores in a mainframe box – the z14 model to be precise. The mainframe uses a number of these 240 cores for internal processing. For you as a mainframe user up to 170 processor cores in a single mainframe box. 

You also need memory. Every drawer can have a maximum of 8 TB of memory in the z14. So in total you can have 32TB of memory in your z14 mainframe.

Enfin, a lot of computing power.

What else is in the box

Besides the main computing elements, CPU and memory, the mainframe server contains almost everything else needed. Power supplies, network cards, cooling devices, I/O cards, and more .

To make sure the mainframe can continue running when one of these components fails, you find at least two items of these components in a mainframe.

In the picture of Figure 3 you can see the following components:

  • Processor drawers – as we saw, the motherboard of the mainframe. There can be multiple processor drawers in a machine, depending on the number of CPUs you have ordered.
  • PCIe Input Output drawers in which cards are configured for networking equipment, IO interfaces (disk, tape, server-to-server connections) and additional facilities such as encryption and compression. PCIe is a standard for interfaces in a computer.
  • Cooling components to regulate the temperature. A mainframe box can be water-cooled or air-cooled, by the way.
  • Power supplies to provide power for the components in the machine.

All in all, it looks very much like a normal computer, but a little bigger.

In the picture you also see two laptops. As we will see later, the big box needs to be configured. The two laptops are so-called support elements. With these support elements you can configure the hardware, and also monitor the state of the hardware.

More technical information on mainframe hardware can be found here:

https://www.ibm.com/support/knowledgecenter/zosbasics/com.ibm.zos.zmainframe/zconc_mfhardware.htm

John Mertic on the importance of open-source for the mainframe

Interesting podcast, in which Reg Harbeck talks with John Mertic about the history, future role and community impact of open-source technology for mainframe clinet and in general.

… their ability to have a technology stack that enables them to execute and serve their customers better, is a competitive advantage. We see open source as kind of as little bit of that leveling appeal. It’s enabling people to get to that point faster than they ever had before. You don’t need a vendor to be that person. Even legacy organizations and companies have turned themselves into software companies because open source has opened that door for them.

Execute an operator command via JCL

  • Post category:JCL
  • Reading time:1 mins read

In my previous post I shared a way to execute operator command from a batch job using Rexx and SDSF. That is of course a bit cumbersome if you just want to fire off a fixed operator command.

Therefore here the simplest way to execute an operator command:

https://github.com/execpgm/execpgm-assets/blob/master/Tools/OperatorCommandJCL.txt

//...jobcard                     
//EXECCMD EXEC PGM=IEFBR14                        
// COMMAND 'D A,L'  

Executing operator command froms batch – using Rexx and SDSF

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

One of the many way to execute an operator command from a batch rexx program.

With this solution here, with Rexx and SDSF, you can embed the commands in more complex business logic, and use Rexx variables to dynamically establish values for the commands to be issued.

By the way I have started a repository on GitHub on which I will share assets in the future.

https://github.com/execpgm/execpgm-assets

I have added this tool here:

https://github.com/execpgm/execpgm-assets/tree/master/Tools

Direct link:

https://github.com/execpgm/execpgm-assets/blob/master/Tools/OperatorCommandSDSFbatch.txt

//GENER   EXEC PGM=IEBGENER 
//SYSPRINT DD SYSOUT=* 
//SYSIN DD ,BLKSIZE=800,LRECL=80 
 GENERATE 
 LABELS DATA=ALL 
/*
//SYSUT1  DD *  
/* REXX /  
RC=ISFCALLS('ON')  
YOURSTC = "MYSTC"  
ADDRESS SDSF "ISFEXEC '/P "YOURSTC"'"  
ISFDELAY="5"  /* REPLY IS IN STEM ISFULOG. */ 
/*
//SYSUT2  DD  DSNAME=&&DS1(CMD),DISP=(NEW,PASS), 
//       UNIT=SYSDA,SPACE=(TRK,(5,,2)) 
//* 
//RDWRJ    EXEC PGM=IKJEFT01 
//SYSPRINT DD SYSOUT=* 
//SYSPROC  DD DISP=SHR,DSN=&&DS1 
//SYSTSPRT DD SYSOUT=* 
//SYSTSIN DD * 
 CMD 
/* 
//

Go fix it while it ain’t broken yet – modernize the mainframe

Reg Harbeck wrote an excellent article in Destination z, Overcoming IBM Z Inertia, in which encourages IBM Z (mainframe) users to take action on modernizing their mainframe.

The path of action Harbeck describes is to assign new mainframers (RePro’s) with the task to find and document what the current mainframe solutions in place are expected to do, and to work with the organisation to see what needs to retired, replaced or contained.

In other words task a new generation with the mainframe portfolio renewal, and not leave this to the old generation, who are “surviving until they retire while rocking the boat as little as possible” (hard words from Harbeck but it is time to get people in action).

In additional to the general approach Harbeck describes I think it is important to assure senior management support on a level as high as possible. Doing so you prevent that the priority of this program is too easily watered down by day-to-day priorities and you assure perceived or real “impossibilities” and roadblocks are moved out of the way resolutely. So:

  • Make modernization a senior management priority. Separate it organizationally from task from the KSOR (Keep the Show On the Road) activities, to make sure modernization priorities compete as little as possible with KSOR activities.
  • Appoint a senior management and senior technical exec with a strong Z affiliation to mentor and support and guide the young team from a organisational and strategic perspective.
  • Have a forward thinking, strong and respected senior mainframe specialist  support the team, with education and coaching (not to do it for them).

It will be an investment and, according to the “survivors” never be as efficient as before, but one very important thing it will be: fit for the future.

The big free mainframe curriculum

  • Post category:EducationGeneral
  • Reading time:10 mins read

Learn mainframe, z/OS and Linux for Z on a shoestring.

Let me know if you have any updates or additions to the list.

Introduction

Here’s What Happens When an 18 Year Old Buys a Mainframe

z/OS introductory video course

http://www.redbooks.ibm.com/redbooks.nsf/redbookabstracts/crse0304.html?Open

The ABCs of System Programming redbooks

http://www.redbooks.ibm.com/abstracts/sg246981.html?Open

IBM z/OS Basic Skills page in Knowledge Center. 

https://www.ibm.com/support/knowledgecenter/en/zosbasics/com.ibm.zos.zbasics/lcmain.html

Introduction to the new mainframe

http://www.redbooks.ibm.com/abstracts/sg246366.html?Open

RelevantZ site

http://relevantz.ibmsystemsmag.com/ibm-systems-relevant-z

IBM Z Youtube

IBM Z YouTube channel

Love mainframe

https://lovemainframe.com/

Open source initiatives

Zowe

https://www.openmainframeproject.org/

Free training offers

Cross-technology

z/OS Introduction and Workshop

http://dtsc.dfw.ibm.com/MVSDS/’HTTPD2.APPS.ZOSCLASS.SHTML(ZOSCLASS)’

Master the mainframe:

https://www.ibm.com/it-infrastructure/z/education/master-the-mainframe

Free training at HPI

https://open.hpi.de/courses/mainframes2018

Many tutorials on Mainframetechhelp

https://www.mainframestechhelp.com/

Tutorialspoint on mainframe

https://www.tutorialspoint.com/mainframe_tutorials.htm

Mainframe Playground 

https://mainframeplayground.neocities.org/

TSO/ISPF

Introduction to TSO/ISPF

https://www.tutorialbrain.com/mainframe/tso_ispf/

JCL

Introduction to JCL

https://www.tutorialbrain.com/mainframe/jcl_pgm_parameter/

JCL course

https://www.tutorialspoint.com/jcl/jcl_job_statement.htm

COBOL

Introduction to COBOL

https://www.tutorialbrain.com/mainframe/cobol_home/

Free COBOL course from CSIS

http://www.csis.ul.ie/cobol/course/

Mainframe playground on COBOL

https://mainframeplayground.neocities.org/COBOL.html

Books (search for 2nd hand versions)

Teach Yourself COBOL In 21 Days

Murarch’s Mainframe COBOL

CICS

Introduction to CICS

http://www.redbooks.ibm.com/abstracts/crse0303.html?Open

Db2 for z/OS

DB2 for z/OS: Data Sharing in a Nutshell

Introduction to Db2 z/OS (for programmers) – https://www.tutorialbrain.com/mainframe/db2_tutorial/

MQ for z/OS

MQ on z/os concepts

https://www.ibm.com/support/knowledgecenter/en/SSFKSJ_8.0.0/com.ibm.mq.pro.doc/q003590_.htm

http://share.confex.com/data/handout/share/131/Session_23611_handout_11867_0.pdf

VSAM

Introduction to VSAM

https://www.tutorialbrain.com/mainframe/vsam_tutorial/

Assembler

Assembler training

Developer topics

IBM System z Tech Video’s

IBM Z Systems tech zone

  • Application Discovery ADDI
  • Application Delivery Foundation for z Systems ADFz
  • zD&T – mainframe for hobiests on your Intel machine zD&T

Access to real mainframe

Unfortunately there is no Community mainframe yet. How cool would that be. 

There is the emulator solution zD&T on which you can run z/OS legitimately (warning: quite cumbersome, slow and expensive.)

IBM Z trials

https://www.ibm.com/it-infrastructure/z/resources/trial

Gives you 3 days access to a trial environment with scripted tutorials..

When you have a software development company, or if you are rich:

Remote development programme on Dallas System z

http://dtsc.dfw.ibm.com/MVSDS/’HTTPD2.ENROL.PUBLIC.SHTML(ZOSRDP)’

(Will cost you something like $550 USD per month.)

COBOL 60 by one of the early adopters, Wim Ebbinkhuijsen

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

This year COBOL was delivered 60 years ago as one of the first general purpose, cross-platform programming languages.

On 8 January 1960 the ‘COBOL Executive Committee’ formally approved the design of the programming language “COBOL 60”.

One of the very early adopters of COBOL in the Netherlands, and long time member of the COBOL standard, Wim Ebbinkhuijsen, did a very nice talk at the event organized by Ordina. He went through the history of COBOL through the past 60 years. As a close observer and influencer of the programming language you get a great insight in this recent history of computing. Slides can be found here.

A very short summary of replication solutions (for Db2)

  • Post category:Db2
  • Reading time:4 mins read

Some time ago I did a short summary presentation on my experience with replication solutions for Db2 on z/OS. The pictures and text are quite generic, so I thought it might be worthwhile sharing the main topics here. The picture below summarizes the options visually:

Queue replication

Synchronizes tables. The synchronization process on the capture side reads the Db2 transaction log, and puts the updates for which a “subscription” is defined on a queue. On the apply side, the tool retrieves the updates from the queue and applies them to the target database.

SQL replication

Also synchronizes tables. In this case the capture process stores the updates in an intermediate or staging table, from which the apply process takes the updates and applies them to the target tables.

Data Event Publishing

Takes the updates to the tables for which a subscription is defined and produces a comma-delimited or xml message from it which is put on a queue. The consumer of the message can be any user-defined program.

Change Data Capture

CDC provides a flexible solution that can push data updates to multiple forms of target media, whether tables, messages or an ETL tool.

Requirements

After my short summary, we dug a little in the requirement’s for the specific problem this team was aiming to address. They needed:

  • A lean operational database for the primary processes.
  • Ad-hoc and reporting queries on archival tables, where data in archive table can be kept over several years.
  • The amount of data is relatively large: it should support tens to hundreds of millions of database updates per day, with a peak of tens of millions in an hour.
  • Target database management system was not decided yet; could be Db2 or Oracle.

So a solution should replicate the operational database to an archive database, while data must be very current, demanding near-realtime synchronization.

We focused a it on the Queue Replication solution. The target DBMS for Queue replication can be Db2, Oracle and SQL Server (and a few more). Furthermore, in my experience this solution can support:

  • High volumes in peak periods: millions of row inserted/updated in short period of time
  • Latency can remain within seconds, even in peak periods – this does require tuning of the solution, such as spreading messages over queues.For selected table you can specify suppress deletes, which allows for building up of historical data. 

There are a few concerns in the Queue Replication solution:

  • Data model changes will require coordination of changes in source, Queue Replication configuration and target data model.
  • Very large transactions (not committing often enough) may be a problem for Queue Replication (and also a very bad programming practice).

Hope this helps with your replication needs.

$ZOOM – Mother of all EDIT macro’s

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

The most useful ISPF EDIT macro ever. I think it was written by Paul van Goethem from Belgium, somewhere before 1993. It has quickly spread through many sites.

Point your cursor at at dataset name in a file your are editing en executing the macro will launch an EDIT session of that file.
I always put in under PF key PF4 which by default has the not very useful default value RETURN.

Note the value of the variable INVALID in the below may be corrupted. It should contain any character that is not valid as part of a dataset. The binary values it can contain are not very portable.

/****************************REXX***********************************/
/* FUNCTION: RECURSIVE EDIT OF BROWSE VIA DSNAAM AND,OR MEMBER     */
/*  SPECIFIED VIA CURSOR SENSITIVE EDIT MACRO                      */
/* FORMATS ACCEPTED:                                               */
/*  DATA.SET.NAME   : EDIT/BROWSE OF THIS                          */
/*  DATA.SET.NAME(MEMBER) : EDIT/BROWSE THIS                       */
/*  MEMBER    : EDIT/BROWSE IN SAME LIBRARY AS INDEX               */
/****************************REXX***********************************/  
ADDRESS ISPEXEC    INVALID= ",'\<\>,:;+��▖!�%�-="
ADDRESS ISREDIT 'MACRO (FUNCTIE)'
FUNCTIE = TRANSLATE(FUNCTIE)  
IF SUBSTR(FUNCTIE,1,1)='B'
THEN FUNCTIE='BROWSE'
ELSE FUNCTIE='EDIT' 
LIN=0 
ADDRESS ISREDIT '(LIN,COL) = CURSOR'  
ADDRESS ISREDIT '(CLINE) = LINE 'LIN   
/* FIND CURRENT WORD */ 
T=SUBSTR(CLINE,1,COL)  
T =TRANSLATE(T,' ',INVALID)    
Y=LASTPOS(' ',T) 
IF Y=0
THEN T=CLINE    
ELSE T=SUBSTR(CLINE,Y+1)
PARSE VAR T WOORD  .   
WOORD =TRANSLATE(WOORD,' ',INVALID)
"CONTROL ERRORS RETURN"
IF INDEX(WOORD,'(') /= 0 THEN DO /* TAKE DSN IF SPECIFIED */
  PARSE VAR WOORD  DSNAME '('  MEMBER ')' 
  FUNCTIE" DATASET('"SPACE(DSNAME)"("MEMBER")')" 
  FRC=RC
  END
ELSE DO
  IF INDEX(WOORD,'.')/=0 THEN DO   
    PARSE VAR WOORD  DSNAME . 
    FUNCTIE" DATASET('"SPACE(DSNAME)"')" 
    END  
  ELSE DO         
    ADDRESS ISREDIT "(DSNAME) = DATASET"  
    WOORD = SPACE(TRANSLATE(WOORD,' ','.()'))
    FUNCTIE" DATASET('"DSNAME"("WOORD")')"  
    END    
  FRC=RC   
  END  
ADDRESS ISPEXEC "CONTROL ERRORS CANCEL"  
IF FRC> 4 & SYMBOL(ZERRMSG)/= 'LIT' THEN DO      
  MSG= ZERRMSG':'ZERRLM            
  "SETMSG MSG(ZOM000A)"            
  END                           
RETURN