Skip to main content

How-to: Dump all disks on a z/OS system

I've been learning about z/OS and MVS over the last couple of weeks using the Master the Mainframe course and also the highly affordable courses from Interskill. I wanted to build something proper so I built a thing that can backup a full z/OS system to CCKD files (same as what Hercules/Hyperion uses). With the fixes for 64-bit CCKD to Hyperion now merged, and the 64-bit cckddump tooling appears to be in progress, this might come in handy for some folks.

This is the CCKDALL JCL:
//CCKDALL   JOB 1,NOTIFY=&SYSUID
//DUMPJCL   SET DUMPJCL=&&SYSUID..JCL(CCKDDUMP)
//DASDS     EXEC PGM=SDSF
//ISFOUT    DD SYSOUT=*
//CMDOUT    DD DSN=&&SDSF,DISP=(NEW,PASS,DELETE),SPACE=(CYL,1),
//             RECFM=FB,LRECL=100
//ISFIN     DD *
  SET CONSOLE BATCH
  SET DELAY 2
  /D U,DASD,,,9999
  PRINT FILE CMDOUT
  ULOG
  PRINT
  PRINT CLOSE
//*
//FMT      EXEC PGM=ICETOOL
//TOOLMSG  DD
//DFSMSG   DD SYSOUT=*
//IN       DD DSN=&&SDSF,DISP=(OLD,DELETE,DELETE)
//OUT      DD DSN=&&SORTED,DISP=(NEW,PASS,DELETE),SPACE=(CYL,1),
//            RECFM=FB,LRECL=11
//SYMNAMES DD *
ADDR,44,4,CH
TYPE,49,4,CH
STATUS,54,5,CH
VOLID,68,6,CH
//TOOLIN   DD *
  SUBSET FROM(IN) TO(OUT) INPUT REMOVE HEADER(5) TRAILER USING(CTL1)
//CTL1CNTL DD *
  SORT FIELDS=(VOLID,A)
  OUTFIL OMIT=(VOLID,EQ,C'      '),BUILD=(ADDR,C' ',VOLID)
//*
//SKELLIB  EXEC PGM=IEFBR14
//SKELLIB  DD DSN=&&SKELLIB,DISP=(NEW,PASS,DELETE),
//            DCB=(LRECL=80,RECFM=FB),SPACE=(80,(100,0,1),RLSE)
//*
//SKELCOPY EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY
//SYSUT2   DD DSN=&&SKELLIB(SKEL),DISP=(MOD,PASS,KEEP)
//SYSUT1   DD DSN=&DUMPJCL,DISP=SHR
//*
//REXXLIB  EXEC PGM=IEFBR14
//REXXLIB  DD DSN=&&REXXLIB,DISP=(NEW,PASS,DELETE),
//            DCB=(LRECL=80,RECFM=FB),SPACE=(80,(100,0,1),RLSE)
//*
//REXXCOPY EXEC PGM=IEBGENER
//SYSPRINT DD SYSOUT=*
//SYSIN    DD DUMMY
//SYSUT2   DD DSN=&&REXXLIB(RXPGM),DISP=(MOD,PASS,KEEP)
//SYSUT1   DD *
  /* REXX */
  TRACE I
  SIGNAL ON ERROR
  "EXECIO * DISKR DASDLST (FINIS"
  DO WHILE(QUEUED() > 0)
    PARSE PULL ADDR VOLID
    IF VOLID = "DATAZ1" THEN ITERATE
    JOBID = "D@" || VOLID
    SAY "ADDRESS: '" || ADDR || "', VOLID: '" || VOLID || "'"
    ADDRESS ISPEXEC "FTOPEN TEMP"
    ADDRESS ISPEXEC "FTINCL SKEL"
    ADDRESS ISPEXEC "FTCLOSE"
    ADDRESS ISPEXEC "VGET ZTEMPF"
    ADDRESS TSO "SUBMIT '"ZTEMPF"'"
  END
  EXIT 0
  ERROR:
    /* UPDATE ISPF ERROR CODE AS WELL */
    ZISPFRC = 8
    ADDRESS ISPEXEC "VPUT ZISPFRC SHARED"
    EXIT 8
