View previous topic :: View next topic
|
Author |
Message |
rajrohith
New User
Joined: 15 Apr 2005 Posts: 54 Location: chennai
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
You should have doubt, what you are asking is not possible. |
|
Back to top |
|
|
rajrohith
New User
Joined: 15 Apr 2005 Posts: 54 Location: chennai
|
|
|
|
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 |
|
|
William Thompson
Global Moderator
Joined: 18 Nov 2006 Posts: 3156 Location: Tucson AZ
|
|
|
|
William Thompson wrote: |
You should have doubt, what you are asking is not possible. |
Oh, my bad
A little research with the fine manual proved me wrong
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 |
|
|
|