[Back to Interface] [Prev] [Next]

VSattach/vsfatch

int32 VSattach(int32 file_id, int32 vdata_ref, char *access)

file_id IN:

File identifier returned by Hopen

vdata_ref IN:

Reference number of the vdata

access IN:

Access mode

Purpose

Attaches to an existing vdata or creates a new vdata.

Return value

Returns a vdata identifier if successful and FAIL (or -1) otherwise.

Description

VSattach attaches to the vdata identified by the reference number, vdata_ref, in the file identified by the parameter file_id. Access to the vdata is specified by the parameter access. VSattach returns an identifier to the vdata, through which all further operations on that vdata are carried out.

An existing vdata may be multiply-attached for reads. Only one attach with write access to a vdata is allowed.

The default interlace mode for a new vdata is FULL_INTERLACE (or 0). This may be changed using VSsetinterlace.

The value of the parameter vdata_ref may be -1. This is used to create a new vdata.

Valid values for access are "r" for read access and "w" for write access.

If access is "r", then vdata_ref must be the valid reference number of an existing vdata returned from any of the vdata and vgroup search routines (e.g., Vgetnext or VSgetid). It is an error to attach to a vdata with a vdata_ref of -1 with "r" access.

If access is "w", then vdata_ref must be the valid reference number of an existing vdata or -1. An existing vdata is generally attached with "w" access to replace part of its data, or to append new data to it.

FORTRAN

integer function vsfatch(file_id, vdata_ref, access)

integer file_id, vdata_ref

character*1 access



[Back to Interface] [Prev] [Next]

hdfhelp@ncsa.uiuc.edu
HDF Reference Manual - 07/29/98, NCSA HDF Development Group.