sorts files with fixed or variable record size in three passes respecting Czech language rules.
Input and output file names are expected as OKsort command line parameters. Long file names are not supported. The second file name can be omitted, in this case the sorted text goes to screen. OKsort works like a standard input/output filter when both file names are omitted.
When output file already exists, OKsort ask for permission to overwrite: Výstupní soubor už existuje. Přepsat (A/N) ? Press A (=yes) to allow or use parameter /O (=do not ask).
Parameters may start with slash / or hyphen - and are not case sensitive. Some parameters require a value which may be written as in any of the following examples:
/PositionOfKey=10 /p10 -pos: 10 -p0x0A /P0Ah
OKsort also works with text files with variable record size. In this case the /R= parameter must not be specified. A text record (i.e. line) is row of characters terminated with LineFeed (ASCII 10).
Sorting reorders records in such a way that sort keys are in monotonous progression. The key is identical with the whole record by default but can be made shorter (/SizeOfKey=) and can start at any offset withing the record. Default offset is /Position=0. Sort key size is limited to 16384.
Program sorts in ascending progression by default; this can be reversed with /D(escending) parameter.
In the Czech language diphtongs "ch", "Ch" and "CH" are being sorted between letters "H" and "I". This rule can be supressed with /C parameter.
OKsort removes redundant (two or more adjacent) spaces and replaces them with single space before collation. This can be supressed with /V.
Some file formats (e.g. dBIII) start with a header which should stay intact. Use parameter /H= to specify number of bytes which are to be copied to output untouched.
In case of text files (/R= omitted) this parameter /Header= specifies how many lines of text is to be copied verbatim.
If the input file size is not an integer multiply of /record size, the last incomplete record is virtually completed with ASCII (0).
If the last line of text file is not terminated with ASCII (10), the missing LineFeed will be virtually appended to it.
The EOF marker ASCII (26) is appended to the output only if it was found in the input file. Parameter /Y tells OKsort to never append EOF marker, parameter /Z means always append EOF.
Using one of the parameter /ASCII7bit, /ISO8859-2, /Kamenicky, /Latin2 or /WindowsCP1250 tells OKsort which codepage is the sorted file using. Codepage is autodetected from input text if none of these parameters is specified.
OKsort can use external 3pass sort weight tables specified with /T=file. Size of such file must be 3*256=768 bytes. You can use SortKit utility to create an external table.
After the input file is read, OKsort reports some diagnostic information on standard error output. This info can be supressed with /N. Example:
Vstup : *Standard input Výstup : *Standard output Kódování : *PC Latin2 detected codepage Velikost dat : 507580 B file size Počet záznamů: 10065 number of records Spotřeba XMS : 656 KB XMS memory allocated Předtříděno : 100 % pre-sort phase completed Zatříděno : 100 % merge phase completed Trvání : 5 s time elapsed
Program requires DOS or compatible emulation, CPU Intel386 or higher, 256KB of conventional memory and some additional memory. Size of required additional memory can be calculated as input file size plus 4 bytes per record of fixed size and 8 bytes per record of variable size. This additional memory is allocated by OKsort from DOS/VDM resources in the following order:
OKsort limits:
max. record size 268 402 688 bytes max. sort key length 16 384 characters max. number of records 13 420 544 (variable size) max. number of records 44 736 512 (fixed size)