IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Copying files with a qualifier to another qualifier


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
sampatir

New User


Joined: 12 May 2009
Posts: 13
Location: India

PostPosted: Tue Nov 30, 2010 5:51 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Tue Nov 30, 2010 6:08 pm
Reply with quote

DFdss
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1744
Location: Tirupur, India

PostPosted: Tue Nov 30, 2010 6:16 pm
Reply with quote

ibmmainframeforum.com/viewtopic.php?f=16&t=4406

has some more info
Back to top
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 592
Location: London

PostPosted: Tue Nov 30, 2010 6:34 pm
Reply with quote

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
View user's profile Send private message
sampatir

New User


Joined: 12 May 2009
Posts: 13
Location: India

PostPosted: Wed Dec 01, 2010 7:40 pm
Reply with quote

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
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8796
Location: Welsh Wales

PostPosted: Wed Dec 01, 2010 7:51 pm
Reply with quote

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
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 592
Location: London

PostPosted: Wed Dec 01, 2010 8:19 pm
Reply with quote

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
View user's profile Send private message
sampatir

New User


Joined: 12 May 2009
Posts: 13
Location: India

PostPosted: Thu Dec 02, 2010 6:45 pm
Reply with quote

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
View user's profile Send private message
Pete Wilson

Active Member


Joined: 31 Dec 2009
Posts: 592
Location: London

PostPosted: Fri Dec 03, 2010 12:01 am
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Fri Dec 03, 2010 1:56 am
Reply with quote

Hello,

If you don't have QW, suggest trying the free LookAt search provided by IBM:
www-03.ibm.com/systems/z/os/zos/bkserv/lookat/
Back to top
View user's profile Send private message
sampatir

New User


Joined: 12 May 2009
Posts: 13
Location: India

PostPosted: Fri Dec 03, 2010 12:54 pm
Reply with quote

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
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19243
Location: Inside the Matrix

PostPosted: Fri Dec 03, 2010 8:10 pm
Reply with quote

Good to hear it is working - thank you for letting us know icon_smile.gif

d
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts 3 files concatenated to 1 DFSORT/ICETOOL 2
No new posts JCL sort to compare dates in two file... DFSORT/ICETOOL 2
No new posts Compare 2 files and retrive records f... DFSORT/ICETOOL 3
No new posts Compare 2 files and write Matched/Unm... JCL & VSAM 8
No new posts Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top