z/OS TSO/E User's Guide
Previous topic | Next topic | Contents | Contact z/OS | Library | PDF


Edit Mode

z/OS TSO/E User's Guide
SA32-0971-00

You can enter subcommands to edit data sets when you are in edit mode. You can edit data sets that have line numbers by referring to the number of the line that you want to edit. This is called line-number editing. You can also edit data by referring to specific items of text within the lines. This is called context editing. A data set having no line numbers can be edited only by context. Context editing is performed by using subcommands that refer to the current line value or a character combination, such as with the FIND or CHANGE subcommands. There is a pointer within the system that points to a line within the data set. Normally, this pointer points to the last line that you referred to. You can use subcommands to change the pointer so that it points to any line of data that you choose. You can then refer to the line that it points to by specifying an asterisk (*) instead of a line number. Table 1 shows where the pointer points at completion of each subcommand.

Note: A current-line pointer value of zero refers to the position before the first record, if the data set does not contain a record zero.

When you edit data sets with line numbers, the line number field is not involved in any modifications made to the record except during renumbering. Also, the only editing operations that is performed across record boundaries is the CHANGE and FIND subcommands, when the TEXT and NONUM operands have been specified for the EDIT command. In CHANGE and FIND, an editing operation is performed across only one record boundary at a time.

Table 1. How EDIT Subcommands Affect the Line Pointer Value
EDIT Subcommands Description Pointer Value at Completion
ALLOCATE Allocates data sets and file names. No change
ATTRIB Builds a list of attributes for non-VSAM data sets. No change
BOTTOM Moves the pointer to the last record in the data set. Last line (or zero for empty data sets)
CHANGE Alters the contents of a data set. Last line changed
CKPT Protects input or modifications to a data set. No change
COPY Copies records within the data set. Last line copied
DELETE Removes records. Line preceding deleted line (or zero if the first line of the data set has been deleted)
DOWN Moves the pointer toward the end of the data. Line n relative lines below the last line referred to, where n is the value of the count operand, or bottom of the data set (or line zero for empty data sets)
END Terminates the EDIT command. No change
EXEC Executes a CLIST or REXX exec. No change
FIND Locates a character string. Line containing specified string, if any; else, no change
FORMAT (part of a program product) Formats and lists data. No change
FREE Releases previously allocated data sets. No change
HELP Explains available subcommands. No change
INPUT Prepares the system for data input. Last line entered
INSERT Inserts records. Last line entered
Insert/Replace/Delete Inserts, replaces, or deletes a line. Inserted line or replaced line or line preceding the deleted line if any (or zero, if no preceding line exists).
LIST Prints out specific lines of data. Last line listed
MERGE (part of a program product) Combines all or parts of data sets. Last line
MOVE Moves records within a data set. Last line moved
PROFILE Specifies characteristics of your user profile. No change
RENUM Numbers or renumbers lines of data. Same relative line
RUN Causes compilation and execution of data sets. No change
SAVE Retains the data set. No change or same relative line
SCAN Controls syntax checking. Last line scanned, if any
SEND Allows you to communicate with the system operator and with other users. No change
SUBMIT Submits a job for execution in the background. No change
TABSET Sets the tabs. No change
TOP Sets the pointer to zero value. Zero value
UNNUM Removes line numbers from records. Same relative line
UP Moves the pointer toward the start of the data set. Line n relative lines above the last line referred to, where n is the value of the count operand, (or line zero for empty data sets).
VERIFY Causes current line to be listed whenever the current line pointer changes or the text of the current line is modified. No change

Go to the previous page Go to the next page




Copyright IBM Corporation 1990, 2014