!+ ! HELP file for VAX-11 TECO V39.01 ! Last edit on 2-Feb-1984 by Mark Bramhall !- 1 HELP TECO's HELP command can be used to get information about TECO or to access any standard VAX/VMS HELP library. Format: HELP [[/LIBRARY]=[=]name] [key-1 [key-2 [...]]] Using the =name qualifier selects a HELP library other than the TECO library. The ==name format both selects the library for this HELP command and makes it the default library for subsequent HELP commands. For example HELP ==HELP SYSTEM $ASSIGN would select the system HELP library, establish it as the default, and tell you about the Assign I/O Channel system service. The Key-n parameters obey the standard VAX/VMS HELP syntax rules. 1 TECO TECO invokes the TECO text editor. TECO is an editor capable of both basic editing and complex programmed string processing. Formats TECO file-spec to edit an existing file TECO out-file-spec=in-file-spec to edit from one file to another MAKE file-spec to create a new file MUNG cmd-file-spec to execute a TECO command file MUNG cmd-file-spec text-arg as above, but passes a text argument As these are not built-in DCL commands, you need to enter the following lines in your LOGIN.COM file. TECO == "$SYS$SYSTEM:TECO TECO" MAKE == "$SYS$SYSTEM:TECO MAKE" MUNG == "$SYS$SYSTEM:TECO MUNG """ 2 Initialization TECO decodes its commands with a built-in command decoder. If TECO finds the logical name TEC$INIT, its equivalence string is assumed to be either a TECO macro or, if the string starts with a dollar sign ($), the rest of the string is assumed to be a file-spec containing a TECO macro to be executed every start up. To disable the lookup of TEC$INIT, the qualifier /NOINI can be used. 3 Actions Your initialization TECO macro can request the following actions by returning a bit encoded numeric value. 1 => Load and start up VTEDIT.TEC (/VTEDIT) 2 => Only inspect specified file (/INSPECT) 4 => Inhibit TECO's memory (/NOMEMORY) 8 => Position to VTEDIT's position marker (/FIND) 16 => Enable scope editing SEEALL mode (/VTEDIT:SEEALL) 32 => Enable scope editing HOLD screen mode (/VTEDIT:HOLD) 128 => Enable scope editing scroll mode (/SCROLL) 256 => Inhibit automatic file creation (/NOCREATE) 4096 => Initialization is complete 8192 => Force TECO to update TECO's memory 16384 => Display file being edited 32768 => Initialization used TECO's memory; TECO shouldn't 3 Conditions When the initialization TECO macro is executed, the following conditions are in effect. Text buffer User's editing command Q-register 0 Initialization TECO macro itself Q-register 9 TECO's built-in command decoder data storage Q-register Y TECO's built-in command decoder TECO macro The user's editing command in the text buffer can be modified by the initialization TECO macro. All other Q-registers are initially scratch and can be used or loaded by the initialization TECO macro; their contents will subsequently be preserved. 3 Example The following initialization TECO macro always disallows automatic file creation (256) and, for scope terminals only (512 in ET), enables scope editing scroll mode (128) in SEEALL mode (16) with immediate mode command output turned off (-1EV). 256U0 ET&512"N Q0#128#16U0 -1EV ' Q0#4096 This initialization TECO macro would be defined as the equivalence string to the logical TEC$INIT as follows. $ DEFINE TEC$INIT "256U0 ET&512""N Q0#128#16U0 -1EV ' Q0#4096" 2 Defaults Your LOGIN.COM file can define the TECO command with preset qualifiers if desired. The qualifiers /NOCRE, /NOINI, and /NOMEM are recognized by all TECO commands so that they can be preset at command definition time. To disable all TECO start up actions you would use TECO == "$SYS$SYSTEM:TECO TECO/NOCRE/NOINI/NOMEM" To disable only TECO's memory you would use TECO == "$SYS$SYSTEM:TECO TECO/NOMEM" Etc. 2 Memory TECO automatically remembers the file being edited. The file's name is stored in a process logical called TEC$MEMORY. If you invoke TECO without specifying a file-spec, TECO will read its memory logical and re-edit the last edited file. TECO's memory feature is completely inhibited by the /NOMEMORY qualifier. 2 Qualifiers /FIND Initially position to (find) the last marked position in the input file. Position is marked with the VTEDIT ESCape-F commands. /INSPECT Simply read the file-spec, don't create a new edited copy. /NOCREATE Do not automatically create a new file if the file specified by a TECO command doesn't already exist. /NOINI Do not attempt to find or use TECO's private initialization logical TEC$INIT. /NOMEMORY Do not read, create, or use TECO's memory logical TEC$MEMORY. /SCROLL Automatically enter split screen scrolling mode. The bottom 1/4 of the screen's lines are scrolled. The following qualifier keywords can be used to initially set scrolling modes: /SCROLL:n Set the number of lines to scroll to n. /SCROLL:SEEALL Set scrolling into SEEALL mode. /SCROLL:n:SEEALL Set the number of lines to scroll to n and SEEALL mode. /VTEDIT Automatically invoke the TECO keypad editor VTEDIT. The following qualifier keywords can be used to initially set VTEDIT modes: /VTEDIT:HOLD Set VTEDIT into hold screen mode. /VTEDIT:SEEALL Set VTEDIT into SEEALL mode. /VTEDIT:HOLD:SEEALL -or- /VTEDIT:SEEALL:HOLD Set VTEDIT into both hold screen and SEEALL modes. 1 EDIT EDIT/TECO invokes the TECO text editor. TECO is an editor capable of both basic editing and complex programmed string processing. Formats EDIT/TECO file-spec to edit an existing file EDIT/TECO file-spec/OUTPUT=new-file to edit from one file to another EDIT/TECO file-spec/CREATE to create a new file EDIT/TECO/EXECUTE=cmd-file-spec to execute a TECO command file EDIT/TECO/EXECUTE=cmd-file-spec text as above, but passes a text argument 2 Initialization If TECO finds the logical name TEC$INIT, its equivalence string is assumed to be either a TECO macro or, if the string starts with a dollar sign ($), the rest of the string is assumed to be a file-spec containing a TECO macro to be executed every start up. To disable the lookup of TEC$INIT, the qualifier /NOCOMMAND can be used. To explicitly specify a start up TECO macro file, the qualifier /COMMAND=file-spec can be used. 3 Actions Your initialization TECO macro can request the following actions by returning a bit encoded numeric value. 1 => Load and start up VTEDIT.TEC (scope editing macro) 2 => Only inspect specified file (/READ_ONLY) 4 => Inhibit TECO's memory (/NOMEMORY) 8 => Position to VTEDIT's position marker 16 => Enable scope editing SEEALL mode (-1,3:W) 32 => Enable scope editing HOLD screen mode (-1,5:W) 128 => Enable scope editing scroll mode (2:W/4,7:W) 256 => Inhibit automatic file creation (/NOCREATE) 4096 => Initialization is complete 8192 => Force TECO to update TECO's memory 16384 => Display file being edited 32768 => Initialization used TECO's memory; TECO shouldn't 3 Conditions When the initialization TECO macro is executed, the following conditions are in effect. Text buffer User's editing command Q-register 0 Initialization TECO macro itself Q-register 9 TECO's built-in command decoder data storage Q-register Y TECO's built-in command decoder TECO macro The user's editing command in the text buffer can be modified by the initialization TECO macro. All other Q-registers are initially scratch and can be used or loaded by the initialization TECO macro; their contents will subsequently be preserved. 3 Example The following initialization TECO macro always disallows automatic file creation (256) and, for scope terminals only (512 in ET), enables scope editing scroll mode (128) in SEEALL mode (16) with immediate mode command output turned off (-1EV). 256U0 ET&512"N Q0#128#16U0 -1EV ' Q0#4096 This initialization TECO macro would be defined as the equivalence string to the logical TEC$INIT as follows. $ DEFINE TEC$INIT "256U0 ET&512""N Q0#128#16U0 -1EV ' Q0#4096" 2 Defaults Your LOGIN.COM file can define an EDIT/TECO command with preset qualifiers if desired. The qualifiers /NOCOMMAND, /NOCREATE, and /NOMEMORY are always recognized so that they can be preset at command definition time. To disable all TECO start up actions you would use TECO == "EDIT/TECO/NOCOMMAND/NOCREATE/NOMEMORY" To disable only TECO's memory you would use TECO == "EDIT/TECO/NOMEMORY" Etc. 2 Memory TECO automatically remembers the file being edited. The file's name is stored in a process logical called TEC$MEMORY. If you invoke TECO without specifying a file-spec, TECO will read its memory logical and re-edit the last edited file. TECO's memory feature is completely inhibited by the /NOMEMORY qualifier. 2 Qualifiers /COMMAND /COMMAND, the default, will use the start up TECO macro described by the logical TEC$INIT, if any. /COMMAND=file-spec will use the start up TECO macro in the specified file. /NOCOMMAND completely inhibits any special start up actions. /CREATE /CREATE, the default, will cause a new file to be created if the specified editing file doesn't exist. /NOCREATE inhibits any automatic file creation. /EXECUTE /EXECUTE=file-spec causes the specified TECO macro file to be executed. /MEMORY /MEMORY, the default, will utilize TECO's memory logical TEC$MEMORY. /NOMEMORY competely inhibits TECO's memory feature. /OUTPUT /OUTPUT=file-spec will cause the edited file to be written into the specified file-spec instead of creating the next higher version of the same file. /READ_ONLY /READ_ONLY will cause the specified editing file to be only read; no output file will be created. 1 Commands Most characters that can be typed at your keyboard are TECO commands. Use them with care. All TECO commands are terminated with the character, which will echo as a "$" at your terminal. To execute a command (or string of commands), type a second after the last command in the string. No TECO command will be executed until two consecutive s are typed. may be labeled or on your terminal. 2 J The "J" command is used to move the text pointer within the editing buffer. Common forms of the command are: BJ Point to the beginning of the buffer ZJ Point to the end of the buffer 2 L The "L" command is used to move the text pointer from one line to another. Common forms of the command are: L Move to the beginning of the next line 0L Move to the beginning of the current line 5l Move to the fifth line past the current line -1L Move back to the previous line 2 C The "C" command is used to move the pointer past a specified number of characters. Common forms of the "C" command are: C Advance the pointer to the next character 3C Move forward by three characters -1C Move back to the previous character 2 T The "T" command is used to type text from the editing buffer. Common forms of the "T" command are: T Type text from the pointer to the end of the line 0T Type text from the beginning of the current line to the pointer 5T Print the next five lines of text, starting from the pointer HT Print the entire contents of the editing buffer 2 I The "I" command is used to insert text, starting at the current pointer. The command is of the form: Itext-to-insert For example, to insert the text "This is a test", type IThis is a test$ (Note that the key is echoed as a "$" sign at your terminal.) 2 K The "K" command is used to delete lines of text from the editing buffer. Common forms of the command are: K Delete the text from the pointer through the end of the current line 0K Delete the text from the beginning of the current line to the pointer 5K Delete the next five lines of text, starting from the pointer HK delete all of the text in the editing buffer 2 D The "D" command is used to delete characters from the editing buffer. Common forms of the command are: D Delete the character which follows the pointer 5D Delete the next five characters, starting with the character following the pointer -1D Delete the character which immediately precedes the pointer 2 P The "P" command is used to write the text in the editing buffer to the output file and read the next page of text from the input file to the editing buffer. Common forms of the command are: P Write the current buffer to the output file and get the next page 5P Write the current buffer, plus the next four pages from the input file, to the output file, then read the next page from the input file into the editing buffer 2 A The "A" command is used to append the next page of text from the input file to the end of the current editing buffer. The command is of the form: A Read the next page of text from the input file and append it to the end of the current text buffer 2 S The "S" command is used to locate a specified string of text in the current buffer. If the text is found, the pointer is positioned after the specified text. If the text is not found, an error message is printed and the pointer is set to the beginning of the buffer. The "S" command is of the form: Stext-to-locate For example, to find the text "find me", use the command Sfind me$ (Note that the key echoes as "$" at your terminal.) 2 N The "N" command is the same as the "S" command, except that the search continues across page boundaries, if necessary, until the specified text, or the end of the file, is encountered. The "N" command is of the form: Ntext-to-locate For example, to find the text "find me", which may appear on a later page in the file, use the command Nfind me$ (Note the the key echoes as "$" at your terminal.) 2 FS The "FS" command is used to replace one string with another string. If the specified text is found, it is deleted and replaced with the new text, and the pointer is positioned at the end of the specified text. If the specified text is not found, the pointer is positioned at the beginning of the buffer. The "FS" command is of the form: FSold-textnew-text For example, to replace the next occurrence of "exumple" with "example", use the command FSexumple$example$ (Note that the key echoes as "$" at your terminal.) 2 EX The "EX" command is used to write the current buffer to the output file, copy the remainder of the input file to the output file, and exit from TECO. For example, EX$$ (Note that the key echoes as "$" at your terminal, and that you must type the key twice to cause the command to be executed.) 1 Flags TECO has a number of internal mode flags which can be set and/or read to modify the standard TECO environment. To read the value of a flag, use Fx where "F" is the name of the flag and "x" is a command which accepts a numeric argument. To set the value of a flag, use xF where "F" is the name of a flag and "x" is a number or a command which returns a numeric value. 2 ED Value Meaning if Set 1 ^ (up-arrow) in search arguments is a literal ^ (If 0, ^ in search arguments means that the next character should be interpreted as a control character) 2 Disables Yank protection (If 0, the Y, N, and _ commands are aborted if they would result in data being lost) 4 Disallow memory expansion when reading in a text page (If 0, memory is expanded, if needed, so that the whole text page fits in the text buffer) 8 Unimplemented by TECO under VAX/VMS... 16 Leaves buffer pointer unchanged on search failures (If 0, search failures move the buffer pointer to the beginning of the text buffer) 32 Enable immediate mode commands 64 Only move the buffer pointer by one on iterative search failures (If 0, the buffer pointer moves by the length of the search string on iterative search failures) 128 Disable scrolling's automatic text buffer display prior to TECO's prompt (If 0, the text buffer display is automatically updated just prior to TECO's prompt when scrolling is enabled) Multiple values may be combined in the ED flag 2 EH The EH flag controls TECO's action when an error is encountered. Value Meaning if Set 0 Same as 2 1 Only the 3-character error code is printed 2 The 3-character error code and a short message are printed 3 The 3-character error code, a short message, and a more detailed explanation of the error are printed 4 The command(s) which lead to the error are printed, simulating the effect of the "?" command The 4 may be combined with either 0, 1, 2, or 3 in the EH flag 2 ET Value Meaning if set 1 Type-out is in pass-all mode 2 Terminal is a scope 4 Terminal has lower-case; accept lower-case 8 ^T reads with no echo 16 Cancels ^O on output 32 ^T reads with no wait (^T returns -1 if no input) 64 Unimplemented by TECO under VAX/VMS... 128 TECO aborts if an error is encountered 256 Output is truncated to the terminal's width 512 "W" commands are supported for this scope terminal 1024 Unimplemented by TECO under VAX/VMS... 2048 Unimplemented by TECO under VAX/VMS... 4096 Terminal is an 8-bit terminal 8192 Accept accent grave (`) as ESCape for command input 32768 Traps CTRL/C's (reset if CTRL/C is typed) Multiple values may be combined in the ET flag 2 EU Value Meaning 0 Flags lower case characters on output with "T" or "V" commands >0 Flags upper case characters on output <0 No case flagging on output 2 ^X Value Meaning 0 Either case matches in searches <>0 Exact case matches are required in searches 1 Messages TECO produces one informational and two warning messages. These messages do not abort the command and execution continues. 2 %Search fail in iter Indicates that a search command has failed inside iteration brackets. A ; (semi-colon) command immediately following the search command can typically be used to suppress this message. After printing the message, the iteration is terminated, i.e., TECO simulates a 0; command. 2 %Exceeding disk quota Indicates that the current output operation has exceeded your disk quota. You may continue to do output up to your quota overdraft limit. It is suggested that you exit from the current edit and purge old file versions to free up some disk space. 2 [nnn pages] This informational message tells you the size of TECO's combined text buffer and Q-register storage in pages. 1 Errors All TECO error messages are of the form ?XXX Short text message and abort TECO's command execution. Typing a question mark (?) immediately after TECO's input prompt will print the erring command string up to and including the error point. Typing a slash (/) immediately after TECO's input prompt will print a longer explanation of the error. 2 BNI ?BNI > not in iteration There is a close angle bracket not matched by an open angle bracket somewhere to its left. (Note: an iteration in a macro stored in a Q-register must be complete within the Q-register.) 2 CPQ ?CPQ Can't pop Q-reg A ] command has been executed and there is nothing saved on the Q-register push down list. 2 DTB ?DTB Delete too big An nD command has been attempted which is not contained within the current page. 2 ERR ?ERR ID, text Some VAX/VMS system service call failed. The error message ID and text explain the error. 2 FNF ?FNF File not found "filespec" The requested input file could not be located. If this occurred within a macro the colon modified ER or EB command may be necessary. 2 IAA ?IAA Illegal A arg The argument preceding a :A command is negative or 0. 2 IEC ?IEC Illegal E character An invalid E command has been executed. The E character must be followed by an alphabetic to form a legal E command (e.g., ER or EX). 2 IFC ?IFC Illegal F character An invalid F command has been executed. 2 IIA ?IIA Illegal insert arg A command of the form "nItext$" was attempted. This combination of character and text insertion is illegal. 2 ILL ?ILL Illegal command An attempt has been made to execute an invalid TECO command. 2 ILN ?ILN Illegal number An 8 or 9 has been entered when the radix of TECO is set to octal. 2 IPA ?IPA Illegal P arg The argument preceding a P or PW command is negative or 0. 2 IQC ?IQC Illegal " character One of the valid " commands did not follow the ". 2 IQN ?IQN Illegal Q-reg name An illegal Q-register name was specified in one of the Q-register commands. 2 IRA ?IRA Illegal radix arg The argument to a ^R radix command must be 8, 10, or 16. 2 ISA ?ISA Illegal search arg The argument preceding a search command is 0. This argument must not be 0. 2 ISS ?ISS Illegal search string One of the search string special characters (^Q, ^R, etc.) would have modified the search string delimiter (usually ESCAPE). 2 IUC ?IUC Illegal ^ character The character following an ^ must have ASCII value between 100 and 137 inclusive or between 141 and 172 inclusive. 2 MEM ?MEM Memory overflow Insufficient memory available to complete the current command. Make sure the Q-register area does not contain much unnecessary text. Breaking up the text area into multiple pages might be useful. 2 MRP ?MRP Missing ) There is a right parenthesis that is not matched by a corresponding left parenthesis. 2 NAB ?NAB No arg before ^_ The ^_ command must be preceded by either a specific numeric argument or a command that returns a numeric value. 2 NAC ?NAC No arg before , A command has been executed in which a , is not preceded by a numeric argument. 2 NAE ?NAE No arg before = The =, ==, or === command must be preceded by either a specific numeric argument or a command that returns a numeric value. 2 NAP ?NAP No arg before ) A ) parenthesis has been encountered and is not properly preceded by a specific numeric argument or a command that returns a numeric value. 2 NAQ ?NAQ No arg before " The " commands must be preceded by a single numeric argument on which the decision to execute the following commands or skip to the matching ' is based. 2 NAS ?NAS No arg before ; The ; command must be preceded by a single numeric argument on which the decision to execute the following commands or skip to the matching > is based. 2 NAU ?NAU No arg before U The U command must be preceded by either a specific numeric argument or a command that returns a numeric value. 2 NFI ?NFI No file for input Before issuing an input command, such as Y, it is necessary to open an input file by use of a command such as ER or EB. 2 NFO ?NFO No file for output Before issuing an output command such as N search or P it is necessary to open an output file by use of a command such as EW or EB. 2 NYA ?NYA Numeric arg with Y The Y command must not be preceded by either a numeric argument or a command that returns a numeric value. 2 OFO ?OFO Output file already open "filespec" A command has been executed which tried to create an output file, but an output file currently is open. It is typically appropriate to use the EC or EK command as the situation calls for to close the output file. 2 PDO ?PDO Push-down list overflow The command string has become too complex. Simplify it. 2 POP ?POP Pointer off page A J, C or R command has been executed which attempted to move the pointer off the page. The result of executing one of these commands must leave the pointer between 0 and Z, inclusive. The characters referenced by a D or m,nX command must also be within the buffer boundary. 2 SNI ?SNI ; not in iteration A ; command has been executed outside of an open iteration bracket. This command may only be executed within iteration brackets. 2 SRH ?SRH Search failure "text" A search command not preceded by a colon modifier and not within an iteration has failed to find the specified "text". After an S search fails the pointer is left at the beginning of the buffer. After an N or _ search fails the last page of the input file has been input and, in the case of N, output, and the buffer is cleared. In the case of an N search it is usually necessary to close the output file and reopen it for continued editing. 2 STL ?STL String too long A search or file name string is too long. This is most likely the result of a missing ESCAPE after the string. 2 UTC ?UTC Unterminated command This is a general error which is usually caused by an unterminated insert, search, or filespec argument, an unterminated ^A message, an unterminated tag or comment (i.e., unterminated ! construct), or a missing ' character which closes a conditional execution command. 2 UTM ?UTM Unterminated macro This error is the same as the ?UTC error except that the unterminated command was executing from a Q-register (i.e., it was a macro). (Note: An entire command sequence stored in a Q-register must be complete within the Q-register.) 2 XAB ?XAB Execution aborted Execution of TECO was aborted. This is usually due to the typing of CTRL/C. 2 YCA ?YCA Y command aborted An attempt has been made to execute an Y or _ search command with an output file open, that would cause text in the text buffer to be erased without outputting it to the output file. The ED command controls this check. !++ ! The help section on TECO macros has been commented out since: ! 1) It isn't complete yet. ! 2) The macros don't ship anymore. !-- ! 1 Macros ! TECO macros... ! 2 LOCAL ! LOCAL.TEC is... ! 2 SEARCH ! SEARCH.TEC is a TECO macro used to search files for one or more ! character strings, and optionally replace them. It is invoked by: ! MUNG SYS$LIBRARY:SEARCH ! When run, it asks the following questions: ! ! Output : Output log file ! Input <*.MAR>: Input file spec(s) ! Lines <3>: Number of lines to verify ! (Absolute) Search: String(s) to search for ! Replace: Replace for found string (if /CHA specified) ! Detach : Run detached? ! ! Defaults are shown in angle brackets ("<>"). The "Input" and "Search" ! questions are repeated until they are answered with a blank line. ! 3 Input qualifiers ! /ALL ! List all file names in main part of log whether they were match or ! no-match. ! 3 Output qualifiers ! /CHA ! Change found string. This causes "Replace:" to be requested after ! every search string. The changed version is logged in the log file, ! and the input file is updated. ! /MAT ! Report only files with matches (No end list of no-match files). ! /ESC ! ESCape is the only delimiter for Search and Replace strings. Normally ! a carriage return is used as the delimiter. Thus multi-line search or ! replacement strings must be entered using the /ESC option. ! /DIR ! Compile a directory of the files now and use it to search. ! /ABS ! Exact case matches are required and TECO special search match ! characters must be entered as control characters (i.e., not with an ! uparrow). ! 3 Log file ! For each file which contains at least one match, a banner is printed ! out, and each instance, along with the 3 (or the number requested by ! the user) lines before and after it. A header line identifying the ! page number is printed with each instance. Once all of the files ! containing matches are logged, a list of files which do not contain ! matches is printed (unless the user specifies "/MAT" or "/ALL"). ! 3 File specs ! SEARCH allows a list of file specifications terminated by a blank line ! to be requested. Any or all of these may include wildcards. ! 3 Search strings ! The search strings are entered as a list ending with a blank line and ! are terminated with a carriage return unless "/ESC" is specified. Any ! of the TECO string matching constructs may be used. Unless "/ABS" is ! used, this includes "^" constructs for control characters, thus "^G" ! would search for a CTRL/G (bell) character. ! 2 SQU ! SQU.TEC is... ! 2 TYPE ! TYPE.TEC is... ! 2 VTEDIT ! VTEDIT.TEC is...