ALTER Command - IBM Mainframe

This command is used to change the attributes of an existing VSAM data set. It is important to note that not all attributes can be changed with ALTER. For example, you cannot alter the record length of a VSAM data set if it already contains records, or change the key length or offset for a KSDS if it already has records, etc. In such cases, the only alternative is to back up the data, delete-define the VSAM file and reload the data. A few examples of ALTER command are given below. A complete list of parameters that can be changed can be found by referring to an IBM manual.

Adding Candidate Volumes

If the disk pack containing the VSAM data set runs out of space, you can add another volume owned by the same VSAM catalog by executing the following command.

Adding Candidate Volumes

Altering Free Space

The following command will alter the free space to (25, 25). Note that FREESPACE parameter of this command requires the name of the data component and not the cluster name

Altering Free Space

Write Protect a Data Set

In case you would like to temporarily prevent updates to a VSAM data set you can use the following command

Write Protect a Data Set

The write-protect can be disabled by using UNINHIBIT in place of INHIBIT

Changing an Entry Name

This command would you rename a VSAM or non-VSAM file. Since a VSAM cluster consists of a data and index component, individual name changes must also be considered. For example,

Changing an Entry Name


All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

IBM Mainframe Topics