The GET_ATTRIBUTE_VALUE call
You can use the GET_ATTRIBUTE_VALUE call to retrieve the value associated with an attribute returned by the SEARCH_LDAP call. An entry is an LDAP record, and an attribute is one element within an entry. The attribute can be returned by either the GET_NEXT_ATTRIBUTE function, or by specifying the name of the attribute.
GET_ATTRIBUTE_VALUE
DFHDDAPX [CALL],
[CLEAR],
[IN,
FUNCTION(GET_ATTRIBUTE_VALUE),
SEARCH_TOKEN(name4),
LDAP_ATTRIBUTE_NAME(block-descriptor),
LDAP_ATTRIBUTE_VALUE(buffer-descriptor),
[ATTRIBUTE_TYPE(name4),]
[VALUE_ARRAY_POSITION(name4),]]
[OUT,
[LDAP_RESPONSE(name4),]
RESPONSE(name1 | *),
REASON(name1 | *)]
This command is threadsafe.
- ATTRIBUTE_TYPE(name4)
- Specifies the keyword CHARACTER or BINARY, indicating the format of the attribute. If this parameter is not specified, a value of CHARACTER is assumed.
- LDAP_ATTRIBUTE_NAME(block-descriptor)
- Specifies the location of the LDAP attribute name. The block-descriptor is two fullwords of data, in which the first word contains the address of the attribute name, and the second word contains the length in bytes of the attribute name. For more information on block-descriptors, see XPI syntax.
- LDAP_ATTRIBUTE_VALUE(buffer-descriptor)
- Indicates the buffer where you want the attribute
value returned. A group of three fullwords are specified for the buffer-descriptor:
- The address where the result is returned.
- The maximum size in bytes, of the data returned.
- The actual length in bytes of the result. This can be specified as *, and the length is then returned in DDAP_LDAP_ATTRIBUTE_VALUE_N.
- LDAP_RESPONSE(name4)
- specifies the return code that is sent by the LDAP API.
- SEARCH_TOKEN(name4)
- the name of the fullword token that is returned by the SEARCH_LDAP function.
- VALUE_ARRAY_POSITION(name4)
- Specifies the position of the requested value, in the value array for the current attribute. This parameter is only required if multiple values are expected. Array indexing starts at position 1.
RESPONSE and REASON values for GET_ATTRIBUTE_VALUE
| RESPONSE | REASON |
|---|---|
| OK | None |
| EXCEPTION | INVALID_TOKEN |
| NOTFOUND | |
| INVALID_BUFFER_LENGTH | |
| INVALID_CALLING_SEQUENCE | |
| DISASTER | None |
| INVALID | None |
| KERNERROR | None |
| PURGED | None |
Note: For more detail, refer to the explanation of RESPONSE
and REASON in Making an XPI call.