HCOPY

Copy HDS data objects

Description:

Copies a data object from one place to another. The copy is recursive, so if a structure is specified as input then everything below that level will be copied to the output destination.

A suitable output object will be created if necessary (replacing any existing unsuitable one of the same name) but any structure above the specified object must already exist. Any content of an existing component is lost.

Usage:

hcopy in out

Parameters:

INP=UNIV (Read)
Object being copied from, structured or primitive.
OUT=CHAR (Read)
Object being copied to - takes shape and type of input.

Examples:

% hcopy file1 file2
Copy complete container file.
% hcopy file.more.asterix.grafix.coltab tab1
Extract an object into its own container file.
% hcopy file1.data_array file2.data_array
Copy the component DATA_ARRAY in file1 to DATA_ARRAY in file2. The DATA_ARRAY component of file2 will be created, but file2 must already exist.
% hcopy [1 2 3 4 5] file.array
Copy the explicit values given into a component ARRAY within file.
% hcopy "Counts/sec" file.axis(2).units
A more practical example of the above.
% hcopy file.axis(1) file.axis(2)
Copy the first element of the AXIS array to the second - works for structure or primitive arrays.

Deficiencies

Error reporting could be more helpful.