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
    add-splitter: (FipSeq)
    add-splitter-to-next: (FipSeq)
    add-splitter-to-previous: (FipSeq)
    case-sensitive: (FipSeq) yes/no
    check-from-size: (FipSeq)
    done-que: (FipSeq)
        or doneque : (FipSeq)
        or done-queue: (FipSeq)
    extra-fiphdr: (FipSeq)
    file-after: (FipSeq)
    file-before: (FipSeq)
    fiphdr-file-no: (FipSeq)
    fiphdr-seqno: (FipSeq)
    fiphdr-take-no: (FipSeq)
    fiphdr-total-takes: (FipSeq)
    fiphdr-is-split: (FipSeq)
    log : (FipSeq)
    max-take-size: (FipSeq)
    min-file-size: (FipSeq)
    output  : (FipSeq)
        or outque  : (FipSeq)
        or output-queue: (FipSeq)
    copyque-9:  (1-9)
    script  : (FipSeq)
    split-every: (FipSeq)
    splitter-string: (FipSeq)
    take-start-no: (FipSeq)
    take-start-seqno: (FipSeq)
    zap-splitter: (FipSeq)

less used - tracing :
    file-trace: (FipSeq)
    file-trace-log: (FipSeq)
    file-trace-name: (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
; 1f-g  30dec22 added multiple output copies
; 1a-e  20nov01 original skelly version/28jul21 ipsplit ;e 1apr22 bugette for
bad files

(copyright) 2024 and previous years FingerPost Ltd.