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

Can we rename vsam dataset


IBM Mainframe Forums -> JCL & VSAM
Post new topic   This topic is locked: you cannot edit posts or make replies.
View previous topic :: View next topic  
Author Message
vijayakumar subramani

New User


Joined: 07 Aug 2008
Posts: 13
Location: Chennai

PostPosted: Tue Oct 28, 2008 4:34 pm
Reply with quote

Are there anyone help me to rename vsam dataset.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Oct 28, 2008 4:49 pm
Reply with quote

YEs, IDCAMS ALTER command
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8696
Location: Dubuque, Iowa, USA

PostPosted: Tue Oct 28, 2008 4:51 pm
Reply with quote

IDCAMS ALTER command can rename a VSAM dataset. However, you need to review the manual because there are restrictions (e.g., changing the high-level-qualifier may cause the dataset to be unusable without a JOBCAT or STEPCAT). Look at the manuals link, VSAM Services for DFSMS manual.
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 290
Location: Basel, Switzerland

PostPosted: Tue Oct 28, 2008 4:54 pm
Reply with quote

Hy,

just take care,
any vsam file consists of
1. the base antry
2. the data part
3. and optional an index part (ksds)
and i do not mention aix and path...

if you ALTER the base, the data part is not changed automatically
you also have to ALTER all associated names also or they keep asis

martin9
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10872
Location: italy

PostPosted: Tue Oct 28, 2008 5:22 pm
Reply with quote

it can be done, but unless You have a very strong doctor prescription to do it
it would be better to avoid it...

what about data/index components alternate indexes, paths ???

the best "safety" play is to create a new dataset according to the new specs
and rebuild everything

at "bridge" a safety play is to lose voluntarily one trick in order to avoid losing more

in this case it might take a bit longer, but You will not foul up anything
going the rename road if You foul up, then... YOU are fouled up icon_biggrin.gif
Back to top
View user's profile Send private message
vijayakumar subramani

New User


Joined: 07 Aug 2008
Posts: 13
Location: Chennai

PostPosted: Tue Oct 28, 2008 5:57 pm
Reply with quote

I am new into this,could you please send the manuals link VSAM Services for DFSMS manual
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Tue Oct 28, 2008 5:59 pm
Reply with quote

z/OS V1R7.0 DFSMS Access Method Services for Catalogs.
Back to top
View user's profile Send private message
Afroz_Alam

New User


Joined: 28 Oct 2008
Posts: 2
Location: Chennai

PostPosted: Tue Oct 28, 2008 6:13 pm
Reply with quote

Hi All,

Below is the way where you can rename the VSAM dataset.

Usually we need to go for File-aid, INSYNC (Similar to Fileaid), IDCAMS (Batch jcl) to rename the VSAM dataset................



Here's a quick & easy way to rename the VSAM datasets and components in ISPF without having to retype all or part of the new name. It will be very useful if

We have multiple datasets to rename.
We don’t have the third party tools (like File-aid, etc)


Let’s see how to do that:


1) Display the datasets you need to rename using option 3.4 or DSLIST.

2) Enter SHOWCMD ON in the command line. This will allow you to modify commands entered on the Dataset List panel before they're executed. (Basically SHOWCMD ON will expand all the ISPF commands. SHOWCMD OFF will stop the ISPF commands to expand)

3) Tab down to the line with the dataset you want to rename, type the following and press Enter:

ALTER / NEWNM(/)
Example:

SYSF T - Data Sets Matching XXXX.XXXX.VSAM Row 1 of 3

Command ===> Scroll ===> CSR



Command - Enter "/" to select action Message Volume

-------------------------------------------------------------------------------

ALTER / NEWNM(/) XX.VSAM.TEST *VSAM*

XXXX.XXXX.VSAM.TEST.DATA XXXX

XXXX.XXXX.VSAM.TEST.INDEX XXXX

***************************** End of Data Set list ****************************



You'll be typing over part of the DSN, but don't worry about that; it will still work… J



4) When the expanded command is displayed, overtype the new dataset name in the NEWNM parameter field with your changes, and press Enter to execute the ALTER command.



Example: Below the panel will open after the execution of "ALTER / NEWNM(/)" :



SYSF Data Set List Utility

Command ===>



Data Set Name. : XXXX.XXXX.VSAM.TEST



Command before expansion:

ALTER / NEWNM(/)



Command after expansion:

===> ALTER 'XXXX.XXXX.VSAM.TEST' NEWNM('XXXX.XXXX.VSAM.TEST')


The expanded command field shown above can be modified, but the data set name field may not be changed for built-in commands.

Press ENTER key to process the command.

Enter END command to return without processing the command.

5) Repeat the command for the remaining datasets (if it contains DATA & INDEX components) using the '=' command.

This trick can be used to perform other similar tasks...like renaming the PS, PDS, GDG's etc.

NOTE - Remember, each component of a VSAM Cluster (DATA, INDEX, etc.) must be renamed individually. And always give SHOWCMD ON before renaming the dataset. After that, give SHOWCMD OFF to switch off this service.
Back to top
View user's profile Send private message
vijayakumar subramani

New User


Joined: 07 Aug 2008
Posts: 13
Location: Chennai

PostPosted: Tue Oct 28, 2008 7:38 pm
Reply with quote

This helps me a lot Afroz.Thank you
Back to top
View user's profile Send private message
martin9

Active User


Joined: 01 Mar 2006
Posts: 290
Location: Basel, Switzerland

PostPosted: Tue Oct 28, 2008 8:51 pm
Reply with quote

Hy folks,

just think: File-Aid is a fine utility, but developped by second party.
therefore it is not sure, if all forum members will understand this...

just use IDCAMS, this is the standard ibm utility for file maintenance.
if you are able to use IDCAMS, you will have a big advantage.
therefore you will independent for further assistance and you may help yourself...

martin9 icon_biggrin.gif
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Tue Oct 28, 2008 10:26 pm
Reply with quote

martin9 wrote:
just use IDCAMS, this is the standard ibm utility for file maintenance.
if you are able to use IDCAMS, you will have a big advantage.
therefore you will independent for further assistance and you may help yourself...

Something that I have said in the past too. If you rely on third party products and change your job to where they are not installed you may end up looking pretty stupid.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Access to non cataloged VSAM file JCL & VSAM 18
No new posts FINDREP - Only first record from give... DFSORT/ICETOOL 3
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Allocated cylinders of a dataset DB2 12
No new posts Sort First/last record of a subset th... DFSORT/ICETOOL 7
Search our Forums:

Back to Top