DD_ENUM
Retrieve enumeration information
WSupported on Windows
|
USupported on Unix
|
VSupported on OpenVMS
|
NSupported in Synergy .NET
|
xcall DD_ENUM(dcs, DDE_INFO, name, e_info)
or
xcall DD_ENUM(dcs, DDE_TEXT, field, data)
or
xcall DD_ENUM(dcs, DDE_MBRS, names_req, array, array2, [start] [,#names])
Arguments
dcs
The repository control structure.
DDE_INFO
Returns general enumeration information and sets the current enumeration.
name
The unique enumeration definition name. (a30)
e_info
Returned with the enumeration data (including number of members). See the e_info record definition in the ddinfo.def file.
DDE_TEXT
Returns textual information about the current enumeration.
field
A field in the e_info record that indicates what type of textual information should be returned in data (if the field is non-zero):
ei_desc = Short description. (a40)
ei_ldesc = Long description. (a1800)
data
Returned with the requested textual data.
DDE_MBRS
Returns an enumeration’s member names and values.
names_req
The number of member names requested. (d3)
array
Returned with an array of member names. ((*)a30)
array2
Returned with an array of corresponding member values. ((*)a11)
start
(optional) Contains the member name at which to start. (a30)
#names
(optional) Returned with the number of member names. (d3)
Discussion
The DD_ENUM subroutine returns information about enumerations. There are three ways to call DD_ENUM:
- DDE_INFO enables you to retrieve general information about an enumeration.
- DDE_TEXT enables you to retrieve textual information about an enumeration.
- DDE_MBRS enables you to retrieve the enumeration’s member names and values.
DDE_INFO
If you pass DDE_INFO, the DD_ENUM subroutine reads the specified enumeration. If that enumeration is not found, the relevant error code is returned in the control structure. If it is found, the enumeration name is recorded in the control structure and general information is returned in e_info.
DDE_TEXT
Once an enumeration has been selected, the DDE_TEXT function is valid. DDE_TEXT is used to obtain textual information about the enumeration. For each type of textual information, a corresponding field in the e_info record is non-zero. For example, if the ei_desc field in the e_info record is non-zero, a short description exists for the enumeration. If you pass DDE_TEXT along with the non-zero field, the corresponding textual information is returned.
DDE_MBRS
Once an enumeration has been selected, the DDE_MBRS function is valid. DDE_MBRS returns two arrays: the first is an array of member names defined for this enumeration and the second is a list of corresponding values. The names are returned in the order defined in the enumeration, starting with either the first name or the name specified with start. DD_ENUM returns all the member names found or the number requested, whichever is smaller. The count of member names in the array can be returned in #names. You must ensure that the buffer passed is large enough to hold the number of names that you are requesting.