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

How to rename the first qualifier of a set of datasets?


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

New User


Joined: 03 Mar 2007
Posts: 10
Location: US

PostPosted: Thu Jun 14, 2007 12:17 am
Reply with quote

Hi,

Would anyone please let me know how to rename a set of datasets having the first qualifier xxxx.* to yyyy.*. The dataset include flat files and PDS.

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

Global Moderator


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

PostPosted: Thu Jun 14, 2007 12:22 am
Reply with quote

IDCAMS ALTER
Back to top
View user's profile Send private message
Geethi

New User


Joined: 03 Mar 2007
Posts: 10
Location: US

PostPosted: Thu Jun 14, 2007 10:34 pm
Reply with quote

But if i use generic character in IDCAMS ALTER NEWNAME, it would replace only one qualifier; not all the qualifiers that follow the HLQ, isn't it?. In my case, the number of qualifiers varies. Please let me know how I can do this ?

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

New User


Joined: 03 Mar 2007
Posts: 10
Location: US

PostPosted: Fri Jun 15, 2007 1:51 am
Reply with quote

I need to change the HLQs of the following DSNs

xxx.NEW.DATA
xxx.OLD
xxx.NEW.OLD.MATCH

to

yyy.NEW.DATA
yyy.OLD
yyy.NEW.OLD.MATCH

Please let me know if I could make the issue more clear.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Jun 15, 2007 2:01 am
Reply with quote

ALTER 'old dataset name' NEWNAME('new dataset name')

But first you must get a listing of every dataset which has that HLQ, and then build the ALTER commands for each and every dataset that exists with that HLQ.
Back to top
View user's profile Send private message
Geethi

New User


Joined: 03 Mar 2007
Posts: 10
Location: US

PostPosted: Fri Jun 15, 2007 2:10 am
Reply with quote

I have 1000+ datasets to rename. To build an ALTER command for each and every dataset is very time comsuming. Is there a better way ?
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Fri Jun 15, 2007 2:37 am
Reply with quote

You can use REXX, DFSORT, EASYTRIEVE, COBOL, ad infinitum .......... to build the ALTER cards for you.
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


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

PostPosted: Fri Jun 15, 2007 2:53 am
Reply with quote

Hello,

FWIW - even if you could build the ALTER statements quickly, i'd suggest you not do so - too much chance for error.

If you write a bit of code and test it well, you will eliminate those errors.

Additionally, once you have this coded and running, you put it on the shelf and if you ever need to do something similar, you have most of the work already done icon_smile.gif
Back to top
View user's profile Send private message
Geethi

New User


Joined: 03 Mar 2007
Posts: 10
Location: US

PostPosted: Fri Jun 15, 2007 3:14 am
Reply with quote

I am unable to spend much time to code a program to rename the HLQs. Would you please provide me with the syntax of DFSORT/EASYRETRIEVE ?

Thanks,
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 Using the Jobname parameter in a Qual... ABENDS & Debugging 1
No new posts ISRSUPC search utility - using high l... TSO/ISPF 2
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
No new posts PL/I, VB Datasets and the RDW PL/I & Assembler 4
No new posts how to get list of all VSAM/non-VSAM ... JCL & VSAM 13
Search our Forums:

Back to Top