The GET_NEXT_ATTRIBUTE call

The GET_NEXT_ATTRIBUTE call allows you to get the next attribute in a series, from an entry returned by the SEARCH_LDAP call. An entry is an LDAP record, and an attribute is one element within an entry.

GET_NEXT_ATTRIBUTE

  DFHDDAPX [CALL],
      [CLEAR],                 
      [IN,                            
      FUNCTION(GET_NEXT_ATTRIBUTE),      
      SEARCH_TOKEN(name4),            
      LDAP_ATTRIBUTE_NAME(buffer-descriptor),]  
      [OUT,                               
      [LDAP_RESPONSE(name4),] 
      [VALUE_COUNT(name4),]               
      RESPONSE(name1 | *),                       
      REASON(name1 | *)]

This command is threadsafe.

LDAP_ATTRIBUTE_NAME(buffer-descriptor)
indicates the buffer where you want the attribute name returned. A group of three fullwords are specified for the buffer-descriptor:
  • The address where the data is returned.
  • The maximum size in bytes, of the data returned.
  • The actual length in bytes of the data. This can be specified as *, and the length is then returned in DDAP_LDAP_ATTRIBUTE_NAME_N.
For more information on buffer-descriptors, see XPI syntax.
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_COUNT(name4)
a fullword containing the number of values returned for this attribute. There is usually one value returned.

RESPONSE and REASON values for GET_NEXT_ATTRIBUTE

RESPONSE REASON
OK None
EXCEPTION BROWSE_END
  INVALID_BUFFER_LENGTH
  INVALID_CALLING_SEQUENCE
INVALID_TOKEN
  NOT_FOUND
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.