### DAT_DREP

Obtain primitive data representation information

#### Description:

The routine returns information describing how the data stored in a primitive object are actually represented. An object’s data representation will match that used by the computer system on which it was created, and this forms a permanent attribute of the object. If necessary, HDS will automatically perform conversion to the representation used by the host computer when the data are accessed (except when using DAT_BASIC, which provides direct access to the data without conversion).

#### Invocation

CALL DAT_DREP( LOC, FORMAT, ORDER, STATUS )

#### Arguments

##### LOC = CHARACTER $\ast$ ( DAT__SZLOC ) (Given)
Primitive object locator.
##### FORMAT = CHARACTER $\ast$ ( $\ast$ ) (Returned)
Description of the format used to encode each data element (see the “Data Format” section).
##### ORDER = CHARACTER $\ast$ ( $\ast$ ) (Returned)
Description of the (byte) storage order used for each data element (see the “Storage Order” section).
##### STATUS = INTEGER (Given and Returned)
The global status.

#### Notes:

• Not all combinations of data format and storage order are supported.

• This routine may only be used with objects stored using HDS data formats that pre-date version 5. An error is reported if the supplied object is stored using data format version 5 or later.

#### Data Format

HDS currently supports the following encodings of primitive data elements. Each description is preceded by the character string returned by DAT_DREP to describe it:
• ’BIT0’: Used to encode logical values, in which the least significant bit (bit zero) holds the logical value such that 1 implies .TRUE. and 0 implies .FALSE.. All other bits are disregarded (except in “bad” data values when they are all significant).

• ’NZ’: Used to encode logical values, in which all bits set to zero implies .FALSE. and any bit set to 1 (i.e. a non-zero data value) implies .TRUE..

• ’BINARY’: Used for unsigned integers; this is a straight binary encoding.

• ’2COMP’: Used for signed integers in which a “2’s complement” binary encoding of the sign information is employed.

• ’VAXF’: Used for single precision floating point values; this is the VAX/VMS “F-floating” number representation.

• ’IEEE_S’: Used for single precision floating point values; this is the standard IEEE single precision floating point format.

• ’VAXD’: Used for double precision floating point values; this is the VAX/VMS “D-floating” number representation.

• ’IEEE_D’: Used for double precision floating point values; this is the standard IEEE double precision floating point format.

• ’ASCII’: Used for character strings; each character employs the standard ASCII encoding.

#### Storage Order

HDS currently supports the following storage orders for the bytes of primitive data elements. Each description is preceded by the character string returned by DAT_DREP to describe it:
• ’MSB’: Most significant byte stored first.

• ’LSB’: Least significant byte stored first.

In the case of floating point formats, the byte in question is the most/least significant byte of the fraction.