HP OpenVMS DCL Dictionary


Previous Contents Index


EDIT/TECO

Invokes the TECO interactive text editor.

Format

EDIT/TECO [filespec]

EDIT/TECO/EXECUTE=command-file [argument]


Parameter

filespec

Specifies the file to be created or edited using the TECO editor. If the file does not exist, it is created by TECO, unless you specify the /NOCREATE qualifier. The asterisk (*) and the percent sign (%) wildcard characters are not allowed in the file specification.

If you specify the /MEMORY qualifier (default) without a file specification, TECO edits the file identified by the logical name TEC$MEMORY. If TEC$MEMORY has no equivalence string, or if the /NOMEMORY qualifier is specified, TECO starts in command mode and does not edit an existing file.

If you specify the /MEMORY qualifier and a file specification, the file specification is equated to the logical name TEC$MEMORY.

argument

See the /EXECUTE qualifier.

Description

The TECO editor creates or edits text files. For detailed information on the use of TECO, see the Standard TECO Text Editor and Corrector for the VAX, PDP-11, PDP-10, and PDP-8 manual. This archived manual is on the OpenVMS documentation website:

http://www.hp.com/go/openvms/doc

Click on "Archived documents" in the left sidebar to link to this manual.


Qualifiers

/COMMAND[=filespec]

/NOCOMMAND

Controls whether a startup command file is used. The /COMMAND file qualifier may be followed by an equal sign (=) and the specification of the command file. The default file type for command files is .TEC.

The following command line invokes TECO to edit a file named MEMO.DAT and specifies that TECO use a startup command file named XTECOINI.TEC:


$ EDIT/TECO/COMMAND=XTECOINI.TEC MEMO.DAT

If you do not include the /COMMAND qualifier, or if you enter /COMMAND without specifying a command file, TECO looks for the TEC$INIT logical name assignment. If TEC$INIT is not defined, no startup commands are executed.

The logical name TEC$INIT can equate either to a string of TECO commands or to a dollar sign ($) followed by a file specification. If TEC$INIT translates to a string of TECO commands, the string is executed; if it translates to a dollar sign followed by a file specification, the contents of the file are executed as a TECO command string. For further information, see the Standard TECO Text Editor and Corrector for the VAX, PDP-11, PDP-10, and PDP-8 manual. This archived manual is on the OpenVMS documentation website:

http://www.hp.com/go/openvms/doc

Click on "Archived documents" in the left sidebar to link to this manual.

To prevent TECO from using any startup command file, use the /NOCOMMAND qualifier as follows:


$ EDIT/TECO/NOCOMMAND MEMO.DAT

The asterisk (*) and the percent sign (%) wildcard characters are not allowed in the file specification.

/CREATE (default)

/NOCREATE

Creates a new file when the specified input file cannot be found. If the /MEMORY qualifier is specified and no input file is specified, the file created is the one specified by the logical name TEC$MEMORY. Normally, TECO 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 TECO command line and type a specification for a file that does not exist, TECO displays an error message and returns you to the DCL command level. The /CREATE and /NOCREATE qualifiers are incompatible with the /EXECUTE qualifier.

/EXECUTE=command-file [argument]

Invokes TECO and executes the TECO macro found in the command file. The argument, if specified, appears in the text buffer when macro execution starts. Blanks or special characters must be enclosed in quotation marks (" "). For detailed information on the use of TECO macros, see the Standard TECO Text Editor and Corrector for the VAX, PDP-11, PDP-10, and PDP-8 manual. This archived manual is on the OpenVMS documentation website:

http://www.hp.com/go/openvms/doc

Click on "Archived documents" in the left sidebar to link to this manual.

The /EXECUTE qualifier is incompatible with the /CREATE and /MEMORY qualifiers.

/MEMORY (default)

/NOMEMORY

Specifies that the last file you edited with TECO, identified by the logical name TEC$MEMORY, will be the file edited if you omit the file specification to the EDIT/TECO command.

/OUTPUT=output-file

/NOOUTPUT (default)

Controls how the output file is named at the end of your editing session. By default, the output file has the same name as the input file but is given the next higher available version number. Use the /OUTPUT qualifier to give the output file a file specification different from the input file.

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


$ EDIT/TECO/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/TECO/OUTPUT=[BARRRET.MAIL]MEMO.DAT MEMO.DAT

The asterisk (*) and the percent sign (%) wildcard characters are not allowed in the file specification.

/READ_ONLY

/NOREAD_ONLY (default)

Controls whether an output file is created. By default, an output file is created; the /READ_ONLY qualifier suppresses the creation of the output file.

Examples

#1

$ EDIT/TECO/OUTPUT=NEWFILE.TXT OLDFILE.TXT
 
      

This EDIT command invokes the TECO editor to edit the file OLDFILE.TXT. TECO looks for the TEC$INIT logical name assignment. If TEC$INIT is not defined, TECO begins the editing session without using a command file. When the session ends, the edited file has the name NEWFILE.TXT.

#2

$ EDIT/TECO/EXECUTE=FIND_DUPS "TEMP, ARGS, BLANK"
      

In this example, the /EXECUTE qualifier causes the TECO macro contained in the file FIND_DUPS.TEC to be executed, with the argument string "TEMP, ARGS, BLANK" located in the text buffer.


Previous Next Contents Index