| LDAP CALL Routine Interface |
Retrieves an attribute value
|
CALL LDAPS_ATTRVALUE(sHandle, entryIndex, attributeIndex, valueIndex, value,
rc);
|
| sHandle |
specifies the search handle that is returned by the
LDAPS_SEARCH CALL routine. The search handle identifies the entry list that
is returned in the search.
| Type: |
Numeric |
| Direction: |
Input |
|
| entryIndex |
specifies an index into the entry list. This index
is 1-based.
| Type: |
Numeric |
| Direction: |
Input |
|
| attributeIndex |
specifies an index into the attribute list for the
specified entry.
| Type: |
Numeric |
| Direction: |
Input |
|
| valueIndex |
specifies an index into the list of attribute values.
| Type: |
Numeric |
| Direction: |
Input |
|
| value |
returns the value of the specified attribute.
| Type: |
Character |
| Direction: |
Output |
|
| rc |
receives a return code that indicates success or
failure.
| Type: |
Numeric |
| Direction: |
Output |
|
The following example prints to the SAS log the names
and values of all attributes in all entries in a given LDAP directory.
call ldaps_search(lhandle, sHandle, filter, attribs, numEntries, rc);
do entryIndex = 1 to numEntries;
numAttributes = 0;
entryName='';
/* retrieve entry indexed by integer entryIndex */
call ldaps_entry(sHandle, entryIndex, entryName, numAttributes, rc);
put 'Entry name is ' entryName;
put 'Number of attributes returned is ' numAttributes;
do attrIndex = 1 to numAttributes;
call ldaps_attrname(sHandle, entryIndex, attrIndex, attribName,
numValues, rc);
put 'Attribute name is ' attribName;
put 'Number of values for this attribute is ' numValues;
do attrValueIndex = 1 to numValues;
value='';
call LDAPS_ATTRVALUE
(sHandle, entryIndex, attrindex, attrValueIndex, value,
rc);
put Attribute value is value;
end;
end;
end;
Copyright © 2008 by SAS Institute Inc., Cary, NC, USA. All rights reserved.