table:MATCHDETAILS  field:3     file:teams  addmissing:SOCCER|NEWTEAM|\ZK|\ZD
table:MATCHDETAILS  field:4     file:teams  default:BING
table:COMPETITIONS  field:2     file:comps
table:COMPETITIONS  field:7     lookup:sels

lookup:sels Div*1=D1 Div*2=D2 Div*3=D3 Div*4=D4
file:teams  keylen:5    keytype:u

table: (tablename)  (list of table entries ..)  (eoln)
    subkeywords for 'table' are :
        field: fieldnumber starting at 3 for the first field as the first two
            are DATABASE|TABLE eg:
            database| table|    field3   field4
        file: name of file in tables/skey containing a list of keys and searches
        lookup: name of a lookup table specified in this parameter file somewhere
            There can be either a 'file' or a 'lookup' per table but not both.
    The following are what to do if the field has no match. If nothing is
    specified, the original data is left.
        addmissing: add an extra record
                a (unique) key is determined
                an entry is added to the file
                if there is a subparam, it is used to create a output
                    record before this one.
            where ZK is the key and ZD is the data and ZO is the original
            remember to add dbl quotes if spaces are to be embedded
        zap:    ignore this whole line !
        default: make this the default
            remember to add dbl quotes if spaces are to be embedded
            default:"** Missing Key **"
            again field \ZO is available
        Note that fields ZK, ZD and ZO must NOT have any HASHES (#) as this
        chr terminates the field.

The 'lookup' keyword is specified by :
    lookup: (tablename) (list of table entries ..)  (eoln)
    eg  lookup:abc  1=a 2=b 3=c 4=d 5=e 6=f
The list of lookup table entries are a number of entries delimitied by spaces
and/or tabs. If embedded spaces/tabs are needed, double quote the entry. The
condition is considered passed (or failed if the "!=" is used) if at least one
of the entries is matched.

The 'file' keyword is used to specify a maximum size and type of key :
    file: (name of file)    keylen: (size)  keytype: (type)

file is the name of a file in tables/stat/key
    and has the format
    (opt spcs) (key) (spcs) (search text)   (opt spcs)

    LIVER   Liv*pool

    - wild cards can be specified using a '*' or a '?'.
    - embedded spaces and control chrs - use double quotes and/or FipSeq for both
key and text
    - lines may be commented by a leading ';'
    - The search is assumed to START with the first chr, but the remainder is
wildcarded :
        ALBI    Albion
        will find :
            Albion Rovers
            Albion United
            Albion City
        but NOT
            Perfidious Albion
    - keys can be sized and typed using 'keylen:' and 'keytype:'
    - size can be 0 for no checking on size
    - Valid types are :
            u - uppercase (any lowercase is forced uppercase)
            l - lowercase (any uppercase is forced lowercase)
            a - alphabatic
            x - alphanumeric
            n - numbers only
            p - printables (anything above SPC and NOT accented)
            b - binary anything goes.

Other parameters - all optional - are :

    sep:|       Character to use as a field separator   default: '|'
    before:     FipSeq string to add BEFORE any data    default: none
    after:      FipSeq string to add AFTER  any data    default: none
    befline:    FipSeq string to add BEFORE each line   default: none
    aftline:    FipSeq string to add AFTER  each line   default: none
    script:     Script to run on the output file.   default: none
    dest:       FIP Destination to sent to for spooled  default: 'skey'
            queues. (not that single shot files stay
            where they are)
    doneq:      For spooled queues, a done queue    def: file deleted
            for the input file.
    chrset:     Chrset for the output file.
    filename:   New filename for output file    default: as input
    fiphdr:     Additional FipHdr information   default: none

Where sections of FipHdr fields are required or changes to the output style,
use keywords : fixed, partial, combie, optional, repeat, newdate and/or style.
(see The SysAdmin manual for more information).

    They are normally specified :
        fixed:QZ    1234543
        partial:QT  ST,3,2,U,<,>
        combie:QY    ep|na,(0000000)a 
        option:QE    ep,11,7,s
        repeat:QK    XK,-,3  
    or  repeat:QP    PK,,4,#X
        style:QS    XN,%.03d

Where the data lines have the similar information and often the same key, to
make things faster, you can cache the results. Beware however if you have
similar data - CHESTER and COLCHESTER for example - in this case we recommend
you do NOT cache. The default is NO caching.

Input Parameters are :
    -i : input queue            default: spool/statkey
        If this does NOT start with a '/', it is assumed under spool.
OR  -1 : name of a single file (complete path pls)  default: spooled queue
        This will run the program once for that file only
        The input file is NOT deleted.
    -o : output or done queue for output file. default: spool/2go
        If this does NOT start with a '/', it is assumed under spool.
        Any original file in the output queue is overwritten.
    -z : default parameter file in tables/stat. def: STAT_KEY
    -w : file wait for files arriving across a network. def: 0 secs
    -u : owner if not that of the logon default: logon at start
    -l : do NOT log files in        default: log
    -C : cache results          default: no
    -x : display results            default: no
    -X : display results and prompt on a missing    default: no
    -v : print version number and exit

(copyright) 2024 and previous years FingerPost Ltd.