A SERVICE OF

logo

204 Chapter 3
Command Definitions C-E
DO
NOTE A word is defined as a grouping of characters delimited by a space, comma,
semicolon, =, (, ),
, ‘, tab.
Operation Notes
Reexecutes the command specified by cmdid. The user may specify an optional edit string to
edit the command before it is reexecuted. This command is a companion to the enhanced
MPE/iX version of the REDO command. Unlike REDO, the DO command does not permit
interactive editing.
If editstring is specified, the edit is performed on cmdid before the command is reexecuted.
The editstring must appear exactly as it would if you were using the REDO command.
Both cmdid and editstring must be surrounded by quotation marks (either " or ') if they
contain any delimiters such as ; " ' [, ], =, or a space.
Use
This command is available in a session or in BREAK. It is not available in a job or from a
program. Pressing
Break terminates recursive command executions from the history/redo
stack.
Editing Samples
Practical uses of the editing commands listed above are shown in Table 3-6.
c CHANGE. Changes all occurrences of one string to another in the current line when
the search string and replace string are properly delimited. A proper delimiter is a
nonalphabetic character (such as ', ", / or ,). The substitution is specified as:
c<delim> search-string<delim> [replace-string [<delim>]]. Omitting the
replace-string causes occurrences of search-string to be deleted, with no
substitution.
u UNDO. A single u in column one cancels the most recent edit of the current line.
Using the UNDO command twice in a row cancels all edits for the current line and
reestablishes the original, unedited line. If u is placed anywhere other than column
one of the current line, then a simple replacement is performed. UNDO makes sense
only if you have a line on which you have performed some editing that can be
"undone."
other Simple replacement. Any other character (not i, r, d, d>, >, >d, c, or u) causes that
character to be replaced in the current line at the position indicated by the
character. In fact, simple replacement also occurs for the editing characters i, r, c,
or > if they are not followed by text; or if > appears at or beyond the current end of
line.
Directive Effect