Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
How to rename the first qualifier of a set of datasets?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
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    Post subject: How to rename the first qualifier of a set of datasets?
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: 8614
Location: Back in jolly old England

PostPosted: Thu Jun 14, 2007 12:22 am    Post subject:
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    Post subject: Re: How to rename the first qualifier of a set of datasets?
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    Post subject: Re: How to rename the first qualifier of a set of datasets?
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: 8614
Location: Back in jolly old England

PostPosted: Fri Jun 15, 2007 2:01 am    Post subject:
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    Post subject: Re: How to rename the first qualifier of a set of datasets?
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: 8614
Location: Back in jolly old England

PostPosted: Fri Jun 15, 2007 2:37 am    Post subject:
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

Site Director


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

PostPosted: Fri Jun 15, 2007 2:53 am    Post subject:
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    Post subject: Re: How to rename the first qualifier of a set of datasets?
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    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 REXX to get the all datasets name parasmalik20 CLIST & REXX 5 Tue Jul 18, 2017 9:10 pm
This topic is locked: you cannot edit posts or make replies. SDSF multiple spool datasets extracte... PJAlarcon CLIST & REXX 1 Fri Apr 21, 2017 10:50 pm
No new posts Edit large number of datasets (QSAM) zh_lad TSO/ISPF 3 Tue Apr 04, 2017 6:08 pm
No new posts DUMP DATASETS VS TRACE DATASETS! lind sh CICS 4 Tue Dec 06, 2016 11:31 pm
No new posts Error during restore rename archanamuthukrishnan All Other Mainframe Topics 2 Fri Oct 14, 2016 3:30 pm

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us