HAT 5 Text File Format
- Format:
##TimeScale {name}
{start} {code}
{start} {code}
...
- Description:
##TimeScale = Section header
{name} = Name of this time scale
{start} = Card ID of the first card in the period
{code} = Code of the period
- Example:
##TimeScale Accounting Periods
900103-001 P9001
900204-001 P9002
900306-001 P9003
900404-001 P9004
- Comments:
Each time scale is stored in a separate section.
This section can be skipped if no time scales are used.
- Format:
##Macro {name}
{selector}
{selector}
...
- Description:
##Macro = section header
{name} = name of this macro
{selector} = macro data
Currently defined selectors:
M {macro} Macro command text
- returns are coded as ascii 3
- tabs are coded as ascii 4
A+ Include this command in "Execute" Menu
A- Do not include in "Execute" Menu
S+ Execute this macro when opening a database
S- Do not execute this macro when opening a database
P+ Protect this macro with a password
P- Do not protect this macro
- Example:
##Macro Beeper
M Beep
A+
- Comments:
Each macro is stored in a separate section.
For the command details, see Macro Language Reference.
Command sections provide a simple way to script some database operations.
These commands are executed when the file is opened. HAT itself never writes
a command section when saving a file.
Multiple command sections can be inlcuded in a file. These are processed in
their order of appearance in the file.
Command sections use the same commands and syntax as the HAT Macro Language.
Note that the commands and options are separated by whitespace in macro language,
which is different from the other HAT textfile sections.
For the command details, see Macro Language Reference.
- Format:
##Commands
{command}
{command}
...
- Description:
##Commands = Section header
{command} = Each line define a command with options.
- Example:
##Commands
ErrorFile "MessageFile A"
Signature AG
DeleteCards 9701 9808
DeleteData Filters:Subsets:Badcards
Import "C:\data\new\update.hat" -pw bingo
Save "C:\data:datafile.hat" FN P-
Quit
- Comments:
When a file has a command section, the "Open Direct" -templates are
not opened automatically. Opening templates can be explicitly controlled
by the OpenTemplate command.
- Format:
##Dimension {dim}
-N {singular} {plural}
-C {codeCase}
-T {textCase}
-H {hostCase}
-S {stringFormat}
-X {compulsory}
-I {indent}
-W {codeWidth} {textWidth} {hostWidth}
{code} {text} {host}
{code} {text} {host}
{code} {text} {host}
... ... ...
- Description:
##Dimension = Section header
{dim} = Dimension number (1..32)
{singular} = Dimension name in singular form
{plural} = Dimension name in plural form
{codeCase} = {strCase} for HAT-code, default U, cannot be D or W
{textCase} = {strCase} for text, default N
{hostCase} = {strCase} for host code, default N
{strCase} =
U = Uppercase
L = Lowercase
D = Default format: first character uppercase
W = Words: first character of each word uppercase
S = Case Sensitive
N = Case Nonsensitive
{stringFormat} = Presentation format of dimension fields in analyses
{stringFormat} =
C = Code
H = Host
T = Text
CT = Code Text (this is the default setting)
HT = Host Text
CH = Code Host
CHT = Code Host Text
{compulsory} = Forces the user to specify a search criteria in analyses
{compulsory} =
- = Normal, search criteria may be left empty (default setting)
+ = Must be filled in, forces the user to specify a search criteria
{indent} = Hierarchy indentation in dimension chart editor window
{indent} =
F = Flat, no indentation
S = Single (this is the default setting)
D = Double
{codeWidth} = Width of the code field in the dimension editor
{textWidth} = Width of the text field in the dimension editor
{hostWidth} = Width of the host field in the dimension editor
{code} = HAT-code of a dimension component
{text} = Text title of a dimension component
{host} = Host code from host computer system
- Example:
##Dimension 2
-N Account Accounts
-T W
-S HT
C Costs
CL Labour
CLW Salaries 3040
CLP Pension Schemes 3050
CLT Training 3010
CV Vehicle Expenses
CD Depreciation
CX Other Costs
A Assets
- Comments:
Dimensions charts can be defined in any order.
Only dimensions in use need be defined.
Selectors with default values are omitted when HAT saves a file.
Note: The component hierarchy in HAT is based on HAT-codes,
so that the order in which the components are defined is significant.
For example, if CL is supposed to reside under C
then C must be defined before CL.
- Format:
##DimImport {dim}
{selector}
{selector}
...
- Description:
##ImportSetup = Section header
{dim} = Dimension number (1..32)
{selector} = Import setup data
Currently defined selectors:
FV = Variable field lengths
FX = Fixed field lengths
A {encoding} = Character encoding (HAT 5.6 and later)
AM = ASCII Extended Macintosh character set (HAT 5.5 and earlier)
A7 = ASCII 7-bit character set (HAT 5.5 and earlier)
AP = IBM-PC character set (HAT 5.5 and earlier)
AW = ANSI Windows character set (HAT 5.5 and earlier)
AE = EBCDIC character set (HAT 5.5 and earlier)
CC = UTF-8: Count character positions (HAT 5.6 and later)
CB = UTF-8: Count byte positions (HAT 5.6 and later)
PX = Exclude control characters from position calculations
PI = Include control characters in position calculations
PS {string} = Exclude other characters from position calculations
(exclude characters completely) (HAT 5.1.1 and later)
T {integer} = Row Terminator (Unicode codepoint)
S {integer} = Field Separator (Unicode codepoint)
RX {integer} = Number of rows to exclude at the beginning
RP {parents} = Create parents for HAT-Code
1..8 Up to character 1 to 8
P For each part (HAT 5.3 and later)
RF {integer} = Fill zeros in host code (1..8)
Redefined components:
rW = Show warning (HAT 5.3 and later)
rX = Keep old component (HAT 5.3 and later)
rR = Modify component (HAT 5.3 and later)
Duplicate host codes:
HW = Show warning (HAT 5.3 and later)
HX = Skip new component
HC = Keep old code (HAT 5.3 and later)
HR = Use new code (HAT 5.3 and later)
Character conversion:
CF {string} A character in the CF-string is converted to the
CT {string} character at same position in the CT-string.
CS {string} = Exclude characters in text fields
(included in position calculations)
MC = Hierarchy defined in HAT-Codes
MI = Hierarchy according to indentation
ML = Hierarchy defined using level numbers
MP = Hierarchy defined by parent references
NC = Parent links use HAT-Codes
NT = Parent links use component texts
NH = Parent links use host codes
Field definitions are stored in selectors beginning with an 'L'.
Following format and selectors are used:
{FSelector} {FCode} {FCode} {FCode} ...
{FSelector} =
LC = HAT-Code
LT = Component text
LH = Host code
LP = Parent code
{FCode} =
F{integer} = Field number
B{integer} = First character position
E{integer} = Last character position
T{text} = Comparison text / default value
S{text} = Separator string HAT 5.3 and later
+ = implication of next part of the field
+{integer} = ASCII code of a separator char used before HAT 5.3
and implication of next part
- Example:
##DimImport 12
AW
PX
LC F1
LT F2
LH F3
- Format:
##Cards
{options}
{card}
{card}
{card}
...
- Description:
##Cards = Section header
{options} = Options for card section
-DC {dim} Dimension links as HAT-codes (default)
-DT {dim} Dimension links as component texts
-DH {dim} Dimension links as host codes
-LN {valuefields} Number of value fields on each line (1..24)
HAT 5.3 and later
{card} =
C{cardID} {cardtext}
N{notesign} {notes}
S{created} {modified} {examined} {approved}
{group}
{group}
...
{group} =
G{dim1}
{line}
{line}
...
{line} =
L{value} ... {value24} {linetext} {dim2} {dim3} ... {dim32}
{cardID} = Card ID in format YYMMDD-LLL
YY = Year (28..99 = years 1928..1999)
(00..27 = years 2000..2027)
MM = Month (01..12)
DD = Day (01..31)
LLL = Ordinal number inside one day, 1 to 5 digits.
Ordinal number can be skipped. In that case HAT
provides the ordinal number automatically.
{cardtext} = Free text for the card (max 1023 characters).
{notesign} = {signature} of notes
{notes} = Free text for notes. Returns are replaced by ASCII 3.
{created} = {signature} of first creation
{modified} = {signature} of last modification
{examined} = {signature} of examination
{approved} = {signature} of approval
{signature} = Signature in format: YYMMDDHHNNXXX or empty.
YY = Year (28..99 = years 1928..1999)
(00..27 = years 2000..2027)
MM = Month (01..12)
DD = Day (01..31)
HH = Hour (00..23)
NN = Minute (00..59)
XXX = Signature, max three characters (first not a digit).
{value} = First value for a line. Zero decimals can be omitted.
Both comma and point can be used as a decimal separator
between integer and fraction parts. Neither comma nor point
is allowed as a thousand separator.
HAT 5.0 and later always uses point as a decimal separator
when writing files.
{value24} = Last value for a line. Line values are tab-separated.
Number of line values is one by default for each file.
If more than one value field is stored on each line,
either database options section or -LN option must be used.
{linetext} = Free text, max 1023 characters
{dim1} = Dimension 1 code
{dim2} = Dimension 2 code
...
{dim32} = Dimension 32 code
note: maximum number of dimensions is
HAT 5.0 16
HAT 5.1 24
HAT 5.2 32
- Example:
##Cards
C960223-1 Program manuals
N9608162327HU Notes are free text, max 1023 characters.
S9608162327HU 9108162341HU 9108162327HU
GUB
L15000 10 pcs KMKR BOA
L-15000 TLBC LR002
GUC
L15000 KMKR BBA ESS
L-15000 TLBC
- Comments:
A row beginning with character C creates a new card.
All subsequent lines refer to this card until next card is created.
Note row beginning with character N and signature row
beginning with character S are optional.
Multiple groups with the same {dim1} code are catenated.
The number of lines in a group and the number of groups in a card are not limited.
Previous
Contents
Next
|