The
NUMBER macro command sets number mode, which controls the numbering
of lines in the current data.
The NUMBER assignment statement
either sets number mode, or retrieves the setting of number mode and
places it in variables.
Syntax
Macro command syntax
>>-ISREDIT--NUMBER---------------------------------------------->
(1)
.-+-STD---+-----.
.-ON-. | '-COBOL-' |
>--+-+----+--+---------------+--+---------+-+------------------><
| +-STD COBOL-----+ '-DISPLAY-' |
| +-NOSTD---------+ |
| +-NOCOBOL-------+ |
| '-NOSTD NOCOBOL-' |
'-OFF------------------------------------'
Notes:
- STD is the default for non-COBOL data set types. COBOL is
the default for COBOL data set types.
- ON
- Automatically verifies that all lines have valid numbers in ascending
sequence and renumbers any lines that are either unnumbered or out
of sequence. You can also use the RENUM command to turn number mode
on and renumber lines.
The editor interprets the STD, COBOL, and
DISPLAY operands only when number mode is turned on.
- OFF
- Turns number mode off. You can also use the NONUMBER command to
turn number mode off.
- STD
- Numbers the data in the standard sequence field.
- COBOL
- Numbers the data in the COBOL field.
Note: The NUMBER ON COBOL
mode is not supported for formatted data sets.
Attention: If number mode is off, make sure the first 6 columns
of your data set are blank before using either the NUMBER ON COBOL
or NUMBER ON STD COBOL command. Otherwise, the data in these columns
is replaced by the COBOL sequence numbers. If that happens and if
edit recovery or SETUNDO is on, you can use the UNDO command to recover
the data. You can also use CANCEL at any time to end the edit session
without saving the data.
- STD COBOL
- Numbers the data in both fields.
If both STD and COBOL numbers
are generated, the STD number is determined and then used as the COBOL
number. The COBOL numbers can be out of sequence if the COBOL and
STD fields were not synchronized. Use RENUM to force synchronization.
- NOSTD
- Turns standard number mode off.
- NOCOBOL
- Turns COBOL number mode off.
- NOSTD NOCOBOL
- Turns both the standard number mode and COBOL number mode off.
- DISPLAY
- Causes the width of the data window to include the sequence number
fields. Otherwise, the width of the window does not include the sequence
number fields. When you display a data set with a logical record length
of 80 and STD numbering, the sequence numbers are not shown unless
you are using a 3278 Model 5 terminal, which displays 132 characters.
Automatic left or right scrolling is performed, if required, so that
the leftmost column of the data window is the first column displayed.
Assignment statement syntax
>>-ISREDIT--(var1,var2)-- = --NUMBER---------------------------><
>>-ISREDIT--NUMBER-- = ----------------------------------------->
.-ON-. .-STD-----------.
>--+-+----+--+---------------+--+---------+-+------------------><
| +-COBOL---------+ '-DISPLAY-' |
| +-STD COBOL-----+ |
| +-NOSTD---------+ |
| +-NOCOBOL-------+ |
| '-NOSTD NOCOBOL-' |
'-OFF------------------------------------'
- var1
- The name of a variable to contain either ON or OFF.
- var2
- The name of a variable to contain one of the eight combinations
in this list:
NOSTD NOCOBOL DISPLAY
STD NOCOBOL DISPLAY
NOSTD COBOL DISPLAY
STD COBOL DISPLAY
NOSTD NOCOBOL NODISPL
STD NOCOBOL NODISPL
NOSTD COBOL NODISPL
STD COBOL NODISPL
The value STD, COBOL, or DISPLAY can be placed in var2,
even when var1 is set to off. This allows
the macro to save and restore number mode. It also allows the macro
to set number mode off, while specifying defaults to be used when
number mode is changed to on.
- ON
- Same as for macro command syntax.
- OFF
- Same as for macro command syntax.
- STD
- Same as for macro command syntax.
- COBOL
- Same as for macro command syntax.
- NOSTD
- Turns standard number mode off.
- NOCOBOL
- Turns COBOL number mode off.
- NOSTD NOCOBOL
- Turns both the standard number mode and COBOL number mode off.
- STD COBOL
- Same as for macro command syntax.
- DISPLAY
- Same as for macro command syntax.
Description
When number mode is on, NUMBER
verifies that all lines have valid numbers in ascending sequence.
It renumbers any lines that are either unnumbered or out of sequence,
but it does not otherwise change existing numbers.
In number
mode, the editor automatically generates sequence numbers in the data
for new lines that are created when data is copied or inserted. The
editor also automatically renumbers the data when it is saved if autonum
mode is in effect.
If the number overlays the shift-in (SI)
or shift-out (SO) characters, the double-byte characters are displayed
incorrectly and results are unpredictable.
Return codes
- 0
- Normal completion
- 20
- Severe error
Examples
To save the current value of number
mode, set number mode off for processing, and then restore the value
of number mode:
ISREDIT (STAT,VALUE) = NUMBER
ISREDIT NUMBER OFF
...
ISREDIT NUMBER = (STAT VALUE)