oedit — Edit files in a z/OS UNIX file system

Format

oedit [–r xx] [file…]

Description

Use oedit to edit a file in the z/OS® UNIX file system. This command uses the TSO/E OEDIT command and must be run in the foreground. The 3270 passthrough mode is used to invoke the TSO/E OEDIT command under OMVS.

You can specify any number of files; the TSO/E OEDIT command is invoked once for each file. If you do not specify a file name, the Edit Entry panel is displayed. From that panel, you can enter the directory name and file name of an existing file, or you can specify a directory name and file name for a new file. The Edit Entry panel also lets you specify an edit profile and an initial edit macro.

The file name can be absolute or relative. Avoid using single quotation marks or parentheses within the file name. Avoid using spaces or single quotation marks within path names.

Options

–r xx
Set the record length to be edited for fixed length text files. xx is the record length.

If –r xx is specified, the file is processed as variable length but loaded into the editor as fixed-length records and saved as fixed-length records. This lets you convert a variable length file to fixed length. If any lines are longer than the specified record length, the edit session will not load the file and will issue the customary message that a line is too long.

Usage notes

  1. ASCII files must be tagged as ISO8859-1 in order for oedit to automatically translate the file. Do not enter the OEDIT session and type SOURCE ASCII.
  2. oedit attempts to load the file into a VB255 session. If this is an ISPF that supports wide edit (such as ISPF 4.1) and any line exceeds 235 characters, the width for the new session is the length of the longest line plus 25% to allow for some expansion.
  3. The COPY command cannot copy in files that have records wider than the edit session.
  4. oedit attempts to open an existing file as read/write. If this fails, it attempts opening the file read-only to allow the user to view the file. Changes that are made in this mode cannot be saved to the file. If changes are made, the edit session must be ended using the ISPF CANCEL primary command. However, you can use the ISPF CREATE and REPLACE primary commands to save all or part of the changed file to another file before you cancel the edit session.
  5. oedit passes the effective UID of its process to the TSO session. If the EUID does not match the EUID of the TSO process, the OEDIT TSO command attempts to set the effective UID of the TSO process to that of the shell command before loading the file.
  6. You cannot use oedit if you used rlogin or telnet to access the z/OS shell.
  7. The TSO region size must be large enough to hold the size of the file to be edited.
  8. Two ISPF variables are available to edit macros:
    • HFSCWD, which contains the path name for the directory in which the file that is being edited resides.
    • HFSNAME, which contains the name of the file that is being edited.

Environment variables

BPXWISHISPF
By default, starting in V1R11, the ISPF edit dialog service is used when editing z/OS UNIX files. Specify BPXWISHISPF=NO if you want oedit to use the original dialog service.
BPXWPERM
Specifies the default open permissions used by oedit. Permissions are specified in octal format. The supplied permissions are not validated and the number is used as the file mode on an open() call. If the file already exists, the permissions are not changed. If the environment variable is not set, oedit works as before, using 0700 as the default permissions.

Exit values

0
The TSO/E OEDIT command was invoked for each specified file.
1
Failure because oedit could not access at lease one file because single quotation marks or parentheses were used in the file name.
2
Failure because oedit could not set the 3270 passthrough mode.