VDS_CREATE_STD(3)



NAME

     vds_create_std



     SYNOPSIS
          #include <soi_vds.h>

          VDS *vds_create_std(KEY *keylist, char  *root_key,  int
     mode);



     DESCRIPTION

     This function is intended to  be  called  by  the  functions
     vds_open and vds_new.  It creates a vds data structure.  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  mode  must  be  either
     VDS_READ or VDS_WRITE.

     When the function has completed successfully, the mode,  wd,
     fmt,  fsn,  lsn, bn, ov, and global_attributes have been set
     based on the keylist and the contents  of  the  wd  (working
     directory).   The  prog  is  set  only if the root_key value
     begins with prog: or proj:  The filename is set only if  the
     root_key  value was a specific filename.  If the wd contains
     an overview file, the global_attributes are  initialized  to
     the values in the overview file.  The DSNAME is added to the
     global attributes if it is not already there and if  it  can
     be  generated from the keylist.  Other fields of the vds are
     as initialized by vds_create.



     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

        if(!(vds = vds_create_std(params, rootkey, VDS_READ)))
           VDS_OPEN_QUIT(soi_errno);

        if(!(vds = vds_create_std(keylist, root_key, VDS_WRITE))) {
           errstk("vds_new: vds_create_std failure0);
           return(NULL);
        }



     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



     RESTRICTIONS



     PLANNED IMPROVEMENTS