HAT 4.0.4 Text File Format


File type and version

  • Format:
    ##HAT-Text   {version}
    
  • Description:
    ##HAT-Text   = File identifier
    
    {version}    = Version number for this text file format,
                   {year}{month}{day}
    
    {year}       = 2 digits, 9x = years 1990..1999
                             0x = years 2000..2009
    
    {month}      = 2 digits, 01..12
    
    {day}        = 2 digits, 01..31
    
  • Example:
    ##HAT-Text   981029
    
  • Comments:

    All HAT text files must begin with this line, otherwise the file is not considered as a HAT text file. Version number is the date when this format was frozen. Future versions of HAT will increment this value.

    Note: The year is expressed in only two digits. Years 2000 and beyond have smaller numeric value than years before 2000.


    Characters Section

  • Format:
    ##Characters
    U     {uppercase}
    L     {lowercase}
    X     {special}
    
  • Description:
    ##Characters    = Section header
    
    {uppercase}     = International uppercase characters
                      
    
    {lowercase}     = International lowercase characters
                      
    
    {special}       = Some special characters
                      
    
  • Comments:

    HAT-Text files may include this section to ensure that international and special characters are correctly handled. Text files always use native character set in an operating system, but when moving a text file over an operating system boundary, character conversion may or may not occur. This character section included in a text file is converted the same way as the rest of the file ensuring correct interpretion.

    If some characters do not exist in an operating system, a space character should be used as a placeholder for them.
    If you are workng in one operating system only, you can safely ignore this section.


    Protection Section

  • Format:
    ##Protection    {password}
    {processor}     {description}
    {processor}     {description}
    ...
    
  • Description:
    ##Protection    = Section header
    {password}      = Password currenty in use
    {processor}     = Serial number of a HAT processor
    {description}   = Free text to describe processor user or usage
    
  • Example:
    ##Protection    sesam
    AA24N007        D.Garrison
    AA24P012        C.Bellman
    BD08P006        Sales Manager
    BD22P011        Reserved for future
    
  • Comments:

    List of processors is used to limit database access to certain HAT-processors. The file cannot be opened if the current processor is not in the list. If no list is defined, the file can be accessed with any HAT-processor.

    Protection section limits access to the file containing it. This information is not changed when importing a file into an open database. Protection information is checked to allow/disallow importing the data file. The original protection information for the database remains in effect when saving and reopening the original file.

    Note: Password is shown in this text file openly as plain characters. Full password protection is ensured when a file is saved as an encrypted HAT normal file.


    Database Options Section

  • Format:
    ##BaseOptions
    CN   {ordinalDigits}
    CD   {cardDecimals}
    CT   {xCardTitle}
    LT   {xLineText}
    LV   {xValueTitle}
    R    {referenceID}
    EC   {codeCount}
    
  • Description:
    ##BaseOptions     = Section header
    {ordinalDigits}   = Number of ordinal digits in Card ID (1..5)
    {cardDecimals}    = Number of decimals in card values (0..6)
    {xCardTitle}      = Custom title for card titles
    {xLineText}       = Custom title for line texts
    {xValueTitle}     = Custom title for line values
    {referenceID}     = Reference ID (may include Card ID operators)
    {codeCount}       = Number of HAT and host codes in dimensions (optional)
    
  • Example:
    ##BaseOptions
    CN   3
    CD   2
    LT   Description
    LV   Amount
    R    921002-999#
    EC   2012
    
  • Comments:

    Selector order is not significant.
    Database options section can be skipped. In that case the default values are used.


    Save Setup Section

  • Format:
    ##SaveSetup  {name}
    {selector}
    {selector}
    ...
    
  • Description:
    ##SaveSetup     = Section header
    {name}          = Name of this save setup
    {selector}      = Save setup data
    
      Currently defined selectors:
    
        FT       = Use text file format
        FN       = Use normal file format
        SH+      = Include characters section
        SH-      = Exclude characters section
        SP+      = Include protection section
        SP-      = Exclude protection section
        SB+      = Include base options section
        SB-      = Exclude base options section
        SS+      = Include save setup sections
        SS-      = Exclude save setup sections
        SI+      = Include import setup sections
        SI-      = Exclude import setup sections
        ST+      = Include time scale sections
        ST-      = Exclude time scale sections
        SD+      = Include dimension sections
        SD-      = Exclude dimension sections
        SC+      = Include card section
        SC-      = Exclude card section
        SM+      = Include analysis templates section
        SM-      = Exclude analysis templates section
        SG+      = Include analysis defaults section
        SG-      = Exclude analysis defaults section
    
        DF   {dimfilters}  = Dimension component filters for each dimension
    
                 {dimfilters} = {filter}{filter}{filter}...
                 {filter} =
                    A  = Include all components
                    C  = Include active components only
                    U  = Include components in use only
                    N  = Exclude all components
    
        DL   {dimlinks}  = Dimension reference link codes for each dimension
    
                 {dimlinks} = {link}{link}{link}...
                 {link} =
                    C  = Use HAT-codes
                    H  = Use host codes
                    T  = Use dimension texts
    
        BD{dim}   {expr}     = Dimension expressions for card selection
    
        BC   {from}   {to}   = Card IDs for card selection
        BY   {expr}          = Card title expression
        BL   {expr}          = Line text expression
        BV   {expr}          = Value expression
    
        GC                   = Include complete cards in card selection
        GG                   = Include complete groups in card selection
        GL                   = Include selected lines only in card selection
    
        TF   {expr}          = Template filter expression
        TO+                  = Include open templates only
        TO-                  = Disable "open templates only" feature
    
        M{dim}  -            = Exclude dimension {dim} from all sections
        M{dim}  {srcdim}     = Map dimension {srcdim} to {dim} in all sections
    
  • Example:
    ##SaveSetup  SS1
    FT
    SP-
    SS-
    SI-
    SG+
    DF   ACAA
    BD2  T Tulot
    GC
    TF   Dine
    M4   3
    


    Import Setup Section

  • Format:
    ##ImportSetup   {name}
    {selector}
    {selector}
    ...
    
  • Description:
    ##ImportSetup   = Section header
    {name}          = Name of this import setup
    {selector}      = Import setup data
    
      Currently defined selectors:
    
        FV       = Variable field lengths
        FX       = Fixed field lengths
    
        AM       = ASCII Extended Macintosh character set
        A7       = ASCII 7-bit character set
        AP       = IBM-PC character set
        AW       = ANSI Windows character set
        AE       = EBCDIC character set
    
        M   {dateformat}  = Date format
    
            {dateformat} =
               YYMMDD   YYDDMM   MMDDYY   DDMMYY
               Y/M/D    Y/D/M    M/D/Y    D/M/Y
    
        T   {integer}   = Row Terminator (ASCII code)
        S   {integer}   = Field Separator (ASCII code)
        D   {integer}   = Decimal Separator (ASCII code)
    
        RC  {integer}   = Number of rows for card information
        RL  {integer}   = Number of rows for line information
    
        H               = New components in hierarchy
    
        CF  {string}    = These two selectors define character conversions.
        CT  {string}    = Character in CF-string is converted to character
                          at same position in CT-string.
        CS  {string}    = Characters in CS-string are excluded
    
        -               = Separator line for multiple line definitions
    
        V   {float}     = Scaling factor for values
        ZK              = Do not exclude zero lines
    
    Field definitions are stored in selectors beginning with an 'L'.
    Following format and selectors are used:
    
    {FSelector}   {FCode}   {FCode}   {FCode}   ...
    
      {FSelector} =
         LX      = Card Switcher
         LC      = Card Indicator
         LL      = Line Indicator
         LI      = Card ID
         LT      = Card Title
         LN      = Notes
         Lc      = Created
         Lm      = Modified
         Le      = Examined
         La      = Approved
         L{dim}  = Dimensions
         LZ      = Line Text
         LV      = Value
    
      {FCode} =
         F{integer}   = Field number
         B{integer}   = First character position
         E{integer}   = Last character position
         T{text}      = Character string defining the text / default value
         +{integer}   = ASCII code for the separator character and
                        implication of a following linked field
    
  • Example:
    ##ImportSetup   FlatFormat
    FV
    AM
    T    13
    D    46
    CF   {}|
    CT   ŒŠš
    CS   "`«
    H
    LI   1   0   0
    LV   3   0   0
    L1   0   0   0   IH
    L2   2   0   0
    

    Subset Section

    There are two types of subsets in HAT, global and local.

    Note that subset names must follow certain rules. Blanks and set operators are not allowed in them. These restrictions simplify further usage of subset names in expressions.

    Global Subsets

    The global subsets are accessible to all analyses.
    They are stored in subset sections, one subset in each section.

  • Format:
    #Subset    {name}
    {selector}
    {selector}
    {selector}
    ..........
    
  • Description:
    ##Subset       Section header
    {name}         Name of the global subset
    {selector}     These selectors define the details of the subset.
    
    Subset Variable Seletors:
    VN  {name}             Name  (must be the first line)
    VD{dim}  {expr}        Dimension expressions
    VY  {expr}             Card title expression
    VL  {expr}             Line text expression
    VV  {expr}             Value expression
    VS  {expr}             Subset expression (only for local subsets)
    
    Vk  {expr}             Card ID expression
    VA  {expr}             Notes expression
    
    Vc  {time}  {sign}     Card created expressions
    Vm  {time}  {sign}     Card modified expressions
    Ve  {time}  {sign}     Card examined expressions
    Vp  {time}  {sign}     Card approved expressions
    Va  {time}  {sign}     Notes signature expressions
    
                           {time}  = Time expression
                           {sign}  = Signature expression
    
    Subset Generic Seletors:
    F  {expr}              Formula expression
    
  • Example:
    #Subset    Foo
    VN  A
    Ve  \
    F   A
    

    Local Subsets

    Local subsets are defined for a single analysis. They are not accessible to other analyses, and their definition is embedded in an analysis template definition. All local subset selectors begin with s.

  • Format:
    sn   {name}
    {selector}
    {selector}
    {selector}
    ..........
    
  • Description:
    {name}         Name of the local subset
    {selector}     These selectors define the details of the subset.
    
    Subset Variable Seletors:
    sN  {name}             Name  (must be the first line)
    sD{dim}  {expr}        Dimension expressions
    sY  {expr}             Card title expression
    sL  {expr}             Line text expression
    sV  {expr}             Value expression
    sS  {expr}             Subset expression (only for local subsets)
    
    sk  {expr}             Card ID expression
    sA  {expr}             Notes expression
    
    sc  {time}  {sign}     Card created expressions
    sm  {time}  {sign}     Card modified expressions
    se  {time}  {sign}     Card examined expressions
    sp  {time}  {sign}     Card approved expressions
    sa  {time}  {sign}     Notes signature expressions
    
                           {time}  = Time expression
                           {sign}  = Signature expression
    
    Subset Generic Seletors:
    sf  {expr}             Formula expression
    
  • Example:
    sn   S1
    sN   K
    sD2  C Costs
    sV   20
    sf   K
    

    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.


    Contents Next