You are here: Home > Knowledge Refreshers

KR editions 83 to 84


KR-83 (Recovering deleted files)

This is something similar to what we've already seen using HSM (recovering deleted files)

Contributed by Elan.

  • In Mainframe MVS takes backup of most of the files/datasets. Also it keeps backup of many previous versions at any point of time. We can recover any deleted dataset as well as previous versions if MVS has taken a backup of that. 
  • To find out how many versions of a dataset are available in backup please write the following command on your =6 panel and hit enter:
    HLIST BCDS DSN ('Dataset Name'). 
    This will tell you the list of backups. You will see that with every back up it has a backup date and a GEN no associated. 
  • So lets say you made a change today (04/10/02) in your PDS. So SMS will take a back up by tomorrow. Now 2 months down the line if you want to recover the PDS without today’s change, then from the list you will have to see the backup date which is less than (05/10/02) and note down the corresponding GEN no. Lets say you found it to be GEN(005). 
  • So to recover that File or PDS, write following command on =6 panel and hit enter 
    HRECOVER 'Original Dataset Name' GEN(005) NEWNAME. 
    It will ask you for a new name. Write the name there and hit enter. MVS will recover that version with this name. 
  • Note: In case you just want to recover a deleted dataset simply write 
    HRECOVER 'Original Dataset Name' 
    If MVS has that backup it will recover that with same name, i.e. the latest version.

Note: Backup frequency depends on the management class (our earlier KRs covered this topic).


KR-84 (Info on dummies!)

We'll take a look at the dummy file in this edition to wrap up the week.....

  • Did you know that 
    //ddname DD DUMMY
    is the same as
    //ddname DD DSN=NULLFILE,DISP=SHR 
  • You can even code other parameters like space or unit allocation but MVS will ignore those parameters. 
  • Why should we use dummies? 
  • Reading from a dummy file is an error but if a code attempts to write to a dummy file it would just be ignored (not an error). 
  • Sometimes dummy files are coded in the PROC. The JCL calling the PROC will override them with a valid DSN (for example: in some instances we may not want the output to be stored in a dataset while in some instances we may want to save the output to a dataset). 
  • Did you know what the * after DD means? Ex:
    //SYSIN DD * 
    This tells the system that the data for this ddname (in our case SYSIN) immediately follows in the next statement (in other words we tell the system that instead of using a dataset for getting the input, you have to take the input from the next statement onwards).

Food for thougt: Ever wondered how a corporation is run? Why stocks? Why a corporation worries about stockholders as much as (or even more than it worries) about employees?


Go back to the main contents page