Version 8.1.4
 —  Utilities  —

CHANGE: Change Standard Length or Format of a Field

The CHANGE function can be used to change

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.

graphics/util_adadbs_change.png

This document covers the following topics:


Essential Parameters

FILE: File Containing the Field

The file in which the field whose length is to be changed is contained. An Adabas system file may not be specified.

FIELD: Field to be Changed

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 (').

FORMAT=P: New Field Format

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.

LENGTH: New Field Length

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.

OPTION=LA: New Field Option

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.

Top of page

Optional Parameters

NOUSERABEND: Termination Without Abend

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.

PASSWORD: File Password

The password of the file containing the field to be changed. This parameter is required if the file is password-protected.

TEST: Test Syntax

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.

Top of page

Example

The standard length of field AB in file 5 is to be changed to 11 bytes.

ADADBS CHANGE FILE=5,FIELD='AB',LENGTH=11

Top of page