This program will split files according to one or more criteria
    - size
    - presence of a splitter string

Keywords for SPLIT parameter file are :
    ; comment line
    splitter-string: (FipSeq)
    file-before: (FipSeq)
    file-after: (FipSeq)
    fiphdr-take-no: (FipSeq)
    fiphdr-total-takes: (FipSeq)
    fiphdr-file-no: (FipSeq)
    fiphdr-seqno: (FipSeq)
    fiphdr-is-split: (FipSeq)
    case-sensitive: (FipSeq)
    max-take-size: (FipSeq)
    check-from-size: (FipSeq)
    min-file-size: (FipSeq)
    take-start-seqno: (FipSeq)
    take-start-no: (FipSeq)
    add-splitter-to-previous: (FipSeq)
    add-splitter-to-next: (FipSeq)
    zap-splitter: (FipSeq)
    add-splitter: (FipSeq)
    split-every: (FipSeq)


; Absolute max size is approx 5000 more than 248000 (plus room for AMZ SNS

; start looking from 240000

; Testing...

option:V1   KZ,,,,SEC
; if SEC, look for just a NEW LINE \n; all others, look for a '%'
fixed:Q1    \V1\n\$o
combie:Q2   Q1,%
; if SEC, add the \n to the END of the previous; all others the % STARTS the
fixed:Q3    \V1E\$o
combie:Q4   Q3,S

; splitter string is preserved and is added to the End of this file or the
Start of the next

; D4 YES=split NO=not split, message is entire

; D1 is seqno if split - from 1

; D$ is max/total no of splits

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

Input Parameters are (all optional) :
    -1 : path/filename for single shot      default: spooled
        The input file is NOT deleted
        If this does NOT start with a '/', it is assumed relative to the current
    -i : input queue                default: spool/2split
        If this does NOT start with a '/', it is assumed under spool.
    -d : done queue                 default: none
        If this does NOT start with a '/', it is assumed under spool.
    -l : do NOT log files in                default: log
    -w : file wait for files arriving across a network. default: 8 secs
    -z : default parameter file in tables/setup     default: SPLIT
        the FipHdr field DF holds the name; this is the default
    -Z : force all files to use the default parameter file and do NOT use DF
default: use DF
    -v : print version number and exit


Version Control
; 1a-d  20nov01 original skelly version/28jul21 ipsplit

(copyright) 2021 and previous years FingerPost Ltd.