VDS_NEW(3)
NAME
vds_new
SYNOPSIS
#include <soi_vds.h>
VDS *vds_new (KEY *keylist, char *root_key, int proto-
col);
DESCRIPTION
This function creates a new vds data structure to be used
for creating a new external dataset. The keylist argument
must contain the results of parsing a dataset name with the
root_key. Keylists passed to strategy modules meet this
requirement. The protocol must be one of the (external) pro-
tocol prototypes defined in soi_vds.h. Examples are
VDS_FITS, and VDS_FITS_MERGE.
When the function has completed successfully, the vds is
ready for vds insert operations. The mode is VDS_WRITE. In
addition to fields set by vds_create_std, the vds_pointer,
vds_extern_type, vds_intern_type, and state are initialized
and the global attribute PROTOCOL is set according to the
given protocol. If the external dataset is to be stored in
a single file, the filename is set.
RETURN VALUES
The return value is a pointer to the created vds or NULL if
an error occurred. If the return value is NULL, the global
soi_errno contains an error code. Error codes are defined in
soi_error.h. The errstk may also contain messages.
EXAMPLES
There many examples of the use of vds_new in
~soi/CM/src/modules/*.c
SEE ALSO
~soi/CM/man/man3/vds.3
~soi/CM/man/man3/errstk.3
~soi/CM/include/soi_error.h
FILES
~soi/CM/include/soi_vds.h
~soi/CM/src/libvds.d/vds_new.c
BUGS
Subsequent insert operations fail when the protocol is
VDS_CDF.
RESTRICTIONS
PLANNED IMPROVEMENTS