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

can we change a key in vsam


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

New User


Joined: 15 Apr 2005
Posts: 54
Location: chennai

PostPosted: Mon Dec 25, 2006 10:31 pm
Reply with quote

hi
i have doubt that can we change a key in vsam file
can we change a key by alter command?

by
raj
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Dec 25, 2006 10:37 pm
Reply with quote

You should have doubt, what you are asking is not possible.
Back to top
View user's profile Send private message
rajrohith

New User


Joined: 15 Apr 2005
Posts: 54
Location: chennai

PostPosted: Mon Dec 25, 2006 10:45 pm
Reply with quote

i know not possible to change a key
but some peoples saying we can change a key by alter command
isit possible
by
raj
Back to top
View user's profile Send private message
William Thompson

Global Moderator


Joined: 18 Nov 2006
Posts: 3156
Location: Tucson AZ

PostPosted: Mon Dec 25, 2006 11:55 pm
Reply with quote

William Thompson wrote:
You should have doubt, what you are asking is not possible.
Oh, my bad icon_redface.gif
A little research with the fine manual proved me wrong icon_redface.gif
Quote:
3.2.2 ALTER Parameters
3.2.2.2 Optional Parameters
KEYS(length offset)
specifies the length and offset of the object's key. If the entry being altered defines an alternate index, offset applies to the alternate key in the data records in the base cluster.

Restrictions: KEYS can be specified only if all the following are true:

The object whose entry is being altered is an alternate index, a path, a key-sequenced cluster, or a data component of a key-sequenced cluster or alternate index.
The object whose entry is being altered contains no data records.
The values for KEYS in the object's catalog entry are default values. For default values, see the DEFINE command that defines the object.

If the values for KEYS in the object's catalog entry are not default values, and ALTER KEYS specifies the same nondefault values, processing continues for any other parameters specified on the command, and no error message is issued.
The new values for KEYS do not conflict with the control interval size specified when the object was defined.
The key fits within the record whose length is specified by the RECORDSIZE parameter.
The key fits in the first record segment of a spanned record.
Not real useful with the restrictions and seems unuseable against an established dataset, but, yes Virginia, keys can be altered.
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 Access to non cataloged VSAM file JCL & VSAM 18
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
No new posts 3270 personal communications. Can't c... TSO/ISPF 2
No new posts CVDA value for RRDS VSAM dataset. CICS 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
Search our Forums:

Back to Top