\chapter{RSTS/E Operating Characteristics}
\label{RSTS/E Operating Characteristics}

\section{Startup}


     RSTS supports all  of  the  standard  TECO  invocation  commands,
     namely

\begin{verbatim}
               TECO
               TECO filespec
               TECO filespec=filespec
               MAKE filespec
               MUNG filespec
               MUNG filespec,text
\end{verbatim}

     The CCL command switches {\tt /DETACH} and {\tt /SIZE:n} (or 
	{\tt /SIZE:+n}) can be
     used  with  TECO.  If {\tt /DETACH} is used and the user's detached-job
     quota has not yet been reached, TECO will detach the  job  before
     any further processing.  If {\tt /SIZE:n} is used, TECO will pre-expand
     the text and Q-register storage area to {\tt n}K.  If {\tt /SIZE:+n}
	 is used,
     TECO  will  set  the  text storage and Q-register storage area to
     {\tt n}+4K initially (TECO's default startup size is 4K).


\section{File Specification}


     The file access commands  {\tt ER} ,  {\tt EB} ,  {\tt EW} ,  and  
	{\tt EI}  accept  a  file
     specification in the standard RSTS/E format:
\begin{verbatim}
               dev:[p,pn]filename.ext
\end{verbatim}
     in which {\tt dev:}  is a physical device  name  or  a  logical  device
     name;   if  {\tt dev:}   is  not  specified,  the  public  structure is
     assumed.  If {\tt [p,pn]} is not specified, the user's  current  logged
     in  account  is  assumed.   The  filename field must be specified
     whenever the device name references  a  file  structured  device.
     The  {\tt .ext}  field is a file extension and must be explicitly given
     if used.  There is no default extension except  for  {\tt EI}  commands
     which default the {\tt .ext} field to {\tt .TEC}.

     The file specification switches  {\tt /n},  {\tt /B+},  {\tt /},  and  
	{\tt /B2}  may  be
     applied  to  the  {\tt ER}, {\tt EW}, and {\tt EB} commands.  These 
	switches invoke
     special  handling  of  program  lines  containing   {\tt <LF>}   
	or   {\tt \&}
     continuation characters.  See Appendix 
	\ref{BASIC-PLUS/BASIC-PLUS-2 Handling} for more information.

     The file specification switch {\tt /B} causes TECO to handle  the  file
     as  a  stream  of  8-bit  binary characters;  normal ASCII format
     processing (such as removal of null characters) is not done.

     The   file   specification   switches   {\tt /RONLY},   {\tt /MODE:n},    
	and
     {\tt /CLUSTERSIZE:n}  can  be  included  in a file specification.  TECO
     automatically opens any disk input file in {\tt /RONLY} mode.  The file
     size  switches {\tt /FILESIZE:n} and {\tt /SIZE:n} might leave an 
	output file
     larger than the amount of data output by TECO.  These  file  size
     switches  are  therefore illegal and produce an error if included
     in a file specification.

     The {\tt EB} and {\tt EW} commands also accept the extended notation  for  an
     output file protection code
\begin{verbatim}
               dev:[p,pn]filename.ext<prot>
\end{verbatim}
     The optional {\tt <prot>} specifies the output file protection code.


\section{Backup Files}


     The EB command maintains one level of file backup on RSTS/E.  The
     pre-edited input file name is changed to

\begin{verbatim}
               filename.BAK
\end{verbatim}

     before the new output file is  closed  with  the  original  name.
     Only normal file closing commands ({\tt EC}, {\tt EF}, {\tt EG}, 
	and {\tt EX}) cause this
     renaming to happen.  If TECO is aborted or  the  output  file  is
     purged  by  the {\tt EK} command, the input filename remains unchanged.
     Note only one .{\tt .BAK} file for a given name is kept;   
	earlier  {\tt .BAK}
     backup files are deleted each time a new backup file is created.

     A good policy to follow when editing is to close the edited  file
     frequently  enough so that an unexpected incident would not cause
     a substantial loss of work.  Files should be backed up regularly.
     TECO  has the power to let an unsuspecting user alter a good file
     into a completely useless state.  The {\tt FILCOM} program can be  used
     to verify an editing session.


\section{Exit And Go}


     If TECO is exited via the  {\tt EGstring}\escape  command,  the  
	{\tt string}  is
     executed  as  a  RSTS/E  CCL  command  after the input and output
     file(s) are closed.


\section{ET Flag Handling}


     Bit 6 (detach) is handled specially by TECO.  Every time  the  ET
     flag  is  read (used as a numeric value), TECO ensures that Bit 6
     is on if the job is attached or off if the job is detached.  This
     allows  a  TECO macro to check for ``detachedness''.  If an attempt
     is made to set Bit 6 and the user's detached-job quota  has  been
     reached,  the  request is ignored and Bit 6 will read back as a 0
     (assuming the job is attached).  If Bit 6 is set and  the  user's
     detached-job  quota has not yet been reached, the job will become
     detached.  Further reading of Bit 6 will return a  1,  indicating
     the detached condition.

