z/OS ISPF Edit and Edit Macros
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


AUTONUM—Set or Query Autonum Mode

z/OS ISPF Edit and Edit Macros
SC19-3621-00

The AUTONUM macro command sets autonum mode, which controls the automatic renumbering of data when it is saved.

The AUTONUM assignment statement either sets autonum mode or retrieves the current setting of autonum mode and places it in a variable.

Syntax

Read syntax diagramSkip visual syntax diagram
Macro command syntax

                     .-ON--.   
>>-ISREDIT--AUTONUM--+-----+-----------------------------------><
                     '-OFF-'   

ON
Turns on automatic renumbering. When number mode is also on, the data is automatically renumbered when it is saved.
OFF
Turns off automatic renumbering. Data is not renumbered.
Read syntax diagramSkip visual syntax diagram
Assignment statement syntax

>>-ISREDIT--(varname)-- = --AUTONUM----------------------------><

Read syntax diagramSkip visual syntax diagram
                          .-ON--.   
>>-ISREDIT--AUTONUM-- = --+-----+------------------------------><
                          '-OFF-'   

varname
The name of a variable containing the setting of autonum mode, either ON or OFF.
ON
Same as macro command syntax.
OFF
Same as macro command syntax.

Description

When number mode is on, the first line of a data set or member is normally line number 000100, the second number is 000200, and so on. However, as lines are inserted and deleted, the increments between line numbers can change.

For example, you might think that when a line is inserted between 000100 and 000200, line 000200 would be given the number 000300 and the new line would become 000200. Instead, the existing lines retain their numbers and the new line is given line number 000110.

Therefore, if the original line number increments are important to you, AUTONUM renumbers your lines automatically so that the original increments are maintained.

Autonum mode is saved in the edit profile.

Return codes

0
Normal completion
20
Severe error

Examples

To turn autonum mode on:
ISREDIT AUTONUM ON
or
ISREDIT AUTONUM = ON
To turn autonum mode off:
ISREDIT AUTONUM OFF
or
ISREDIT AUTONUM = OFF

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014