ProgramEdit

Sort Lines Help

PgmEdit - Sort Lines

PgmEdit home

The Tools/Sort Lines function enables Lines to be sorted Alphabetically or Numerically with Direction, Selection and Case options.

1.  Sort Key

The Sort Key determines the order of sorting.  It can either be the line itself or a specified column of text.
If the Starting column is "1" and the Number of characters is "0"(all characters), the entire line is the Sort Key.
Otherwise the Sort key starts at the Starting column and is the specified Number of characters wide.

CAUTION - If HT (Horizontal Tab) characters are in a line, the "Starting column of sort key" must the character number (from 1 to n), not the Column number.

2.  Sort Mode - The Sort Mode can be either Alphabetic or Numeric.

a.  An Alphabetic Sort sorts per the ASCII code of the characters.  For example, number character codes (48-57) come before Capital letters (65-90) which in turn come before small letters (97-122).

b.  For a Numeric Sort, the Sort Keys must be numbers, and the sort order is based on the value of the numbers.  Numbers can be any mix of Integer, Decimal/Floating Point, Exponential, Hexadecimal or Octal formats:   10  1,234   10.52   1E-1  1.012E1   &HA6   &O11

3.  Direction

Sort Direction is either Ascending (A-Z) or Descending (Z-A).

4.  Options

a.  Selected Lines only - If this box is checked, only the lines selected will be sorted.  Otherwise all lines will be sorted.

b.  Case sensitive - If this box is checked, Capital letters come before small letters.  Otherwise "A" and "a" etc. have equal sort weights.