SDS_SEARCH_ATTRVALUE_STR(3)



NAME

     sds_search_attrvalue                sds_search_attrvalue_str
     sds_search_attr          sds_attrvalue          sds_attrname
     sds_attribute_type       sds_attrtype        sds_attrcomment
     sds_attrvalue_str sds_first_attr sds_last_attr sds_next_attr

     -a set of functions to handle some attribute searches


SYNOPSIS

     #include <soi_sds.h>

     void *sds_search_attrvalue(SDS *sdsptr, char *attrname)
     char *sds_search_attrname(ATTRIBUTES *attr)
     ATTRIBUTES *sds_search_attr(SDS *sdsptr, char *attrname)
     char *sds_search_attrvalue_str(SDS * sdsptr, char * attrname)
     char *sds_attr_name(ATTRIBUTES *attr)
     int sds_attribute_type(SDS *sdsptr, char *attrname)
     int sds_attrtype(ATTRIBUTES *attr)
     int sds_attrcomment(ATTRIBUTES *attr)
     char *sds_attrvalue_str(ATTRIBUTES *attr)
     ATTRIBUTES *sds_first_attr(SDS *sdsptr)
     ATTRIBUTES *sds_last_attr(SDS *sdsptr)
     ATTRIBUTES *sds_next_attr(SDS *sdsptr)



DESCRIPTION

     Most of these routines  return  pointers.   When  the  value
     returned  is  NULL, then an error has occurred and the value
     of soi_errno should hold something meaningful.

     sds_search_attrvalue searches for an attribute given an  SDS
     whose name matches the provided key name. If it is not found
     a NULL pointer is returned.  If it is found a pointer to the
     value  is  returned. You must know the attribute datatype to
     properly resolve the pointer.

     sds_search_attrvalue_str searches for an attribute given  an
     SDS  whose  name matches the provided key name. If it is not
     found a NULL pointer is returned.  If it is found a  pointer
     to the string representing the value is returned.

     sds_search_attr searches for an attribute given an SDS whose
     name  matches  the  provided  key name. If it is not found a
     NULL pointer is returned.  If it is found a pointer to  that
     attribute structure is returned.

     sds_attrname returns the attribute name given an  ATTRIBUTES
     pointer.  If it is not found a NULL pointer is returned.  If
     it is found the name string is returned.

     sds_attrvalue returns the attribute name given an ATTRIBUTES
     pointer.  If it is not found a NULL pointer is returned.  If
     it is found a pointer to the value is returned.


     sds_attribute_type returns the attribute type given  an  SDS
     pointer  and  an  attribute name.  If it is not found a 0 is
     returned and the value of soi_errno contains an  appropriate
     error number.

     sds_attrtype returns the attribute type given an  ATTRIBUTES
     pointer.   If  it is not found a 0 is returned and the value
     of soi_errno contains an appropriate error number.

     sds_attrcomment  returns  the  attribute  comment  given  an
     ATTRIBUTES  pointer.   If  it  is not found or if it is non-
     existent a NULL pointer is  returned.   If  it  is  found  a
     pointer to the comment string is returned.

     sds_attrvalue_str returns the attribute value  as  a  string
     given the ATTRIBUTES pointer

     sds_first_attr returns the pointer to  the  first  attribute
     given an SDS pointer.

     sds_last_attr returns the  pointer  to  the  last  attribute
     given an SDS pointer.

     sds_next_attr returns the  pointer  to  the  next  attribute
     given an ATTRIBUTES pointer.




FILES

     ~soi/(release)/include/soi_sds.h
     ~soi/(release)/include/soi_error.h
     ~soi/(release)/src/libsds.d/sds_attr.c



SEE ALSO

     sds_search_attrvalue,              sds_search_attrvalue_str,
     sds_search_attr,  sds_attrvalue, sds_attrname, sds_attrtype,
     sds_attrcomment,     sds_attrvalue_str,      sds_first_attr,
     sds_last_attr, sds_next_attr




FEATURES and BUGS

     sds_attrvalue_str   and   sds_search_attrvalue_str    return
     strings  are  not well tested.  Its probably best to use the
     native type routine,  sds_search_attrvalue,  when  possible.
     Care should be exercised in interpreting the returned values
     since SOI datasets may contain key values where the value is
     a  blank  string  if  no  value is available.  I.e. the not-
     present  representative  value  for  strings  is   returned.
     sds_search_attrvalue  should  be  considered  a  lower level
     function.   Use  sds_getkey_{type}  to  obtain   unambiguous
     results  with  not-present  data returned as the appropriate
     standard missing value.  See sds_key.3




HISTORY

     93.10.12 K Scott:  created this file for SOI V.0.7
     1994-02-08          SOI Version 0.8