HCREATE

Create an HDS data object of specified type and dimensions

Description:

Creates an HDS data object of specified type and dimensions. It will either create a completely new container file or a new object within an existing structure. An existing container file will be overwritten but an existing component within a file will not.

By default the object created will be a scalar (dimension 0). If you want to create an object of different shape then either supply the dimensions on the command line or force prompting with the PROMPT keyword.

Primitives are not given values and this action must be performed subsequently by HMODIFY, HFILL or HCOPY.

Usage:

hcreate inp type [dims]

Parameters:

INP = UNIV (Read)
Name of object. GLOBAL.HDSOBJ >
TYPE = CHAR (Read)
Type of object to be created.
DIMS() = INTEGER (Read)
Dimensions of object, comma or space separated and enclosed in [ ] if more than one ([ ] optional in response to a prompt). [0]

Examples:

% hcreate file1 _integer [10,25]
Creates an HDS container file, file1, containing a 10x25 _INTEGER array. (Note that the square brackets have to be protected from the shell.)
% hcreate file1 struc
Creates an HDS container file, file1, containing a structure of type STRUC.
% hcreate file1.array _real [10,25]
Creates a 10x25 array named ARRAY of type _REAL in the HDS structure created in the previous example

Valid Types

HDS divides objects into two classes, primitive and structured. The former contain simple data such as numbers or characters, whereas the latter contain collections of other objects, structured or primitive. The valid primitive types recognised by HDS are:
Type Equiv Fortran Range
_LOGICAL LOGICAL4 .TRUE., .FALSE.
_UBYTE not supported 0..255
_BYTE BYTE -128..127
_UWORD not supported 0..65535
_WORD INTEGER2 -32768..32767
_INTEGER INTEGER4
_REAL REAL4
_DOUBLE DOUBLE PRECISION
_CHARn CHARACTER(n)

Any type not in the above list will be assumed to be a structured type.