BKBYVTOC Utility Program


Purpose of the utility

This program is designed to automate backing up files from disk volumes on MVS3.8J systems.

It will generate all the backup jobs needed to backup all catalogued files on the disk volsers you select. It currently only supports backup of partitioned(PO) and physical-sequential(PS).

Features

Sample JCL

You can't get much simpler than this. This job backs up four packs, if you want to backup more with each job then just add additional DDnn cards. The four CBT packs on a TK3 system have enough files on them to demonstrate multiple job creations.

//MARKBKPJ JOB  (0),'BACKUP 4 PACKS',CLASS=A,MSGCLASS=A
//BKBYVTOC EXEC PGM=BKBYVTOC
//DD1      DD   UNIT=3350,VOL=SER=CBTCAT,DISP=OLD
//DD2      DD   UNIT=3350,VOL=SER=CBT000,DISP=OLD
//DD3      DD   UNIT=3350,VOL=SER=CBT001,DISP=OLD
//DD4      DD   UNIT=3350,VOL=SER=CBT002,DISP=OLD
//SKIPLIST DD   SYSOUT=*
//BKPLIST  DD   DISP=(NEW,CATLG,DELETE),
// DSN=MARK.TEST.BKBYVTOC,
// UNIT=3380,VOL=SER=PUB002,
// DCB=(DSORG=PS,RECFM=FBA,LRECL=80,BLKSIZE=3200),
// SPACE=(CYL,(2,1))
//JCLOUT   DD   SYSOUT=(A,INTRDR)   FOR LIVE RUN
//TEMPLATE DD   DISP=SHR,DSN=INSTALL.UTILS.BKBYVTOC(TEMPLAT1)
//EXCLUDE  DD   *
CBTCOV.FILE039
MARK.EXCLUDE.ME1
MARK.EXCLUDE.ME2
/*
//

One thing of note. There is additional code in BKBYVTOC to handle output to an existing PDS dataset (ie: 'xxx.xxx(mbrname)') rather than seperate flat files as I needed that functionality for a while. I have left it in as I will probably need it again at some point; feel free to remove it from your copy if you will never have that requirement.

The template file

As mentioned above the backup jobs are built using a template file that defined the BKPPS and BKPPO procedures. This allows you a great deal of customisation with minimal effort.

The only requirements for the template files are the four points listed below. Refer to the sample template member for a working example.

The supplied template member TEMPLAT1 provided shows how the job template can be used to initially mount a tape and retain it, and all the backup steps can then referback to that tape to avoid repeated tape mounts.

Obtaining the program(s)

The program is provided as a single JCL deck that will create an install dataset with the assembly jobs and source for all the programs, test jobs and sample templates.

The BKBYVTOC program does not need to be in a APF authorised library if you wish to use that on its own.
The additional MDEXWRAP needs to be authorised if it is to wrap iebcopy as the iebcopy code getmains into the higher subpool ranges that non-authorised programs cannot reach

Read the comments at the top of the job to see what you should customise before running the JCL; and the $DOC member after install (or by viewing the text file (searching for $DOC) to see what is needed to get it running after the install.

The JCL deck to use to install the utility and the program itself of course come with no warantee of suitability. As always use at your own risk.
The JCL deck uses UNIX line feeds, don't open it in notepad :-).

Additional utilities

There are additional programs and scripts I have been using to try to permit me to fully automate restores. To avoid cluttering the main BKBYVTOC jobdeck the additional programs are in a seperate jobdeck, they are (or will be) useful to me but possibly not to anyone else.

I use some of the programs in here to post process the bkbyvtoc output with a list of the actual tapes allocated for the backups to get a complete combined listing of what I have backed up, write that to a hercules pipe printer to get the report as a linux text file, and use the text file as data for a php webpage that is used for point-and-click on-demand restores. If you have a webserver running on the same Linux server as your hercules system you might want to look at these. The php code and bash pipe printer script are included in the jobdeck.
One day there will probably be a clist to request a restore, followed by a full screen 3270 program; but thats in the future, just check back every six months.