VMS Help  —  EDIT  /EDT
      Invokes the VSI Standard Editor (EDT) interactive text editor.

      Format

        EDIT/EDT  [file-name]

1  –  Parameter

 file-name

    Specifies the file to be created or edited using EDT. If the file
    does not exist, it is created by EDT.

    EDT does not provide a default file type when creating files; if
    you do not include a file type, it is null. The file must be a
    disk file on a Files-11 formatted volume.

    No wildcard characters are allowed in the file specification.

2  –  Qualifiers

2.1    /COMMAND

       /COMMAND[=file-name]
       /NOCOMMAND

    Determines whether or not EDT uses a startup command file. The
    /COMMAND file qualifier should be followed by an equal sign (=)
    and the specification of the command file. The default file type
    for command files is EDT. No wildcard characters are allowed in
    the file specification.

    The following command line invokes EDT to edit a file named
    MEMO.DAT and specifies that EDT use a startup command file named
    XEDTINI.EDT:

    $ EDIT/COMMAND=XEDTINI.EDT MEMO.DAT

    If you do not include the /COMMAND=command file qualifier,
    EDT looks for the EDTSYS logical name assignment. If EDTSYS
    is not defined, EDT processes the systemwide startup command
    file SYS$LIBRARY:EDTSYS.EDT. If this file does not exist, EDT
    looks for the EDTINI logical name assignment. If EDTINI is not
    defined, EDT looks for the file named EDTINI.EDT in your default
    directory. If none of these files exists, EDT begins your editing
    session in the default state.

    To prevent EDT from processing either the systemwide startup
    command file or the EDTINI.EDT file in your default directory,
    use the /NOCOMMAND qualifier as follows:

    $ EDIT/NOCOMMAND MEMO.DAT

2.2    /CREATE

       /CREATE (default)
       /NOCREATE

    Controls whether EDT creates a new file when the specified input
    file is not found.

    Normally, EDT creates a new file to match the input file
    specification if it cannot find the requested file name in the
    specified directory. When you use the /NOCREATE qualifier in the
    EDT command line and type a specification for a file that does
    not exist, EDT displays an error message and returns to the DCL
    command level as follows:

    $ EDIT/NOCREATE NEWFILE.DAT
    Input file does not exist
    $

2.3    /JOURNAL

       /JOURNAL[=journal-file]
       /NOJOURNAL

    Determines whether EDT keeps a journal during your editing
    session. A journal contains a record of the keystrokes you enter
    during an editing session. The default file name for the journal
    is the same as the input file name. The default file type is
    JOU. The /JOURNAL qualifier enables you to use a different file
    specification for the journal.

    The following command line invokes EDT to edit a file named
    MEMO.DAT and specifies the name SAVE.JOU for the journal:

    $ EDIT/JOURNAL=SAVE MEMO.DAT

    If you are editing a file from another directory and want the
    journal to be located in that directory, you must use the
    /JOURNAL qualifier with a file specification that includes the
    directory name. Otherwise, EDT creates the journal in the default
    directory.

    The directory that is to contain the journal should not be write-
    protected.

    To prevent EDT from keeping a record of your editing session, use
    the /NOJOURNAL qualifier in the EDT command line as follows:

    $ EDIT/NOJOURNAL MEMO.DAT

    Once you have created a journal, enter the EDT/RECOVER command to
    execute the commands in the journal. No wildcard characters are
    allowed in the file specification.

2.4    /OUTPUT

       /OUTPUT=output-file
       /NOOUTPUT

    Determines whether EDT creates an output file at the end of
    your editing session. The default file specification for both
    the input file and the output file is the same. Use the /OUTPUT
    qualifier to give the output file a different file specification
    from the input file.

    The following command line invokes EDT to edit a file named
    MEMO.DAT and gives the resulting output file the name OUTMEM.DAT:

    $ EDIT/OUTPUT=OUTMEM.DAT MEMO.DAT

    You can include directory information as part of your output file
    specification to send output to another directory as follows:

    $ EDIT/OUTPUT=[BARRETT.MAIL]MEMO.DAT MEMO.DAT

    The /NOOUTPUT qualifier suppresses the creation of an output
    file, but not the creation of a journal. If you decide that you
    do not want an output file, you can use the /NOOUTPUT qualifier
    as follows:

    $ EDIT/NOOUTPUT MEMO.DAT

    A system interruption does not prevent you from re-creating your
    editing session because a journal is still being maintained. To
    save your editing session, even when you specify /NOOUTPUT, use
    the line mode command WRITE to put the text in an external file
    before you end the session.

    No wildcard characters are allowed in the file specification.

2.5    /READ_ONLY

       /READ_ONLY
       /NOREAD_ONLY (default)

    Determines whether EDT keeps a journal and creates an output
    file. With the /NOREAD_ONLY qualifier, EDT maintains the journal
    and creates an output file when it processes the line mode
    command EXIT. Using the /READ_ONLY qualifier has the same effect
    as specifying both the /NOJOURNAL and /NOOUTPUT qualifiers.

    The following command line invokes EDT to edit a file named
    CALENDAR.DAT, but does not create a journal or an output file:

    $ EDIT/READ_ONLY CALENDAR.DAT

    Use the /READ_ONLY qualifier when you are searching a file and do
    not intend to make any changes to it. To modify the file, use the
    line mode command WRITE to save your changes. Remember, however,
    that you have no journal.

2.6    /RECOVER

       /RECOVER
       /NORECOVER (default)

    Determines whether EDT reads a journal at the start of the
    editing session.

    When you use the /RECOVER qualifier, EDT reads the appropriate
    journal and processes whatever commands it contains. The
    appropriate syntax is as follows:

    $ EDIT/RECOVER MEMO.DAT

    If the journal file type is not JOU or the file name is not the
    same as the input file name, you must include both the /JOURNAL
    qualifier and the /RECOVER qualifier as follows:

    $ EDIT/RECOVER/JOURNAL=SAVE.XXX MEMO.DAT

    Because the /NORECOVER qualifier is the default for EDT, you do
    not need to specify it in a command line.

3  –  Examples

    1.$ EDIT/OUTPUT=NEWFILE.TXT OLDFILE.TXT
          1       This is the first line of the file OLDFILE.TXT.
      *

    This EDIT command invokes EDT to edit the file OLDFILE.TXT.
    EDT looks for the EDTSYS logical name assignment. If EDTSYS
    is not defined, EDT processes the systemwide startup command
    file SYS$LIBRARY:EDTSYS.EDT. If this file does not exist, EDT
    looks for the EDTINI logical name assignment. If EDTINI is not
    defined, EDT looks for the file named EDTINI.EDT in your default
    directory. If none of these files exists, EDT begins your editing
    session in the default state. When the session ends, the edited
    file has the name NEWFILE.TXT.

    2.$ EDIT/RECOVER OLDFILE.TXT

    This EDIT command invokes EDT to recover from an abnormal
    exit during a previous editing session. EDT opens the file
    OLDFILE.TXT, and then processes the journal OLDFILE.JOU. Once
    the journal has been processed, the user can resume interactive
    editing.
Close Help