Open topic with navigation
WTSupported in traditional Synergy on Windows
WNSupported in Synergy .NET on Windows
USupported on UNIX
VSupported on OpenVMS
xcall DD_KEY(dcs, DDK_LIST, names_req, array, [start][, #names])
xcall DD_KEY(dcs, DDK_SLIST, names_req, array, [start][, #names])
xcall DD_KEY(dcs, DDK_INFO, name, k_info)
xcall DD_KEY(dcs, DDK_TEXT, field, data)
The repository control structure.
Returns the current structure’s key names in alphabetical order.
The number of key names requested. (d2)
Returned with the array of key names. ((*)a30)
(optional) Contains the key name at which to start. (a30)
(optional) Returned with the number of key names. (d2)
Returns the current structure’s key names in sequence order.
Returns general key information.
The unique key name. (a30)
Returned with the key data. See the k_info record definition in the ddinfo.def file.
Returns textual information about the current key.
A field in the k_info record that indicates what type of textual information should be returned in data (if the field is non‑zero):
ki_desc = Short description. (a40)
ki_nullval = Null key value. (a255)
Returned with the requested textual data.
The DD_KEY subroutine returns information about keys for the current structure. There are four ways to call DD_KEY:
You must have previously set the current structure with the DD_STRUCT subroutine. The same DD_STRUCT call should also have told you the number of keys that exist.
DDK_LIST and DDK_SLIST
If you pass DDK_LIST or DDK_SLIST, the DD_KEY subroutine returns an array of key names for the current structure. If you pass DDK_LIST, the names are returned in alphabetical order, starting with either the first name found or the specified name. If you pass DDK_SLIST, the names are returned in sequence order (the order defined in the structure), starting with either the first name found or the specified name. DD_KEY returns as many key 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.
If you pass DDK_INFO, this subroutine reads the specified key. If that key is not found, the relevant error code is returned in the control structure. If it is found, general key information is returned in k_info.
Once a key has been selected, the DDK_TEXT function is then valid. The DDK_TEXT function is used to obtain textual or variable‑length information about the key. For each type of textual information, a corresponding field in the k_info record is non‑zero. For example, if the ki_desc field in the k_info record is non‑zero, a short description exists for the key. If you pass DDK_TEXT along with this non‑zero field, the corresponding textual information is returned.