sffsort

sffsort

Sort a file with a FipHdr and either strip or replace the FipHdr afterwards.

Note that sffsort is a shell to the default sort on the server. On Linux there
are often 2 'sort' programs - POSIX and old Unix. You should check which one is
in use on your server.

Input Parameters are :
    -i : input filename     default: none
        This can be in FipSeq eg /fip/spool/formsave/\S1.xml
    -e : add extra FipHdr fields    default: none
    -E : name of file with a extraFipHdr fields if using FipSeq in '-i'
    -H : Strip FipHdr afterwards    default: leave
    -l : name of locale         default: current system locale
    -o : output filename        default: to screen
    -P : path of sort to use    default: sort
    -Q : quiet mode - no errors if input file NOT found default: log error
    -s : valid sort string in dbl quotes.   default: none
        The default is that setup for the system which is normally a straight
ascending sort.
    -W : input filename has a wild card - so do not try to rip off the FipHdr.
    -v : version number and stop

The last parameter MAY be the input filename and this will be used if there is
no '-i' flag.

There should be NO spaces between flag and data
    ie -s"-bn +3rn -4"

Do NOT specify either the input nor output filename in the sort string (-s).

example with an external FipHdr file and wild cards in the input string
    sffsort -s'-t\| +1 -2' -i'/fip/data/sdi/lookups_car/\RL_\RS_*' -ohoho
-Eefh4sffsort -W

The default sort program is used. To use another, specify the full path and
name for the -P switch
    eq -P /fip/3rdparty/sort
To specify
Version Control
;00h    21may01 chris original version
        ;c 07nov01 added locale
        ;d-e 01sep11 -i is now FipSeq, added -W and -E, program returns the return of
the sort ;e fip_dequote
        ;f 29jul13 added -P sortprogram
        ;h -Q added

(copyright) 2024 and previous years FingerPost Ltd.