HREAD

Read a file into an HDS object

Description:

Values are read, one per record, from the file and written to the specified HDS object. The number of values to be read is calculated from the size of the HDS object. If fewer values are found in the file, an error is reported but the given values will have been written, with the remainder unspecified. If the file is ASCII, it is read using a general format appropriate for the type of the specified object. The HDS object must exist and be primitive - it is written as if it were a vector.

Usage:

hread file out [binary=]

Parameters:

FILE = _CHAR (Read)
Name of file to be read.
OUT = UNIV (Read)
HDS object to receive data. <GLOBAL.HDSOBJ >
BINARY = _LOGICAL (Read)
Whether file is binary. [NO]

Examples:

% hread values.dat cfile.structure.data
Reads values from ASCII file values.dat and writes them to object STRUCTURE.DATA in file cfile.sdf.
% hread values.dat cfile.structure.data binary
Reads values from binary file values.dat and writes them to object STRUCTURE.DATA in file cfile.sdf.