VMS Help  —  EDIT  /TECO
    Invokes the TECO interactive text editor. The /TECO qualifier is
    required.

    Format

      EDIT/TECO  [file-name]

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

1  –  Parameter

 file-name
    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. No wildcard characters are
    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.

2  –  Qualifiers

2.1    /COMMAND

       /COMMAND[=file-name]
       /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 PDP-11 TECO
    Editor Reference Manual.

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

      $ EDIT/TECO/NOCOMMAND MEMO.DAT

    No wildcards are allowed in the file specification.

2.2    /CREATE

       /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.

2.3    /EXECUTE

       /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 PDP-11 TECO Editor Reference
    Manual.

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

2.4    /MEMORY

       /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.

2.5    /OUTPUT

       /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=[BARRET.MAIL]MEMO.DAT MEMO.DAT

    No wildcard characters are allowed in the file specification.

2.6    /READ_ONLY

       /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.

3  –  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.
Close Help