VDS_CLOSE(3)



NAME

     vds_close



     SYNOPSIS
          #include <soi_vds.h>

          int vds_close (VDS **vdsptrptr);



     DESCRIPTION

     This function takes as an argument the address of a  pointer
     to a vds data structure. If the mode of the vds is VDS_WRITE
     or VDS_APPEND, vds_close writes an overview file  containing
     the  global  attributes  of  the dataset, file(s) containing
     data, and an info file containing the  per  record  informa-
     tion,  thus  producing  a  conforming  dataset in the output
     directory.  Regardless of mode, all malloced data  belonging
     to  the  data  structure  including  the structure itself is
     freed. The pointer to the data structure is set to NULL.

     NOTE: It is a common usage error to free some  part  of  the
     vds  structure  before  calling vds_close.  If this is done,
     vds_close will fail.

     Some  functions  used  by  vds_close   are   vds_check_info,
     vds_flush_data, vds_close_info, and vds_free.



     RETURN VALUES

     vds_close returns an error code  status.   Error  codes  are
     defined  in soi_error.h.  The code returned after a success-
     ful completion is NO_ERROR.



     EXAMPLES

     There  many  examples   of   the   use   of   vds_close   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




     RESTRICTIONS

     The internal data type VDS_CDF is not supported.



     PLANNED IMPROVEMENTS