DD_ALIAS

Retrieve alias information

WSupported on Windows
USupported on Unix
VSupported on OpenVMS
NSupported in Synergy .NET
xcall DD_ALIAS(dcs, DDA_INFO, name, a_info)

or

xcall DD_ALIAS(dcs, DDA_SLIST, names_req, array, [array2], [start][, #names])

dcs

The repository control structure.

DDA_INFO

Returns general alias information and sets the current alias.

name

The unique alias name. (a30)

a_info

Returned with the alias data. See the a_info record definition in the ddinfo.def file.

DDA_SLIST

Returns the current alias structure’s alias and aliased field names in sequence order.

names_req

The number of alias names requested. (d3)

array

Returned with the array of alias field names. ((*)a30)

array2

(optional) Returned with the array of aliased field names. ((*)a30)

start

(optional) Contains the alias field name at which to start. (a30)

#names

(optional) Returned with the number of alias field names. (d3)

The DD_ALIAS subroutine returns information about aliases. There are two ways to call DD_ALIAS:

DDA_INFO

If you pass DDA_INFO, the DD_ALIAS subroutine reads the specified alias. If that alias is not found, the relevant error code is returned in the control structure. If the alias is found, information about the alias is recorded in the control structure, and general information is returned in a_info.

Once you set a current alias with the DDA_INFO function, the DDA_SLIST function becomes valid.

DDA_SLIST

Once an alias has been selected, the DDA_SLIST function becomes valid. The DDA_SLIST function returns an array of alias field names for the current alias structure. The names are returned in sequence order (the order defined within the alias structure), starting with either the first name or the specified name. If you pass array2, DD_ALIAS also returns a corresponding list of the aliased field names. You can then use DD_FIELD to obtain general information about the aliased fields.

DD_ALIAS returns as many field names as are found or as are requested, whichever is smaller. The actual number of names in the array can be returned in #names. You must make sure that the buffer passed is large enough to hold the number of names that you are requesting.