The CHANGE function can be used to change
the standard length of an Adabas field;
a normal alphanumeric (A) field to a long-alpha (LA) field; or
the default field format from unpacked (U) to packed (P).
Only one of these changes may be performed per function execution.
No modifications to records in Data Storage are made by this function. The user is, therefore, responsible for preventing references to the field that would cause invalid results because of an inconsistency between the new standard length as defined to Adabas and the actual number of bytes contained in the record.
When changing the length of an Adabas expanded file field, the change must be made to each individual component file of the expanded file. Each CHANGE operation on a component file causes a message that confirms the change, and returns condition code 4.
This document covers the following topics:
The file in which the field whose length is to be changed is contained. An Adabas system file may not be specified.
The field whose standard length is to be changed. The field cannot be one that was defined with the FI option, or a field with a defined length of zero (variable-length field). Specify the field name between apostrophes (').
The new standard field format. The only field format change supported is from 'U' (unpacked) to 'P' (packed). The field cannot be parent of a sub-/super-/hyperdescriptor.
One of the parameters FORMAT, LENGTH, or OPTION must be specified; but only one of the three may be specified.
The new standard length for the field. A length of 0 is not permitted, nor can a field with an existing defined length of zero (such as a variable-length field) be redefined to a standard length.
One of the parameters FORMAT, LENGTH, or OPTION must be specified; but only one of the three may be specified.
The new field option. The only field option change supported is from normal alphanumeric (A) to long-alpha (LA).
One of the parameters FORMAT, LENGTH, or OPTION must be specified; but only one of the three may be specified.
When an error is encountered while the function is running, the utility prints an error message and terminates with user abend 34 (with a dump) or user abend 35 (without a dump).
If NOUSERABEND is specified, the utility will not abend after printing the error message. Instead, the message "utility TERMINATED DUE TO ERROR CONDITION" is displayed and the utility terminates with condition code 20.
The password of the file containing the field to be changed. This parameter is required if the file is password-protected.
The TEST parameter tests the operation syntax without actually performing the operation. Only the syntax of the specified parameters can be tested; not the validity of values and variables. See Syntax Checking with the TEST Parameter for more information on using the TEST parameter in ADADBS functions.
The standard length of field AB in file 5 is to be changed to 11 bytes.
ADADBS CHANGE FILE=5,FIELD='AB',LENGTH=11