HAT 4.1 Text File Format


Time Scales Section

  • 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.


    Macro Section

  • 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
        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.


    Dimension Section

  • 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..12)
    {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 fill in this dimension in analyses
    
       {compulsory} =
          -  = Normal, no need to define (default setting)
          +  = Must be filled in, forces the user to define this dimension
    
    {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, must C be defined before CL.


    Cards Section

  • 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
    
    {card} =
       C{cardID}    {cardtext}
       N{notesign}  {notes}
       S{created}   {modified}   {examined}   {approved}
       {group}
       {group}
       ...
    
    {group} =
       G{dim1}
       {line}
       {line}
       ...
    
    {line} =
       L{value}   {linetext}   {dim2}   {dim3}   ...   {dim12}
    
    {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}     = 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.
    
    {linetext}  = Free text, max 1023 characters
    
    {dim1}      = Dimension 1 code
    {dim2}      = Dimension 2 code
    ...
    {dim12}     = Dimension 12 code
    
  • 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.


    Commands Section

    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 it saves a file.

    Multiple command sections can be inlcuded in a file. These are processed in the same order as they are in the file.

    Command sections use the same commands and format as 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.


    Previous Contents Next