Tuesday, April 27, 2010

HSM Dataset Level Commands....


To recover a dataset issue the following command in ISPF option 6 to check for any backup listings

HLIST DSNAME ('YOUR.DATA.SET.NAME.HERE') BOTH

Which will produce the following listing

ARC0138I NO MCDS INFORMATION FOUND FOR DATASET,
ARC0138I (CONT.) YOUR.DATA.SET.NAME.HERE,
,
DSN= YOUR.DATA.SET.NAME.HERE BACK FREQ = *** MAX VERS=***
,
BDSN=HSM.BACK.T532800.YOUR.DATA.SET.NAME.HERE.J9315 BACKVOL=MR1190 FRVOL=TSO108
BACKDATE=09/01/08 BACKTIME=19:01:37 CAT=YES GEN=000 VER=001 UNS/RET= NO,
RACF IND =NO BACK PROF=NO,
,
ARC0140I LIST COMPLETED, 4 LINE(S) OF DATA OUTPUT,
***


If a BDSN dataset is available you can go for the recovery of that dataset with the following command.
If a BSDN dataset is not available you can manually backup the dataset using HBACKDS command.
HRECOVER ('YOUR.DATA.SET.NAME.HERE') GENERATION(0) REPLACE

Where the REPLACE option will overwrite the original dataset name

GENERATION specifies that you want to recover a particular backup version of a specific data set. For gennum, substitute the relative generation number of the backup version of the data set that you want to recover. Zero is the latest created backup version, one is the next to the latest created version, and so forth, up to the maximum number of versions existing for the data set.

HMIGRATE - migrate a data set
HRECALL - recall a migrated data set
HBACKDS - create a backup version of a data set
HBDELETE - delete backup version(s) of a data set
HRECOVER - recover a backup version of a data set
HDELETE - deletes a migrated data set
HLIST - lists HSM migration and backup control data set records
HQUERY - displays outstanding HSM requests



MCDS – Migration Control DataSets
BCDS – Backup Control DataSets
OCDS - Offline Control DataSets


Batch processing

Batch process for RECALL

//DEFEP10 EXEC PGM=IKJEFT01
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
HRECALL 'YOUR.MIGRATED.DATA.SET.NAME.HERE' NOWAIT
HRECALL 'YOUR.MIGRATED.DATA.SET.NAME.HERE' NOWAIT
HDELETE 'YOUR.MIGRATED.DATA.SET.NAME.HERE' PURGE
/*
//


Batch process for DELETE…… The DELETE will be converted to HDELETE here

//DEFEP10 EXEC PGM=IDCAMS
//SYSOUT DD SYSOUT=*
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
DELETE 'YOUR.MIGRATED.DATA.SET.NAME.HERE' PURGE
/*
//



WAIT specifies that you want to wait for the HRECALL command to complete. If you are recalling data sets from tape, we recommend that you specify the NOWAIT parameter because the operator must mount the tape before the recall can complete.

NOWAIT specifies that you do not want to wait for the HRECALL command to complete.

PURGE is an optional parameter you use if you want to delete a migrated data set while it is within its retention period.






LIST command


Use this command to find out information about backups or migrated files. It is easiest to use as a line command on ISPF option 3.4 as shown below. HLIST DSNAME(/) BOTHHLIST DSNAME(/) MCDSHLIST DSNAME(/) BCDS

HBACKDS Command
You use this command to manually backup a dataset. You may want to do this before you make changes. The 3.4 line command can simply beHBACK /

HRECOVER Command
You use this command to restore a data set from the backup. From ISPF option 3.4, this can simply be HRECOVER / REPLACE

HBDELETE Command
If you want to delete a lot of backups, you will want to batch them up and run them as a job. When you do this, DFHSM will issue all the commands at once and queue them up. If the queue is too large, DFHSM will abend! You can avoid this by using the WAIT parameter as shown below. HSM will then process each delete one at a time. HSEND WAIT BDELETE (filename1) HSEND WAIT BDELETE (filename2) HSEND WAIT BDELETE (filename3) HSEND WAIT BDELETE (filename4)

HMIGRATE Command
You use this command to manually migrate a data set. You may want to do this a 'quick fix' to resolve space problems. At its simplest, the 3.4 line command is HMIG DSNAME(/) or HMIG DSNAME(/) ML2

HDELETE Command
If you use the ISPF line command 'D' or ' DEL ' to delete migrated files, DFHSM will recall the file first, which is a waste of time and resource. If you use HDELETE, then DFHSM deletes a migrated data set without recalling the data The ISPF 3.4 line command is simply HDEL /

HRECALL Command
This command will bring a data set back to primary disk. You do not need to recall a file manually; DFHSM will recall it automatically if you try to use it. However, it can be a pain waiting for a lot of files that are archived to tape, you may want to recall them by command. You will also need t use the command if autorecall is having problems. DFHSM recall is a file by file operation, you cannot batch up requests and recall a lot of files at the same time like FDRABR. The ISPF 3.4 line command is simply HRECALL /

No comments:

Post a Comment