Previous | Contents | Index |
Invokes EDT, an interactive text editor. The /EDT qualifier is required.Information on EDT commands is available from within EDT by pressing Ctrl/Z and typing HELP at the EDT Command prompt. In addition to command help, you can also press PF2 for keypad help. For a description of EDT, including information about EDT commands and qualifiers, see the OpenVMS User's Manual.
EDIT/EDT filespec
filespec
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.
The asterisk (*) and the percent sign (%) wildcard characters are not allowed in the file specification.
EDT creates or edits text files. You can use EDT to enter or edit text in three modes: keypad, line, or nokeypad. Keypad editing, which is screen-oriented, is available on VT300-series, VT200-series, VT100, and VT52 terminals. A screen-oriented editor allows you to see several lines of text at once and move the cursor throughout the text in any direction. Line editing operates on all terminals. In fact, if you have a terminal other than a VT300-series, VT200-series, VT100, or VT52, line editing is the only way you can use EDT. You might prefer line editing if you are accustomed to editing by numbered lines. Nokeypad mode is a command-oriented screen editor available on VT300-series, VT200-series, VT100, and VT52 terminals. You can use line mode and nokeypad mode to redefine keys for use in keypad mode.When you invoke EDT, you are in line mode by default. If you are editing an existing file, EDT displays the line number and text for the first line of the file. If you are creating a new file, EDT displays the following message:
Input file does not exist [EOB]In either case, EDT then displays the line mode prompt, which is the asterisk (*).
For complete details on the EDT editor, see the OpenVMS EDT Reference Manual (available on the Documentation CD-ROM).
/COMMAND[=filespec]
/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. The asterisk (*) and the percent sign (%) wildcard characters are not 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.DATIf 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/EDT/NOCOMMAND MEMO.DAT/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/EDT/NOCREATE NEWFILE.DAT Input file does not exist $/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/EDT/JOURNAL=SAVE MEMO.DATIf 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/EDT/NOJOURNAL MEMO.DATOnce you have created a journal, enter the EDT/RECOVER command to execute the commands in the journal. The asterisk (*) and the percent sign (%) wildcard characters are not allowed in the file specification.
/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/EDT/OUTPUT=OUTMEM.DAT MEMO.DATYou can include directory information as part of your output file specification to send output to another directory as follows:
$ EDIT/EDT/OUTPUT=[BARRETT.MAIL]MEMO.DAT MEMO.DATThe /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/EDT/NOOUTPUT MEMO.DATA system interruption does not prevent you from recreating 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.
The asterisk (*) and the percent sign (%) wildcard characters are not allowed in the file specification.
/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/EDT/READ_ONLY CALENDAR.DATUse 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.
/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/EDT/RECOVER MEMO.DATIf 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/EDT/RECOVER/JOURNAL=SAVE.XXX MEMO.DATBecause the /NORECOVER qualifier is the default for EDT, you do not need to specify it in a command line.
#1 |
---|
$ EDIT/EDT/OUTPUT=NEWFILE.TXT OLDFILE.TXT 1 This is the first line of the file OLDFILE.TXT. * |
This 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/EDT/RECOVER OLDFILE.TXT |
This 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.
Previous | Next | Contents | Index |