ipsplit
ipsplit
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)
filename: (FipSeq)
or output-name:
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:
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)
Eg:
; Absolute max size is approx 5000 more than 248000 (plus room for AMZ SNS
header)
max-take-size:248000
; start looking from 240000
check-from-size:240000
; Testing...
;;max-take-size:64000
;;check-from-size:60000
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
next
fixed:Q3 \V1E\$o
combie:Q4 Q3,S
splitter-string:\Q2
; splitter string is preserved and is added to the End of this file or the
Start of the next
add-splitter:\Q4
; D4 YES=split NO=not split, message is entire
fiphdr-is-split:D4
; D1 is seqno if split - from 1
fiphdr-take-no:D1
; D$ is max/total no of splits
fiphdr-total-takes:D$
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) :
Either
-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
path.
Or
-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.
-H : Extra FipHdr information to add on default: no
-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
---NOTES---
Version Control
; 1i 15jul25 bug big files, added -H
; 1f-h 30dec22 added multiple output copies ;h 25feb25 output filename as param
too
; 1a-e 20nov01 original skelly version/28jul21 ipsplit ;e 1apr22 bugette for
bad files
(copyright) 2025 and previous years FingerPost Ltd.