//*
//BUILD    EXEC PGM=IKJEFT1A,PARM='ISPSTART CMD(RXPGM)'
//SYSPROC  DD DSN=&&REXXLIB,DISP=(SHR,DELETE,DELETE)
//ISPPROF  DD DISP=(NEW,PASS),DSN=&&ISPPROF,
//            SPACE=(CYL,(2,0,44)),
//            DCB=(RECFM=FB,LRECL=80)
//ISPPLIB  DD DISP=SHR,DSN=ISP.SISPPENU
//ISPMLIB  DD DISP=SHR,DSN=ISP.SISPMENU
//ISPSLIB  DD DISP=(SHR,DELETE,DELETE),DSN=&&SKELLIB
//ISPTLIB  DD DISP=SHR,DSN=ISP.SISPTENU
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//ISPLOG   DD SYSOUT=*,
//            DCB=(LRECL=125,BLKSIZE=129,RECFM=VA)
//SYSTSIN  DD DUMMY
//DASDLST  DD DSN=&&SORTED,DISP=(MOD,DELETE,DELETE)
You also need the CCKDDUMP JCL, which is here:
//&JOBID  JOB 1,NOTIFY=&&SYSUID
//DUMP   EXEC PGM=CCKDDUMP
//STEPLIB  DD DISP=SHR,DSN=&&SYSUID..CCKD.LOAD
//SYSPRINT DD SYSOUT=*,RECFM=VB,LRECL=255,BLKSIZE=4096
//SYSUT1   DD DISP=OLD,UNIT=SYSDA,VOL=SER=&VOLID
//SYSUT2   DD DISP=(,CATLG),DSN=&&SYSUID..&VOLID..CCKD,
//             UNIT=SYSDA,SPACE=(TRK,(65535,),RLSE),
//             LRECL=16384,BLKSIZE=16384,RECFM=F
//*
Make sure to update the references to DATAZ1 if you're dumping somewhere else, and also the DUMPJCL variable in the first JCL to wherever you saved the CCKDDUMP JCL.

Happy dumping!

Comments

Popular posts from this blog

Buying an IBM Mainframe

I bought an IBM mainframe for personal use. I am doing this for learning and figuring out how it works. If you are curious about what goes into this process, I hope this post will interest you.

I am not the first one by far to do something like this. There are some people on the internet that I know have their own personal mainframes, and I have drawn inspiration from each and every one of them. You should follow them if you are interested in these things:
@connorkrukosky@sebastian_wind@faultywarrior@kevinbowling1 This post is about buying an IBM z114 mainframe (picture 1) but should translate well to any of the IBM mainframes from z9 to z14.

What to expect of the process Buying a mainframe takes time. I never spent so much time on a purchase before. In fact - I purchased my first apartment with probably less planning and research. Compared to buying an apartment you have no guard rails. You are left to your own devices to ensure the state of whatever thing you are buying as it likely…

Powering a mainframe

The last few days have been eventful. I was contacted by the datacenter that the mainframe's cage is now ready for moving in, and the power has been made available. Very exciting! I grabbed my home-made power cables (more on that later) and my best screwdrivers and set off to the datacenter.


The datacenter staff, not needing a forklift in their day-to-day, had managed to solicit the services of a forklift, the associated operator, and some very handy folks to help navigate the mainframe from the storage space to its final location.



After some intense period of fighting the inclination of the road between the storage facility and the cage (and a door that was a bit too small) it was finally in place. Incidentally we were forced to trust the wheels on this pretty rough floor. I did not expect it to roll that well on raw concrete, I was pleasantly surprised. This thing is a tank!

Now, everybody wanted to see if it was working. My machine did not come with a power cable so I had to so…

Open Datacenter Hardware - Leopard Server

Introduction The Leopard is an OpenRack v1 compliant 12V server commissioned by Facebook to offer compute power. It consists of 2x Intel Xeon E5-2678 v3 and is available with either DDR3 or DDR4 memory. The model is manufactured by two vendors primarily: Quanta and Wiwynn.

Leopard features a 24x PCIe slot which can fit either a PCIe card with low profile, or a riser card with 1x 16x and 1x 8x slots. The server also supports a 3.5" SATA drive as well as either an mSATA or an M.2 drive mounted on the motherboard.

Connectivity wise Leopard has a mezzanine card slot allowing for example 10Gb/s or 25Gb/s Ethernet.

Figure 1 and figure 2 shows the server layout. The server is made to fit inside an OpenRack v1 enclosure, at which point it looks something like figure 3. Due to power constraints an OpenRack v1 can fit 30 of these servers before power starts to become an issue. The Leopard servers that the organization Serverfarm Upstate provides are all fitted with 256GiB DDR3 RAM and 2x …