A data set can be VSAM (which in turn can be sequential, indexed, relative record, or linear), or sequential (PS), or partitioned (PO), or a LIBRARY (a newer partitioned), or direct access (DA). Depending on the age of the system you are using, indexed sequential (IS) could be possible (but not likely as it's been many years since IBM supported ISAM data sets).
And there might be tools on the market to redefine VSAM data sets on the fly -- but any such tool may potentially have to unload the data, delete and redefine the data set, then reload the data. It is possible, for variable length VSAM data sets, to use an ALTER to allow a longer length record but this will not work to make the record length shorter, nor does it do any good for fixed length record VSAM data sets. And the existing records will NOT have their record lengths increased -- only new records can have the longer lengths. And if you are wanting to change a KSDS index record length, ALTER cannot do that. The
Access Method Services for Catalogs manual in the DFSMS bookshelf, which has all the IDCAMS commands, has a lot of restrictions on changing RECORDSIZE with ALTER:
Restrictions: RECORDSIZE is used only if all the following are true:
The object whose entry is being altered is an alternate index, a cluster, a path, or a data component.
The object whose entry is being altered contains no data records.
The maximum RECORDSIZE in the object's catalog entry is the default. For defaults, see the DEFINE command for the object.
If NONUNIQUEKEY is used for an alternate index, the record length to be specified accounts for the increased record size; this results from the multiple prime key pointers in the alternate index data record.
Use a maximum record length of at least seven bytes less than the control interval size, unless the record is a spanned record.
Use a record length large enough to contain all prime and alternate keys previously defined.
If RECORDSIZE in the object's catalog entry is not the default, and ALTER RECORDSIZE specifies that same value, processing continues for any other parameters given in the command, and there is no error message.
Note a key restriction -- if there is a single data record, you cannot use ALTER and must unload the VSAM data set.
The general method, which works for everything, is to unload / delete / define / reload the VSAM data set.