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:
Happy dumping!
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!
Great! However, it seems there seem to be still no solution, so one cannot really dump, for example, a 150000 track sysres?
ReplyDeleteHi! CCKDUMP compresses, so the limit is actually that the compressed output cannot be above a certain size. If that limit is hit, then you can always move part of the volume away and dump the volume, and then re-assemble it manually.
DeleteNice article but I’m curious how you restore the dump after it’s preformed. Do you need the starter system to do that? If so where can I find it?
Delete