There are some examples of these commands in use, in the started task tips page.
DFHSM works on volumes, primary volumes hold user accessible data, ML1 and ML2 volumes hold migrated data. Three of the volume management commands are
Volume Commands
ADDVOL - To define volumes to HSM
FREEVOL - To move data off HSM managed volumes
DELVOL - to delete volumes from HSM
I have used these commands to move an HSM ML1 volume dynamically. You
cannot use a DFDSS COPY of FDRCOPY job for this without shutting DFHSM
down, as DFHSM is holding the disk. You could use a product like FDRPAS
or TDMF, or you can use the procedure below.
Check you have enough space to move your volume, if not, clear some space in the ML1 pool
Issue the HSM command
ADDVOL volser UNIT(3390) MIGRATION(DRAIN)
Issue the HSM command
FREEVOL MVOL(volser) AGE(0) TARGETLEVEL(ML1)
The drain process could take an hour or two. It is best to move the data to existing ML1 volumes, as the recall service is maintained. If you move direct to ML2, you lock out access to the data while your move is running.
When you get the notify that the freevol command has completed, The ML1 volume is now free, so move it your normal way. If the volume contains an SDSP, you can either move it with the disk, or delete/redefine it.
If you run the AUDIT with NOFIX first, you can check your output file to make sure that the audit will do what you want. This is not practical if you are auditing a 3590 tape, as it takes so long. The command with NOFIX will output FIXCDS commands to your output file.
It is not a good idea to run the FIXCDS commands yourself manually, as several of the AUDIT commands will do more than just issue FIXCDS commands. For instance, AUDIT MEDIACONTROLS will also scratch an invalid catalog entry. AUDIT may also create a catalog entry for a data set that is in an SDSP and has an MCD record but no catalog entry. If you just run the FIXCDS commands manually, you would lose this data.
EXPIREBV command
You need to run this command to remove expired backups. If you do not run the command, the BCDS grows and tapes are never re-used. I once went into a site that had not run EXPIREBV for over two years, and were struggling to manage a large BCDS. That was one of my quickest ever wins. The command is simply
HSEND EXPIREBV EXECUTE
LIST Command
You use this command to get information from HSM volumes. A following example is to get information about datasets archived to a tape. This command will produce hundreds of lines of output, so send the output to a dataset, not your terminal.
HSEND LIST TTOC (A01086) ODS(output.dataset)
HSEND LIST ML1 TERM
will list out the status of all your ML1 volumes.
AUTH Command
You use this command the change the access that a user has in DFHSM. You have three options, USER, CONTROL or REVOKE. A USER can issue all commands except AUTH, You must have at least one CONTROL user who can issue AUTH commands to enable access to others. This can be a problem when testing out disaster recovery procedures, as your authorised user might not be present. What you need to do is add a line to your ARCCMDxx member as shown below, with 'userid' set to an on-site user.
AUTH userid DBA(CONTROL)
You then need to 'bounce' DFHSM.
FIXCDS Command
You use this command to display or alter data within the three CDS files. IBM seem to have withdrawn the documentation for this command. The AUDIT command will build FIXCDS commands as described above, so when you use the AUDIT command you can see FIXCDS in use.
The example below is a fix to reset the SDSP enqueue bit if HSM is cancelled. This fix has certainly worked for me in the past, but there is no guarantee that it still works now! Use this procedure at your own risk.
The symptom of the problem is that recalls from an SDSP are failing. First display the status of the SDSP using
TSO HSEND FIXCDS V volser
Where volser is the ML1 volume that contains the SDSP file.
Check field x'59' in the display output. If bit 5 at x'59' is on then issue the following command:
F HSM,FIXCDS V volser PATCH(X'59' BITS(.....0..))
There are some other examples of the use of FIXCDS in the 'HSM Tape and Dataset tips' section