Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

ADRDSSU Restore - How to prevent replacing while restore

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Lipi.Prasannan

New User


Joined: 01 Oct 2015
Posts: 10
Location: US

PostPosted: Fri Oct 02, 2015 12:13 am    Post subject: ADRDSSU Restore - How to prevent replacing while restore
Reply with quote

Hello everyone,

Request your expert advise on below -

I am using ADRDSSU to dump a set of PDS and transmitting the dumped file to another Mainframe region and there I am restoring the dataset to get all the dumped PDSs. Below is the code for restore -

//JS010 EXEC PGM=ADRDSSU,
// REGION=0M
//SYSPRINT DD SYSOUT=*
//RESTORE DD DSN=HLQ.COMPRESS.DATASET,
// DISP=SHR,
// UNIT=SYSDA
//OUTVOL1 DD DISP=SHR,
// UNIT=SYSDA,
// VOL=REF=*.RESTORE
//SYSIN DD *
RESTORE DATASET(INCLUDE(HLQ.COPY1.D.ADC1 -
HLQ.COPY2.D.EDEV -
HLQ.COPY3.D.PDEV)) -
INDD(RESTORE) TOL(ENQF) -
OUTDDNAME( -
OUTVOL1 -
) -
REPLACE -
SPHERE -
SHARE
//*

Each time the job run, the dataset(PDS) restored can be any one of the three HLQ.**.D.**.
Requirement - If the PDS is already present, I want the members in restored PDS to be appended to existing same PDS.
Eg: Dataset HLQ.COMPRESS.DATASET has PDS HLQ.COPY1.D.ADC1 dumped in it and this PDS has Member 1, Member 2.
The PDS HLQ.COPY1.D.ADC1 is already catalogued and present with Member4, Member 5. When I execute this restore I want all members (Member1, Member2, Mender4, Member5) to be present in PDS. When I tested above becuase of the REPLACE the PDS is getting replaced, I am missing Member 4, Member5 which was already present.

Can anyone please help me with this.
Please let me know if you need any more information.

Thanks!
Back to top
View user's profile Send private message

enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Fri Oct 02, 2015 12:24 am    Post subject: Reply to: ADRDSSU Restore - How to prevent replacing while restore
Reply with quote

Quote:
If the PDS is already present, I want the members in restored PDS to be appended to existing same PDS.

Unfortunately what You ask for is IMPOSSIBLE to achieve
ADRDSSU works at the dataset level, knows nothing about its content.
Back to top
View user's profile Send private message
Lipi.Prasannan

New User


Joined: 01 Oct 2015
Posts: 10
Location: US

PostPosted: Fri Oct 02, 2015 12:29 am    Post subject: Reply to: ADRDSSU Restore - How to prevent replacing while restore
Reply with quote

Thanks enrico for your quick response.
Back to top
View user's profile Send private message
Willy Jensen

New User


Joined: 01 Sep 2015
Posts: 94
Location: Switzerland

PostPosted: Fri Oct 02, 2015 11:57 pm    Post subject:
Reply with quote

However as you are copying just a couple of discrete pds, it would not be too much of an effort to do something like this:
1. restore to another name using the RENAMEUNC(hlq) operand
2. allocate pds if not present:
//C1 EXEC IDCAMS
//SYSPRINT DD DUMMY
LISTCAT ENT(target.dataset.name)
// IF C1.RC NE 0 THEN
//C2 EXEC PGM=IEFBR14
//DD1 allocate target.dataset.name
//ENDIF
3. copy noreplace
//C3 EXEC PGM=IEBCOPY
//SYSPRINT DD SYSOUT=*
//ID DD DSN=restored.dataset.name
//OD DD DSN=target.dataset.name
COPY IN=ID,OUT=OD I am a little hazy about the syntax here

With no replacee option existing members are preserved.
Back to top
View user's profile Send private message
Lipi.Prasannan

New User


Joined: 01 Oct 2015
Posts: 10
Location: US

