View previous topic :: View next topic
|
Author |
Message |
sampatir
New User
Joined: 12 May 2009 Posts: 13 Location: India
|
|
|
|
Hi All,
I have come across a problem where I have to copy all the files with a specific qualifier to another qualifier. The files should include GDG generations. All the GDG bases are created with TO qualifier. I need to only copy the files.
Example: I have files with USERID.U1.** and I need to copy all these files to USERID.U2.**
I only need copies with the a different second qualifier.
What could be the best possible way. Your help is highly appreciated.
Thanks. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
DFdss |
|
Back to top |
|
|
vasanthz
Global Moderator
Joined: 28 Aug 2007 Posts: 1744 Location: Tirupur, India
|
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 592 Location: London
|
|
|
|
You MUST define all the target GDG base names before copying to the new target names.
Then...
//COPY EXEC PGM=ADRDSSU,REGION=128M
//SYSPRINT DD SYSOUT=*
//SYSIN DD *
SET PATCH 17 = FF /* WARN IF FILES ARE MIGRATED ADR380W */
PAR /* RUN TWO COPY TASKS CONCURRENTLY */
/* PROCESS NON_GDG FILES */
COPY ALLE TGTA(SRC) TGTGDS(ACTIVE) OPT(4) CAT SPHERE -
DS(FDD(FILT1)) -
RENAMEU(USERID.U1.** USERID.U2.**)
/* PROCESS GDG FILES */
COPY ALLE TGTA(SRC) TGTGDS(ACTIVE) OPT(4) CAT SPHERE -
DS(FDD(FILT2)) -
RENAMEU(USERID.U1.** USERID.U2.**)
/*
//FILT1 DD *
INC(USERID.U1.** ) -
EXC(USERID.U1(*) ) -
/*
//FILT2 DD *
INC(
USERID.U1.**(*) /* SELECT ALL GDG GENERATIONS */ -
) - |
|
Back to top |
|
|
sampatir
New User
Joined: 12 May 2009 Posts: 13 Location: India
|
|
|
|
Thank you so much for all responses. I have tries the JCL from Wilson and it worked out.
@ Wilson
1) I had to remove the OPT(4) as it is not recognized. Can you tell what this is for?
2) Even all the files are copied successfully, it has given me a RC=8. It looks same GDG generation file is copied in both the filters. Is that right?
I am going through the DFdss option. |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8796 Location: Welsh Wales
|
|
|
|
The reason for any non zero return code will be given in the output.
However, your observation that the GDS have been copied by both filters is correct. I believe that the correct definition should have been
Code: |
//FILT1 DD *
INC(USERID.U1.** ) -
EXC(USERID.U1.**(*) ) -
/* |
|
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 592 Location: London
|
|
|
|
OPT(4) is short for OPTIMISE(4) which says to process 1 cylinder of data at a time. It doesn't look like it is valid for COPY anymore, only DUMP, but at ZoS1.10 it just seems to ignore it on my COPY.
The FILT1 was wrong as you say expat - I was in a hurry! It should include all matches to USERID.U1.** but then excludes USERID1.**(*) which is all generations of all GDG's, as intended. The first COPY does the non-GDG's based on FILT1 which should actually be like this:
INC(USERID.U1.** ) -
EXC(USERID.U1.**(*) ) -
Then FILT2 used by the 2nd COPY selects just the GDG's by virtue of including USERID1.**(*) to select all generations of GDG's (the asterisk in brackets signifies this).
The RC=08 could be because I missed a continutaion on the FILT2 which should be:
INC( -
USERID.U1.**(*) /* SELECT ALL GDG GENERATIONS */ -
) -
RC=08 could also be for many other reasons - look for ADRnnnE messages (nnn = a number) in the output.
Did you define the target GDG bases before doing the copy? |
|
Back to top |
|
|
sampatir
New User
Joined: 12 May 2009 Posts: 13 Location: India
|
|
|
|
Yes. I have created all the target GDG bases beforehand.
I have corrected the syntax in sysin. RC is not due to that one. Also I had to remove all the comment lines as well.
As Expat pointed, The RC=08 is due to duplicate entry in catalogue as it was trying to create it scond time.
Thanks. |
|
Back to top |
|
|
Pete Wilson
Active Member
Joined: 31 Dec 2009 Posts: 592 Location: London
|
|
|
|
Sampatir - you should discover if the place you work has Quickref. If it does you can just enter QW msgid, e.g. QW ADR013I as a TSO command and you'll get an explanation for the message. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
Back to top |
|
|
sampatir
New User
Joined: 12 May 2009 Posts: 13 Location: India
|
|
|
|
thanks. QW license was expired few days back in our system and we are using LookAt now.
Below are the error message - As we thought dupicate catologue entries with earlier FLT1 :
IGD17100I - UNEXPECTED CATALOG ERROR FOR DATA SET
0ADR709E - AN ERROR OCCURRED IN THE STORAGE MANAGEMENT SUBSYSTEM
Even it gave this error, It solves the pupose.
After modifying the FLT1 to :
INC(USERID.U1.** ) -
EXC(USERID.U1.**(*) ) -
It is working perfectly with out any errors.
Thanks again for your help. Using this PGM=ADRDSSU is new to me. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
|
|
|
|
Good to hear it is working - thank you for letting us know
d |
|
Back to top |
|
|
|