RANGE

Syntax

── RANGE ─┬────────────────────────────────────────────────────────┬───┤
          │ ┌◄───────────────────────────────────────────────────┐ │
          └─┴─┬─/1\─<file title>───────────────────────────────┬─┴─┘
              ├─/1\─<sequence range list>──────────────────────┤
              │                 ┌◄───────────────────────────┐ │
              └─/1\─ : ── TEXT ─┴─┬────────────────────────┬─┴─┘
                                  └─ , ─┬─/1\─ PAGEFORMAT ─┤
                                        ├─/1\─ SQUASHED ───┤
                                        └─/1\─ TRUNCATED ──┘

Explanation

The RANGE command displays the number of lines within one or more sequence ranges of a file (by default, the work file). The lowest and highest sequence numbers in the sequence range or ranges are also displayed.

The <file title> construct specifies the file for which the range information is to be displayed; this file can be any file to which the user is allowed access. If unspecified, the work file is assumed. In this case, an update is done before the RANGE command is invoked.

The <sequence range list> construct limits the ranging to particular areas of the file; the default is the entire file. If a <sequence range> in the <sequence range list> consists of a single sequence number or the single keyword END, the sequence numbers (and optionally, the text) of the preceding and succeeding lines are also displayed.

The TEXT option causes entire lines to be printed in the range output, instead of sequence numbers only. When the TEXT option is used and the PAGEFORMAT option is not specified, all lines that have been marked with the current MARKID will have an asterisk between the sequence number and the rest of the line. For more information on the MARKID, refer to the GET command, the MAKE command, and the MARKID command.

The three output format options available are PAGEFORMAT, SQUASHED, and TRUNCATED. These options affect the text as described below.

When the PAGEFORMAT option is specified, the output appears in a format similar to the page mode output. That is, the full length of the sequence number field is displayed, immediately followed by the contents of the text field (the blank or asterisk flag character is omitted).

When SQUASHED is specified, any group of multiple blanks is reduced to a single blank.

When TRUNCATED is specified, the record is truncated if the text portion of a record does not fit in the available line width of the terminal.

Examples

LIST
100 one
200 two
300 three
400 four
500 five
600 six
700 seven
800 eight
900 nine
1000 ten
#

RANGE
# 10 RECORDS: 100 THRU 1000
#
RANGE:TEXT,PA
# 10 RECORDS:
00000100one
 THRU
00001000ten
# 
RANGE 500
400, 500, 600
#

RANGE 500:TEXT
400 four
500 five
600 six
#
RA 100-300,400-END,1025-1050
# 3 RECORDS: 100 THRU 300

# 7 RECORDS: 400 THRU 1000

#NO RECORDS IN 1025-1050
#

RA 550:TEXT
500 five
600 six
# 

The following example shows the RANGE command used with the TEXT option when some of the lines in the file have been marked with the current MARKID:

RA 550:TEXT
500*five
600*six
#