PostPosted: Sat Oct 03, 2015 12:15 am    Post subject: Reply to: ADRDSSU Restore - How to prevent replacing while restore
Reply with quote

Thanks Willy for your response.
Problem with my requirement is HLQ.COPY1.D.ADC1 is actually like this HLQ.**.D.ADC1 and can be any of 100s of PDS. So the allocation and copy process will not be possible. I was looking for any wild card copy functionality so that I can copy the restored PDS to a bkup PDS which will not be replace but appended.

Appreciate any comments/suggestions.

Thanks!
Back to top
View user's profile Send private message
Rohit Umarjikar

Senior Member


Joined: 21 Sep 2010
Posts: 1609
Location: NY,USA

PostPosted: Sat Oct 03, 2015 12:41 am    Post subject:
Reply with quote

LP,
Why don't you use a temporary dataset and then concatenate both (old and temp) to get what you need. Just another step. If I understood you correctly.
Back to top
View user's profile Send private message
Lipi.Prasannan

New User


Joined: 01 Oct 2015
Posts: 10
Location: US

PostPosted: Sat Oct 03, 2015 2:39 am    Post subject:
Reply with quote

Thanks Rohit for your comment. I dont think concatenation will work for my requirement as I am not sure which PDS needs to be copied.
Back to top
View user's profile Send private message
Lipi.Prasannan

New User


Joined: 01 Oct 2015
Posts: 10
Location: US

PostPosted: Sat Oct 03, 2015 2:57 am    Post subject:
Reply with quote

Can anyone please help me with syntax for using COPY RENAME with ADRDSSU?
Back to top
View user's profile Send private message
enrico-sorichetti

Global Moderator


Joined: 14 Mar 2007
Posts: 10202
Location: italy

PostPosted: Sat Oct 03, 2015 3:15 am    Post subject: Reply to: ADRDSSU Restore - How to prevent replacing while restore
Reply with quote

why not search the forum or better look at the manual Yourself ? icon_evil.gif
Back to top
View user's profile Send private message
Lipi.Prasannan

New User


Joined: 01 Oct 2015
Posts: 10
Location: US

PostPosted: Sat Oct 03, 2015 3:20 am    Post subject:
Reply with quote

Thanks enrico, sorry for asking. icon_neutral.gif
I had few try's as per manuals and other posts, it did not work, so thought it will be great to get any new suggestions.
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 7905
Location: Bellevue, IA

PostPosted: Sat Oct 03, 2015 3:46 am    Post subject:
Reply with quote

I'm looking at the z/OS 1.13 manual and RENAME is not listed as a COPY option -- only RENAMEUNCONDITIONAL. RESTORE has a RENAME option, but not COPY.
Back to top
View user's profile Send private message
Lipi.Prasannan

New User


Joined: 01 Oct 2015
Posts: 10
Location: US

PostPosted: Mon Oct 05, 2015 8:46 am    Post subject:
Reply with quote

Thanks RObert for your response, am checking on other options. I don't thing ADRDSSU will work for my requirement.
Thanks all for reviewing my query and providing valuable comments.
Back to top
View user's profile Send private message
Willy Jensen

New User


Joined: 01 Sep 2015
Posts: 94
Location: Switzerland

PostPosted: Wed Oct 07, 2015 12:02 am    Post subject:
Reply with quote

RENAMEUNC works fine for COPY. As I remember RESTORE ... RENAME (I always use RENAMEUNC) then the rename is only done if the dataset already exists - which of course it does for a COPY.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm
No new posts Replacing Start Transid with LINK pkmurali CICS 12 Tue Apr 19, 2016 8:22 pm
No new posts Prevent rounding of COMP-2 when displ... sijayapal COBOL Programming 5 Wed Apr 08, 2015 10:07 pm
No new posts Matching and replacing JOIN KEYS for ... JAYACHANDRAN THAMPY SYNCSORT 17 Mon Feb 16, 2015 5:03 am
No new posts Replacing GO TO Statements hailashwin COBOL Programming 3 Tue Dec 02, 2014 5:28 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us