DATASERV (kdataman) functions
LIBRARY ROUTINE
kdms_get_segment - retreive information from a segment
LIBRARY CALL
int
kdms_get_segment(
kobject object,
char *segment,
int *dimension,
int **size,
int **order,
int *datatype,
kaddr *data)
INPUT
- object - The object to get segment information from.
- segment - The name of the segment to get.
OUTPUT
- dimension - The dimensionality of the segment.
- size - The size of the segment. Be careful not
to free this array, as it points to the
internal array used by data services.
- order - The order of the segment. Be careful not
to free this array, as it points to the
internal array used by data services.
- datatype - The datatype of the segment.
- data - The actual segment data, if it is all in
memory. This points to data services internal
buffer, so be careful not to free it.
RETURN VALUE
TRUE if successful, FALSE otherwise
DESCRIPTION
This function is used to directly retrieve storage
information from a data segment. This should only
be done inside of file format glue routines, in their
output routine.
All arguments are optional, passing NULL in will
cause them to be ignored. The characteristics are
assigned directly to the pointers provided, so be
careful not to free the size and order arrays.
Data retreival can be done here, the data returned
will be the actual physical pointer to the memory
block. If the data set is considered to be large and
the format has large data set support, the pointer
returned will be NULL since the data is being
buffered inside of a temporary file.
Be careful when using this routine, as its misuse can
easily corrupt a data object.
ADDITIONAL INFORMATION
none
EXAMPLES
none
SIDE EFFECTS
none
RESTRICTIONS
none
MODIFICATION
none
FILES
$DATASERV/objects/library/kdataman/src/segment.c
SEE ALSO
kdataman(3)
COPYRIGHT
Copyright (C) 1993 - 1997, Khoral Research, Inc. ("KRI") All rights reserved.