RENAME FIELD command
- File manager
- Changes the name of a field
RENAME FIELD old-fieldname, new-fieldname
Where: old-fieldname and new-fieldname are field names (1 to 255 characters). When the command is executed, the new fieldname becomes the new name of the field.
The comma is required.
RENAME FIELD SOCIAL SECURITY, SSN
The RENAME FIELD command changes the name of a field. The command is rejected if the old field name does not exist or if the new field name cannot be added to the file, either because it already exists or because there is not enough space. RENAME FIELD can be used to rename Ordered Index fields, as well as ORDERED INVISIBLE fields.
When it processes RENAME FIELD, Model 204 ends any update unit in progress and begins a non-backoutable update unit.
Restrictions on renaming:
- The RENAME FIELD command is prohibited for the DTSFN field in a file when the FOPT=X'10' is set. Attempting to do so results in the following message:
M204.2727: CANT DELETE DTS FIELD WHEN FOPT=X'10' IS ON
- Renaming of OI chunk and OI chunk target fields is not allowed.