ALIAS (Alternative Name) keyword for physical and logical files

Use this field-level keyword to specify an alternative name for a field. When the program is compiled, the alternative name is brought into the program instead of the DDS field name.

The high-level language compiler in use determines if the ALIAS name is used. See the appropriate high-level language reference manual for information about ALIAS support for that language.

The format of the keyword is:
ALIAS(alternative-name)

The alternative name must be different from all other alternative names and from all DDS field names in the record format. If a duplicate is found, an error message appears on the field name or alternative name.

An alternative name cannot be used within DDS or any other i5/OS™ function (for example, as a key field name, as the field name specified for the REFFLD keyword, or as a field name used in the Copy File (CPYF) command).

When you refer to a field that has the ALIAS keyword, the ALIAS keyword is copied in unless the ALIAS keyword is explicitly specified on the referencing field.

Example

The following example shows how to specify the ALIAS keyword.

|...+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....8
00010A            FIELDA        25A         ALIAS(CUSTOMERNAME)
     A

In the example, the alternative name for FIELDA is CUSTOMERNAME.

Related information
Rules for DDS keywords and parameter values