[Back to Interface] [Prev] [Next]

VSsetfields/vsfsfld

intn VSsetfields(int32 vdata_id, char *field_name_list)

vdata_id IN:

Vdata identifier returned by VSattach

field_name_list IN:

List of the field names to be accessed

Purpose

Specifies the fields to be accessed.

Return value

Returns SUCCEED (or 0) if successful and FAIL (or -1) otherwise.

Description

VSsetfields specifies that the fields, whose names are listed in the parameter field_name_list, of the vdata identified by the parameter vdata_id will be accessed by the next call to VSread or VSwrite. VSsetfields must be called before any call to VSread or VSwrite.

For reading from a vdata, a call to VSsetfields sets up the fields that are to be retrieved from the records in the vdata. If the vdata is empty, VSsetfields will return FAIL (or -1).

For writing to a vdata, VSsetfields can only be called once, to set up the fields in a vdata. Once the vdata fields are set, they may not be changed. Thus, to update some fields of a record after the first write, the user must read all the fields to a buffer, update the buffer, then write the entire record back to the vdata.

The parameter field_name_list is a character string that contains a comma-separated list of fieldnames (i.e., "PX,PY,PZ" in C and 'PX,PY,PZ' in Fortran). The combined width of the fields in a vdata must be less than MAX_FIELD_SIZE (or 65535) bytes. If an attempt to create a larger record is made, VSsetfields will return FAIL (or -1).

If the vdata is attached with an "r" access mode, the parameter field_name_list must contain only the fields that already exist in the vdata. If the vdata is attached with a "w" access mode, field_name_list can contain the names of any fields that have been defined by VSfdefine or any predefined fields.

FORTRAN

integer function vsfsfld(vdata_id, field_name_list)

integer vdata_id

character*(*) field_name_list



[Back to Interface] [Prev] [Next]

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