PMDF User's Guide
OpenVMS Edition


Previous Next Contents Index


EDIT

Invoke the editor to edit or view a file.

Syntax

EDIT [in-file-spec]

Qualifiers Defaults
/COMMAND=cmd-file-spec Editor dependent
/CREATE None
/JOURNAL=jou-file-spec Editor dependent
/OUTPUT=out-file-spec /OUTPUT=in-file-spec
/READ_ONLY None
/RECOVER None

Parameters

in-file-spec

Optional parameter specifying the name of the file to edit.

Description

The EDIT command invokes the editor selected with the SET EDITOR command. If an input file is specified, then that file will be edited. Otherwise, the editor will be invoked with no input file specified. When you exit the editor, control is returned to PMDF MAIL.


Qualifiers

/COMMAND=cmd-file-spec

/NOCOMMAND

The /COMMAND qualifiers specifies the name of an EDT or TPU startup command file. When no command file is specified, the default EDTINI.EDT or TPU$COMMAND.TPU file set up for the DCL EDIT/EDT or EDIT/TPU command will be used. The /NOCOMMAND qualifier specifies that no startup file is to be used. These two qualifiers have no effect when used with any editor other than EDT or TPU.

/CREATE

/NOCREATE

When you specify /CREATE, the input file will, before the editor is invoked, be created if it does not already exist. If you did not specify an input file name, then you will be prompted for one. If you specify /NOCREATE, then the editor will immediately exit if the input file does not exist. The /NOCREATE qualifier can only be used with the EDT and TPU editors; it has no effect when any other editor is used.

/JOURNAL=jou-file-spec

/NOJOURNAL

With the /JOURNAL qualifier, you can specify the name of a journal file to be opened when EDT or TPU is invoked. To prevent a journal file from being opened, specify /NOJOURNAL. These two qualifiers have no effect when any other editor is used.

/OUTPUT=out-file-spec

/NOOUTPUT

Specify the name of the output file to generate upon exiting the editor. When the /NOOUTPUT qualifier is used, the editor is invoked in a "read only" mode. However, unlike the /READ_ONLY qualifier, a journal file will be created. The /NOOUTPUT qualifier has no effect when used with any editor other than EDT or TPU.

/READ_ONLY

Invoke the editor in a "read only" mode. No journal file or output file will be produced. If the input file does not exist, then the editor will immediately exit. This qualifier has no effect when used with any editor other than EDT or TPU. If you use EDT, then when you exit you must use EDT's QUIT command; if you use EDT's EXIT command, then you will have to supply a file specification.

/RECOVER

Recover a previous EDT or TPU editing session which was prematurely aborted and for which a journal file exists. This qualifier has no effect if used with any editor other than EDT or TPU

Examples

#1

EMAIL> EDIT REPLY.TXT
  .
  .
  .
EMAIL> SEND REPLY.TXT
      

In the above example, the editor is invoked to edit the file REPLY.TXT. After the editor is exited, control is returned to PMDF MAIL at which point the file is mailed with the SEND command.

#2

EMAIL> EDIT/READ_ONLY LOGIN.COM
      

This example shows how to invoke the editor to read the file LOGIN.COM. The /READ_ONLY qualifier causes the file to be accessed in a read only mode.


Previous Next Contents Index