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
 

 

Copying files with a qualifier to another qualifier

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: Copying files with a qualifier to another qualifier
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: 8593
Location: Back in jolly old England

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

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

Global Moderator


Joined: 28 Aug 2007
Posts: 1445
Location: Azeroth

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

http://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 User


Joined: 31 Dec 2009
Posts: 437
Location: London

PostPosted: Tue Nov 30, 2010 6:34 pm    Post subject:
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    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Dec 01, 2010 7:51 pm    Post subject:
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 User


Joined: 31 Dec 2009
Posts: 437
Location: London

PostPosted: Wed Dec 01, 2010 8:19 pm    Post subject:
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    Post subject:
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 User


Joined: 31 Dec 2009
Posts: 437
Location: London

PostPosted: Fri Dec 03, 2010 12:01 am    Post subject:
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

Site Director


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

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

Hello,

If you don't have QW, suggest trying the free LookAt search provided by IBM:
http://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    Post subject:
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

Site Director


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

PostPosted: Fri Dec 03, 2010 8:10 pm    Post subject: Reply to: Copying files with a qualifier to another qualifie
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    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 High CPU consumption Job using IAM fi... aswinir JCL & VSAM 8 Thu Dec 01, 2016 8:28 pm
No new posts Match or compare two files in VB Format anatol DFSORT/ICETOOL 14 Thu Nov 03, 2016 7:41 pm
This topic is locked: you cannot edit posts or make replies. How to use 2 input files in control c... Gunapala CN DFSORT/ICETOOL 23 Thu Oct 13, 2016 3:42 pm
No new posts Adding records from two files into on... shiitiizz SYNCSORT 4 Mon Sep 19, 2016 8:41 pm
No new posts Icetool or Joinkeys example to compar... ishant chauhan DFSORT/ICETOOL 21 Sat Aug 20, 2016 2:40 am


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