Header Array Files


Data for economic models (for example, input-output tables or parameters such as elasticities) are often held within GEMPACK on files called Header Array or HAR files. Header Array files contain one or more arrays each containing data values. An individual array of data on a Header Array file is accessed by supplying the unique 4-character identifier (or Header) for that array of values.

The data values held by an individual array can be either all real numbers, all integer numbers or all character strings. Depending on the type of data that is to be stored, the number of dimensions allowed varies.

The dimension limits for Header Arrays are:

For real numbers: up to and including 7 dimensions

For integer numbers: up to and including 2 dimensions

For character strings: only one dimensional arrays are allowed, each string being of the same length

Headers for arrays on any one file must be unique since the header acts as a label or primary key to identify the associated array.

Once written, an array contains not just the numbers in the array itself but also self-describing data, including the type of data values, dimensions of the array and a descriptive "long name" of up to 70 characters. There may also be labels for the set elements, which appear in ViewHAR as row and column labels.

Header Array files have the advantage that you can access any array just by referring to the header which uniquely identifies the array in the file. The format of the arrays and other details are all taken care of automatically by the software.

Headers consist of four characters which are usually letters (A to Z, a to z) or digits (0 to 9). Different arrays must have different headers. The case (upper or lower) of a header is not significant. (For example, you cannot have one array with header 'ABCD' and another on the same file with header 'AbCd'.). Headers starting with letters 'XX' are reserved for internal program use; an error is returned if you choose a header starting with 'XX'.



URL of this topic: www.copsmodels.com/webhelp/viewhar/hc_harfile.htm

Link to full GEMPACK Manual

Link to GEMPACK homepage