POSITION - position descriptors for the BSORT command.

Position descriptors are used to describe positions within records for key-items like "Before=" and "FRom=". Positions are given with numbers followed by an indication of units. The following units are recognized.

Asciicharacters, BYtes, Characters
equivalent to nine bits. This is the default if no units are specified with a number.
BcdCharacters
equivalent to six bits.
Bits
equivalent to a single bit.
Doublewords
equivalent to two full words (72 bits).
Eisdigits, Nibbles
equivalent to half a byte. Two nibbles/EIS-digits will always equal nine bits. One nibble/EIS-digit is five bits if it begins on a byte boundary, and four bits otherwise.
Words
equivalent to a full word (36 bits).

All positions are indexed from zero. Thus "FRom=10c" indicates that the key begins on the 11th character of the record.

Position descriptors may be concatenated into one long position. Thus

FRom=10w3by2b

indicates that the field begins with the third bit in the fourth byte of the 11th word of the record. When a position consists of more than one position descriptor, each descriptor MUST have a unit specified explicitly. Thus

FRom=10

defaults to "10c" but

FRom=10w3

is invalid.

The position descriptors may also be delimited by spaces, commas, or "+" signs, as in

FRom="10w 3by",Before="11w,2by"
Length=3w+2bits

Negative numbers are allowed in position descriptors, e.g.

Before=10w-1c

However, the final result must be positive when translated into bits. (Note that with +Raw input, you are allowed to back up past position zero into the RCW which normally precedes each record; however, you cannot back up past the start of the RCW.)

In general, keys may begin on any bit boundary; however, if the "Field=" or "Ignore=" item appears in the key-string, the key can only begin on a byte boundary. Furthermore, EIS comparisons may only be made on appropriate 4-bit or 9-bit boundaries.

See Also:

expl bsort
full description of BSORT
expl bsort batch
using BSORT in batch
expl bsort collate
collating orders
expl bsort errors
error handling
expl bsort examples
examples of BSORT operations
expl bsort keyopt
key options
expl bsort notes
miscellaneous notes
expl bsort options
general command line options

Copyright © 1996, Thinkage Ltd.