Skip to content

REMSORT

Remove Sort Sequence

This directive is used to remove a secondary sort sequence from an MSORT or TISAM file.

REMSORT file-name, SRT=sort-name, [,ERR=line-ref|,ERC=error-code]
file-name
is any string of 8 characters or fewer used to name this file.
sort-name
is any string of 20 characters or fewer that specifies the name of a sort sequence in an MSORT, or the number of a sort sequence in a TISAM file.
line-ref
is the program line number or label to branch to if this directive produces an error.
error-code
is a programmer-defined error code. Valid values are positive or negative whole numbers.

This directive is generally available starting with release level 8.1.

The MSORT directive need only define a single key. The ADDSORT directive provides for the addition of more keys, and the REMSORT directive provides for the deletion of specific key structures.

The first sort key sequence defined by the MSORT directive is the primary key of the
MSORT file and cannot be removed.

REMSORT "TEST", SRT="ZIPCODE"

removes the sort structure for secondary key named ZIPCODE from the MSORT file named “TEST”.

ADDSORT, DIRECT, ERASE, FILE, INDEXED, INITFILE, MSORT, SERIAL, SORT, TEXT, and TISAM directives

From the Thoroughbred Basic Language Reference, Volume III: R–Z, version 8.9.1. Open this page in the PDF