Tuesday, December 6, 2011

Restoring deleted TAPE dataset

1. Assuming you know the tape volume(s) your dataset *was* catalogued on, you should be able to use the IDCAMS command DEFINE NONVSAM to recatalog your dataset: 
The DEFINE NONVSAM command defines a catalog entry for non-VSAM data sets or a collection of objects. The syntax of this command is:

+------------------------------------------------------------------------+
¦ DEFINE ¦ NONVSAM ¦
+-----------+------------------------------------------------------------¦
¦ ¦ (NAME(entryname) ¦
+-----------+------------------------------------------------------------¦
¦ ¦ DEVICETYPES(devtype[ devtype...]) ¦
+-----------+------------------------------------------------------------¦
¦ ¦ VOLUMES(volser[ volser...]) ¦
+-----------+------------------------------------------------------------¦
¦ ¦ [COLLECTION] ¦
+-----------+------------------------------------------------------------¦
¦ ¦ [FILESEQUENCENUMBERS(number[ number...])] ¦
+-----------+------------------------------------------------------------¦
¦ ¦ [OWNER(ownerid)] ¦
+-----------+------------------------------------------------------------¦
¦ ¦ [RECATALOG|NORECATALOG] ¦
+-----------+------------------------------------------------------------¦
¦ ¦ [TO(date)|FOR(days)]) ¦
+-----------+------------------------------------------------------------¦
¦ ¦ [CATALOG(catname)] ¦
+-----------+------------------------------------------------------------¦
¦ ¦ ¦
+------------------------------------------------------------------------+

eg) 
DEFINE NONVSAM                          - 
(NAME(aaa.bbb.ccc.ddd.eee)              - 
DEVICETYPE(TAPE)                       - 
VOLUME(F01058)                         -
NORECATALOG)

2. Another approach might be your tape management system. These system retain the data set name, and it should be possible to obtain the volume from the data set name. You will probably need help from the tape library or the systems programmers. 

3. You (or, more probably, your operator) can use the TLB function of DITTO to get the listing of all the datasets on a tape. If all you want to do is retrieve the data from this dataset, you can process it as an uncatalogued dataset. 

//INPUT DD DSN=VMP.TESTS.BKUP.DRUG.GTBTEMP.G0025V00,
//     DISP=(SHR,PASS),            
//     UNIT=TAPE,                 
//     LABEL=(1,SL,,EXPDT=98000),  
//     VOL=SER=F01058   

Note that the UNIT must specify the correct generic for tapes, and the label must specify the correct position of the dataset (if it is the third on the tape, use LABEL=(3,SL... ). 

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.