I needed to restore a product which had shipped files in ADRDSSU BACKUP format.
Before following the instructions and creating lots of files, I thought it would be useful to see what’s going to happen. You can do this by specifying
//S2 EXEC PGM=ADRDSSU,REGION=0M,PARM='TYPRUN=NORUN'
This shows you what will happen, but does not do any of the work.
My JCL was originally
//S1 EXEC PGM=AMATERSE,PARM=UNPACK
//SYSPRINT DD SYSOUT=*
//SYSUT1 DD DISP=SHR,DSN=COLIN.PROD.TRS
//SYSUT2 DD DSN=&&TEMP,SPACE=(CYL,(500,500)),DISP=(,PASS)
//*
//S2 EXEC PGM=ADRDSSU,REGION=0M,PARM='TYPRUN=NORUN'
//SYSPRINT DD SYSOUT=*
//DD1 DD DISP=SHR,DSN=*.S1.SYSUT2
//SYSIN DD *
RESTORE -
IMPORT -
INDDNAME(DD1) -
CANCELERROR -
DATASET(INCLUDE(**)) -
RENAMEU( -
(**.PRODANLC,COLIN.PRODANLC) -
(**.PRODANLE,COLIN.PRODANLE) -
...
The output had
ADR489I (001)-TDLOG(01), DATA SET COLIN.PRODANLC WAS SELECTED
ADR489I (001)-TDLOG(01), DATA SET COLIN.PRODANLE WAS SELECTED
This would create datasets like COLIN.PRODANLC which I did not want to use.
I wanted to include the version and release so I used
(**.PRODANLC,COLIN.PROD321.PRODANLC) -
(**.PRODANLE,COLIN.PROD321.PRODANLE) -
and my files came out COLIN.PROD321.PRODANLC etc.
This saved me a lot of time – having to delete many data sets with the wrong name.
Whoops – I should have defined a security profile.
When I restored from the backup, the output included
ADR755W (001)-PROTD(01), SOURCE DATA SET BETA.PROD.OUT.PRODANLC WAS GENERICALLY PROTECTED. THE TARGET DATA SET COLIN.PROD321.PRODANLC IS NOT PROTECTED BY ANY PROFILE
I defined a RACF profile
tso addsd 'COLIN.PROD321.**' uacc(NONE)
and when I retested it I did not get the ADR755W messages.
You should define the profile before you restore the files. If you do not, there is a small chance that someone could change the unprotected file. If you define the profile first – the file is protected from the moment it is created.