HP 3000 Manuals

Sort Ascending [ HP EDIT Reference Manual ] MPE/iX 5.0 Documentation


HP EDIT Reference Manual

Sort Ascending 

Purpose 

Sorts lines in ascending order.

Default Syntax 

None

This command does not have a default key assignment.  You can either
assign a key to the command using the Assign Key command or issue the
command using Execute Editor Command.

Description 

This command sorts a specified number of lines in ascending order.  When
you execute this command, HP EDIT sorts the lines using predefined left
and right column boundaries to define the sort key field.

You can assign values for these boundaries using the Define Sort Key
Columns command.  You should assign the values before executing the Sort
Ascending command.  If you do not assign values, the entire line is
considered the sort key field.

Procedure 

To sort several lines: 

   1.  Move the cursor to a column anywhere on the first line of the
       group to be sorted.
       [REV BEG]

   2.  Either type a count or select a block.  This value represents the
       number of lines you want to sort beginning at the current
       line.[REV END]

   3.  Issue Execute Editor Command (E). HP EDIT displays the prompt
       Command:  on the message line.

   4.  Type sort ascending and press Return.  HP EDIT sorts the group of
       lines in ascending order.  HP EDIT generally places sorted blank
       lines before sorted non-blank lines.

Example 

To sort the following lines: 

            Second
            Third
            First

   1.  Move the cursor to a column anywhere on the first line.

   2.  Type 3 as the count.

   3.  Issue Execute Editor Command (E). HP EDIT displays the prompt
       Command:  on the message line.

   4.  Type sort ascending and press Return.  HP EDIT sorts the lines as
       shown:

            First
            Second
            Third

Related Commands 

       Define Sort Key Columns
       Sort Descending



MPE/iX 5.0 Documentation