ALIAS (Alternative Name) keyword in printer files

You 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 alternative name is used. Refer to 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 parameter must be different from all other alternative names and from all DDS field names in the record format. If a duplicate name is found, an error appears on the field name or alternative name.

An alternative name cannot be used within DDS or any other IBM® i 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 reference a field that has the ALIAS keyword, the ALIAS keyword is copied in unless the ALIAS keyword is explicitly specified on the referencing field.

Option indicators are not valid for this keyword.

Example

The following example shows how to specify the ALIAS keyword.

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

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