HAT 4.0.4 Text File Format


Dimension Section

  • Format:
    ##Dimension   {dim}
    -N   {singular}   {plural}
    -C   {codeCase}
    -T   {textCase}
    -H   {hostCase}
    -S   {stringFormat}
    -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
    
    {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

  • Format:
    ##Commands
    {command}
    {command}
    ...
    
  • Description:
    ##Commands    = Section header
    {command}     = Each line define a command with options
    
    Currently defined commands:
    
    ErrorFile   {filename}
    
        Defines a file for the error messages. All error messages
        after this command are placed in a new file called {filename}.
        Previous error log file is closed. No alert boxes are
        presented on the screen after this command.
    
    Signature   {sign}
    
        Defines a signature to be used in data operations.
        Defining the signature this way avoids a dialog when
        the signature is first needed.
    
    Password   {password}
    
        Defines a password for the current database.
    
    DeleteCards   {fromCardID}   {toCardID}
    
        Deletes cards inside given Card ID interval from the database.
        Card IDs can be partial and even totally omitted, in that case
        they are completed the same way as when entered in the Card ID
        fields of the analyses.
        Previously this command was EraseCards which is still supported.
    
    Transform   {template}   {option}   {option}   {option}   ...
    
        Opens or activates the given template, calculates it, transforms
        all data in that window and finally closes the window.
    
        {template} can be:
          - "Base" which means the complete database
          - global subset name
          - anlysis template pathname (Cards and Lines only)
    
        Following options are currently defined:
           A              Add a transformed duplicate
           D{dim}={expr}  Dimension expression, e.g. D3=\ clears dimension 3.
           V={expr}       Value expression. Letter A refers to the current
                            value, e.g. V=A*2
           CB={expr}      Card-ID source "Start" expression
           CE={expr}      Card-ID source "End" expression
           CF={expr}      Card-ID destination "Start" expression
           CT={expr}      Card-ID destination "End" expression
           TF={expr}      Card title "From" expression
           TT={expr}      Card title "To" expression
           LF={expr}      Line text "From" expression
           LT={expr}      Line text "To" expression
           NF={expr}      Notes "From" expression
           NT={expr}      Notes "To" expression
    
    DeleteData   {template}
    
        Opens or activates the given template, calculates it, deletes
        all data in that window and finally closes the window.
    
        {template} can be:
          - "Base" which means the complete database
          - global subset name
          - anlysis template pathname (Cards and Lines only)
    
    DeleteTemplate   {template}
    
        Deletes the given template.
    
        {template} can be:
          - global subset name
          - anlysis template pathname
          - pathname of an analysis template group
    
    OpenTemplate   {template}
    
        Opens and calculates the given template.
    
        {template} can be:
          - global subset name
          - anlysis template pathname
          - pathname of an analysis template group
    
        This command is used similarly as "Open Directly" checkbox when installing
        a template. Using a command section inhibits the normal "Open Directly" feature.
    
        It is not necessary to open a template using this command before using other
        template commands, for example Transform, DeleteData, Print or Export.
    
    Modify   {template}   {selector}
    
        Modifies the given template. {selector} uses the same format as
        template data in template sections.
    
    Print   {template}
    
        Opens or activates the given template, calculates it, prints
        it to the current printer and finally closes the window.
        A group of templates can be specified as well. In that case
        all the templates in the specified group are printed.
    
    Export   {template}   {filename}
    
        Opens or activates the given template, calculates it, exports
        it to the given file and finally closes the window.
    
        Filename is optional; default filename is the template pathname
          - on Macintosh: the name separator : is converted to /.
          - on Win-32:    the name separator : is converted to ;.
          - on Win-16:    only the last part is used.
    
    Import   {filename}   {importsetup}   {password}
    
        Imports the given file into the database.
        An import setup can optionally be specified in {Importsetup}.
        Opening password can optionally be specified in {Passowrd}.
        If imported file is password protected and no password is
        given here, the password is asked from the user.
        Note for security that password is given here in plain text.
    
    Save   {filename}   {option}   {option}   {option}   ...
    
        Saves the current database using the given name and options.
        Following options are currently defined:
           FN       File format = Normal
           FT       File format = Text
           Fs       Set database name and type
           P+       Include protection section
           P-       Exclude protection section
           B+       Include database settings section
           B-       Exclude database settings section
           s+       Include save setup sections
           s-       Exclude save setup sections
           s={name} Use save setup named {name}
           I+       Include import setup sections
           I-       Exclude import setup sections
           S+       Include time scale sections
           S-       Exclude time scale sections
           D+       Include dimension sections
           D-       Exclude all dimension sections
           D{dim}+  Include dimension section {dim}
           D{dim}-  Exclude dimension section {dim}
           D{dim}A  Include only active components in dimension {dim}
           D{dim}U  Include only components in use in dimension {dim}
           C+       Include cards section
           C-       Exclude cards section
           C{dim}C  Use HAT-codes for dimension {dim} in cards
           C{dim}H  Use host codes for dimension {dim} in cards
           C{dim}T  Use dimension texts for dimension {dim} in cards
           U+       Include global subsets
           U-       Exclude global subsets
           T+       Include template section
           T-       Exclude template section
           TO       Include open templates only
           T={filter}  Template filter string
           F+       Include analysis defaults section
           F-       Exclude analysis defaults section
    
    Close   {window}
    
        Closes all windows with the given name in the current database.
        Possible changes made in those windows are lost.
    
    Close
    
        Close command without any parameters closes the current database.
        Database is closed after all other commands have completed their
        execution and control is passed back to the main event loop.
        The dialog for saving changes made to a database is not presented.
    
    Quit
    
        Terminates the application after all other commands have completed
        their execution and control is passed back to the main event loop.
        The dialog for saving changes made to any open database is not presented.
    
    Beep
    
        Sounds the system speaker.
    
    //  Comment line
    /*  Start of a comment block
    */  End of a comment block
    
    
    {dim}  = dimension number in range 1 to 12.
    
    {filename} = A valid file pathname, either full or partial pathname.
                 Partial pathnames start at the directory where the
                 original document file is located.
    
        in macintosh:
          - Folders separated by a colon (:).
          - Partial pathnames begin with a colon which in most cases can be omitted.
          - Double colon (::) refers to the parent folder.
          - Full pathname uses format volume:folder:file, where the folder
            part (:folder) may occur zero or more times.
          - Filenames in macintosh are case insensitive.
    
        in windows:
          - Directories separated by a backslash (\).
          - Double point (..) refers to the parent directory.
          - Full pathname uses format drive:\dir\file, where the directory
            part (dir\) may occur zero or more times.
          - Filenames in windows are case insensitive.
    
  • Example:
    ##Commands
    // global definitions
    ErrorFile    MessageFile A
    Signature    AG
    
    // remove outdated cards
    DeleteCards  920401-005   920431-999
    DeleteData   Filters:Subsets:Badcards
    
    // save result files
    Save         Harddisk:Data:Datafile   FN   P-
    Quit
    
  • Comments:

    Command section provides a simple and stable way to script database operations. A file can include multiple command sections which are processed in their order in file. HAT never writes a command section when it saves a file.

    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