EDIT command

Use the EDIT command to enter data into the system. With EDIT and its subcommands, you can create, modify, store, submit, retrieve, and delete data sets with sequential or partitioned data set organization. You cannot, however, edit an SMS-managed partitioned data set extended (PDSE). The data sets might contain:
  • Source programs composed of program language statements such as PL/I, COBOL, FORTRAN, and so on.
  • Data used as input to a program.
  • Text used for information storage and retrieval.
  • Commands, subcommands, CLIST statements and data or all.
  • Job control language (JCL) statements for background jobs.
The EDIT command supports only data sets that have one of the following formats:
  • Fixed-blocked, unblocked, or standard block; with or without ASCII and machine record formats.
  • Variable-blocked or unblocked; without ASCII or machine control characters.

EDIT support of print control data sets is read-only. Whenever a SAVE subcommand is entered for an EDIT data set originally containing print control characters, the ability to print the data set on the printer with appropriate spaces and ejects is lost. If you enter SAVE without operands for a data set containing control characters, you are warned that the data set will be saved without control characters, and you can choose to either save into the original data set or enter a new data set name. If the data set specified on the EDIT command is partitioned and contains print control characters, you cannot enter SAVE.

When you have finished editing a data set with a variable-blocked record format, each record (line) is padded with blanks to the end of the record. When you save the data set, the blanks are eliminated and the length adjusted accordingly.

EDIT does not serialize on a member of a PDS, thus, it is possible for multiple users to edit the same member of the same PDS at the same time. This can result in only one user's changes being saved in the data set.

When using REXX to invoke PROMPT, PUTGET or subcommand INPUT processing in the background, you must use the REXX PROMPT function to activate input from the REXX stack. Regardless of the REXX PROMPT function setting, the REXX stack is queried first in foreground. If the system does not find any input, the TERMINAL is queried to satisfy the input. Regardless of the PROMPT setting, EDIT reads (“prompts”) the terminal for input. Only the REXX stack is queried for the command response input in background. In automated background processing, you can use the REXX PROMPT function setting to control whether the REXX stack is available for command or subcommand input or not.

For more information about using line mode edit, see Table 6. How EDIT Subcommands Affect the Line Pointer Value in Appendix B, Using Line Mode Edit of z/OS TSO/E User's Guide.