[Back to Interface] [Prev] [Next]

SDsetexternalfile/sfsextf

intn SDsetexternalfile(int32 sds_id, char *filename, int32 offset)

sds_id IN:

Data set identifier returned by SDcreate or SDselect

filename IN:

Name of the external file

offset IN:

Number of bytes from the beginning of the external file to where the data will be written

Purpose

Stores data in an external file.

Return value

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

Description

SDsetexternalfile allows users to move the actual data values (i.e., not metadata) of a data set, sds_id, into the external data file named by the parameter filename, and started at the offset specified by the parameter offset. The metadata remains in the original file. Note that this routine works only with HDF post-version 3.2 files.

Data can only be moved once for any given data set, and it is the user's responsibility to make sure the external data file is kept with the "original" file.

If the data set already exists, its data will be moved to the external file. Space occupied by the data in the primary file will not be released. To release the space in the primary file use the hdfpack command-line utility. If the data set does not exist, its data will be written to the external file during the consequent calls to SDwritedata.

See the Reference Manual entries for HXsetcreatedir and HXsetdir for more information on the options available for accessing external files.

FORTRAN

integer function sfsextf(sds_id, file_name, offset)

integer sds_id, offset

character*(*) file_name



[Back to Interface] [Prev] [Next]

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