1 DOC 

     The   VAX   Document   System   is  intended  to  make  writing
     inter-office memos, letters, and system documentation easy.  It
     is a menu-driven interface to several programs:  

          1.  The  text  editing  programs  EDT and EMACS, either of
              which can be used to create and edit text files.  

          2.  SPELL, a program to locate possibly misspelled words. 

          3.  Two  versions  of  Runoff, a program that formats text
              files for printing.  The two versions are DSR (Digital
              Standard Runoff) and ROF (John Clement's RSX version). 


     For  detailed  information on any of the above programs see the
     appropriate user manuals.  

     DOC  also provides easy access to several printers:  the Diablo
     630 (ISD), the console LA120, the Advertising Department LA120,
     the  Circulation Department line printer, the Personnel Depart-
     ment Diablo, and the computer  room  line  printer  (for  fast,
     upper case proofs).  

2 USE 

     A  foreign command is defined in the system login procedure, so
     that all any user has to do to enter the document system is  to
     type "DOC".  Your current directory will be used in creating or
     locating files.  If you have more than one directory you should
     select the correct directory before entering DOC.  

     Optionally  he  may  follow  the DOC command with a one to nine
     character document name, e.g.:  

          DOC project 

     From  this  point on, the system will display menus that should
     be self-explanatory.  

     If  you give DOC a full file name, including file type (for ex-
     ample LOGIN.COM), then DOC will use that file name, and the ex-
     tention  will  become the default file type for the current DOC
     session.  

     DOC will remember the file name and type you select for as long
     as you are logged in.  If you exit from DOC with option 99, and
     later  type a "DOC" command with no document name, DOC will ask
     if you want to use the old document name from the last time you
     were  using DOC.  It will also remember what directory you were
     in, and if that has changed, will ask if  you  want  to  change
     back.  

2 FILE_NAMES 

If  no document name is given, DOC will default to a file specifica-
tion of "MEMO.RNO".  You will be informed of this default and  asked

if you wish to change the file specification or document name.  

You  may  give  a  full file specification if you want to use DOC to
edit and process a file with a different name, e.g.  

     DOC SPECIAL.TXT 

Normally,  DOC  will be used to create and edit Runoff source files,
and to process them through Runoff to  produce  a  printable  output
file.   All  you  need  to specify is the [1mdocument name[0m, from one to
nine characters.  DOC will take care of assigning proper file types. 

3 FILE_TYPES 

     When you are using the DSR version of Runoff, the file specifi-
     cations used will be:  

          For source files:  document[1m.RNO[0m
          For output files:  document[1m.MEM[0m

     The  file  types shown will be used whether you are producing a
     memo, a letter, a system document, or anything else.  

3 ROF_TYPES 

     When you are using the ROF version of Runoff, the file specifi-
     cations used will be:  

          For source files:  document[1m.ROF[0m
          For output files:  document[1m.DOC[0m

     The  file  types shown will be used whether you are producing a
     memo, a letter, a system document, or anything else.  


                                 COMMENT


          Different  file types are used for the different ver-
          sions of Runoff to help you remember which version of
          Runoff should be used to process a given file.  There
          is nothing to prevent you producing a file once  with
          DSR  as your default and later selecting ROF to actu-
          ally output the file;  be aware,  however,  that  not
          all  commands  from one version are recognized by the
          other, and  the  format  of  the  output  may  differ
          slightly.  The ".LIST" command, for instance, indents
          differently in the two versions;  ROF supports Diablo
          escape sequences, while DSR does not.  

          On  the  assumption that you may forget which version
          of Runoff you used when you first created a document,
          most  commands check for existance of a document with
          a particular file type and warn you if  it  does  not
          exist,  reminding you which version of Runoff is your
          current default.  If you enter  DOC  and  attempt  to
          call  up  a document for editing and are told it does
          not exist, try changing versions of  Runoff  and  at-
          tempting  to  edit  again;   possibly  the  file  was
          created using the other Runoff.  



2 MENU_COMMANDS 

     The  main  menu  of  DOC  lists thirteen functions that you may
     select by number.  They are briefly described in sections  that
     follow.  To exit from DOC, you must select option 99.  

     If  you  type anything other than a number, DOC will attempt to
     execute it as a standard DCL command.  For example, if you res-
     pond  to  the  OPTION prompt by typing "MAIL", DOC will put you
     directly into the MAIL program.  When you leave MAIL, you  will
     return to DOC.  

3 CREATE 

     To  create  a  new  document, select the CREATE option.  If the
     name you have chosen already exists in your directory you  will
     be notified and asked to choose a different name.  

     [1mYou  should select the version of Runoff you want to use [4mbefore[0m[0m
     [1myou begin to create a document.[0m  (See Section 4.10) The reason:
     when  you first create a document, DOC inserts many Runoff com-
     mands into the file you are creating.   The  commands  inserted
     depend  on  the  version of Runoff currently selected.  The de-
     fault version of Runoff is DSR, so if you expect to use  Diablo
     escape  sequences, the first thing you should do after entering
     DOC is to select ROF as your default Runoff.  

     If  you create a document under DSR called "DOC1.RNO", you will
     be  allowed  to  create  another  document  under  ROF   called
     "DOC1.ROF".   These  are  considered to be different documents.
     Under some circumstances you may want two versions of the  same
     document,  one  that  can  be processed by DSR and the other by
     ROF.  This would be true if, for internal use, you  wanted  the
     more  elegant  output of ROF, but wished to be able to send the
     Runoff source file to other VAX users who do not have ROF.  

     It  is  advisable,  however, to use unique document names.  The
     FOLDER sub-system will not handle duplicate names, even if  the
     file type is different.  An alternative way of handling this is
     to store .RNO files in one folder, and .ROF  files  in  another
     folder.  

4 TYPES_OF_DOCUMENTS 

     You  can  create  four  types  of  documents  with DOC:  memos,
     letters, system documents, and "other".  


                      Input of responses to prompts

          When responding to a prompt for author or subject for
          [1many[0m document type, if you want to preserve lower case
          input  you  must  [1menclose the input in double quotes[0m.
          If double quotes are not used the  command  procedure
          will  automatically  transpose  your input into upper
          case.  If you forget this, you can still go back  and
          edit the lines in your document.  



5 MEMOS 

     [1mMemos[0m  are  pre-formatted  in the now familiar way with a large
     "MEMO" heading and appropriate fields  for  author,  addressee,
     subject,  and  persons  to  be copied (at the end of the memo).
     You will be prompted for input to the required fields.  

5 LETTERS 

     [1mLetters[0m  are pre-formatted with the return address and date al-
     igned against the right margin,  followed  by  the  destination
     name and address left-justified, a salutation line, and a clos-
     ing.  Normally you will be prompted separately for each line of
     each  address.   The  letter  produced  will  not  go on Record
     letterhead;  the letter option is intended for quick notes  and
     (gasp!) personal use.  

     If  you  wish you may pre-define the return address information
     by creating a file in your login directory called  ADDRESS.DEF.
     Here is a sample ADDRESS.DEF file for Allen Watson:  

          
          $ AUTHOR :== "Allen A. Watson"
          $ ATITLE :== "Manager, Systems Technology"
          $ RET1 :== "THE RECORD"
          $ RET2 :== "150 River Street"
          $ RET3 :== "Hackensack, NJ 07602"
          

     If  an  ADDRESS.DEF  file  exists in your directory you will be
     asked if you want to use the default information.  If you reply
     "YES",  the  fields will be filled in automatically as you pro-
     gress through the input form.  

5 SYSTEM_DOCUMENTS 

     [1mSystem Documents[0m are documents intended to describe some aspect
     of our VAX/VMS system or RSX11M-Plus system.  This document  is
     an example of a system document.  

5 DATE_SUBSTITUTION 

     For all three of the above document types, date substitution is
     used.  That is, when you process the  document  through  Runoff
     the  date information for today is automatically inserted.  See
     the DSR manual or Pocket Reference for information  on  how  to
     use $$DATE, $$TIME, etc.  

     Both versions of Runoff support change bars (marginal lines in-
     dicating portions of a document which have  altered  since  the
     last issue of the document).  Authors of system documents espe-
     cially are encouraged to use change bars to aid readers in  lo-
     cating updated information.  

3 EDIT 

     Once  you  have  begun to create a document and have exited the
     editor, further changes to the document must be made using  the
     EDIT  option.   EDIT opens your document for editing.  It auto-
     matically places a comment line at the top of the file indicat-
     ing  the  date  the file was last edited, and by whom.  You are
     free to delete these lines if you do not want them.  (The  com-
     ment lines are not added if you use the EMACS editor.) 

     EDT  is  always  called  in "Change Mode", that is, full screen
     edit mode.  You may use any valid EDT commands.  When done, you
     may  EXIT  or QUIT (if you wish to discard your changes).  Nor-
     mally you will EXIT, and EDT will create a new version of  your
     document  file.   When  in DOC, EDT is always started using the
     system EDT initialization file found in SYS$COM.  If  you  need
     information on what keys are defined by this file, see the Sys-
     tem Manager.  

     If  the  system fails during an EDIT, you cannot perform an EDT
     "/RECOVER" or EMACS -S command from within DOC.  The  suggested
     procedure in the event of a system crash is:  

          1.  When  the  system  comes back up, log on and change to
              the directory that contains your document.  

          2.  If  you  were using EDT, type in the normal command to
              invoke EDT in Recovery mode, giving the full  name  of
              the document file [1mincluding file type[0m, for example:  

                   EDT/RECOVER DOCUMENT1.ROF 

          3.  For EMACS, type the command EMACS -R.  

          4.  EDT will now call up the last complete version of your
              document and will re-create every keystroke of the ed-
              iting  session  that  was  interrupted  by  the system
              crash.  

          5.  When  EDT  has finished recovering your edits, EXIT to
              save the edits to this point.  

          6.  Now, re-enter the DOC system by typing, for example:  

                   DOC DOCUMENT1 


4 Editing with EMACS 

     If  you elect to use the EMACS editor from within DOC, you need
     to know about a special command in  EMACS  designed  especially
     for use with DOC.  

     When  you  have  done some editing and want to return to DOC to
     View or Runoff the document, use the EMACS  command  "ESCAPE-p"
     (lower  case).   You can think of this as the Escape Pause com-
     mand.  This executes  a  command  procedure  RETURNDOC  from  a
     sub-process  to  return  to DOC with the terminal features cor-
     rectly set.  Any modified files are automatically saved  before
     leaving  EMACS.   EMACS is not exited, but is left running in a
     sub-process.  This makes returning to EMACS for further editing
     [1mmuch  faster[0m  because  EMACS does not have to be restarted each
     time you choose the Create or Edit option in DOC.  DOC can tell
     if EMACS is running in a sub-process and will use that EMACS if
     it exists.  Otherwise a new EMACS will be started.  

3 VIEW 

     The  VIEW option allows you to see at your terminal the format-
     ted results of passing your document through Runoff.  



     1.1.1  Underlining when VIEWing  - 

     Underscoring,  if  present  in  your  document,  creates unique
     problems when you are using DSR.  You will be asked whether  or
     not you want the underscoring to appear at the terminal.  

     If  you answer "yes", underscoring will be done with hyphens on
     a second line so that the text and underscores will both be vi-
     sible  on  your terminal (video screens can't overprint).  This
     means that [1mextra lines[0m are used for the underscoring.  When you
     do final output to a printer, however, underlining is done with
     overprinting, using only one line.  Therefore, your final  out-
     put  will  have  fewer lines than the "VIEW" version, with more
     lines of text per page.  Page breaks will come in  a  different
     place.  

     If  you  answer  "no" to the underscoring question, underscores
     will be omitted from the version you see on the screen, and the
     page breaks will be the same as your final printed document.  

     If  page  break points are important to you, I suggest you view
     your document twice:  once to check  for  proper  underscoring,
     and once to check the page breaks.  

4 ROF_FILES 

     When  you  VIEW  a  file with the ROF version of Runoff, DOC is
     able to substitute VT100 control characters  in  place  of  the
     Diablo control characters, so that both underlining and bolding
     or shadow printing will appear on the screen in the same way as
     they  will in final output.  That is, for underlining the VT100
     underline mode is used;  for shadow  printing  the  VT100  bold
     mode  is used.  The modes may even be mixed (an underlined word
     in a bold sentence, for example).  

     The  selection  of  the  appropriate variant, for Diablo or for
     VT100, is done automatically by DOC.  


                    ROF files created prior to 3/2/84

          If  you  created  files for ROF prior to 3/2/84, they
          will contain the following two lines:  

               .VARIANT DIABLO .;.VARIANT VIEW 

          These two lines should be deleted from the file prior
          to further editing and output using DOC.  



3 CHECK_SPELLING 

     This  option  uses  a  DECUS  program called SPELL to check the
     spelling of every word in your document.  Runoff command  lines
     are ignored.  

     SPELL  has two modes:  interactive and automatic.  It is advis-
     able [1mnot[0m to use interactive spelling checking, because  it  re-
     quires  a  response [1mevery time[0m it detects a suspect word.  Many
     of the technical terms and proper names used in our  memos  and
     documentation will appear to be a misspelled word to SPELL, for
     example, "SYSGEN" and "Schrumpf".  So it is best to select  the
     non-interactive  mode.   This  will list all suspect words with
     the line number of the line containing it.  If you see a  truly
     misspelled word on the list you may then use the EDIT option to
     find and correct the word.  

     For  more  information  on using SPELL (outside of the DOC sys-
     tem), see "HELP SPELL".  

3 RUNOFF 

     The  RUNOFF  option reads the file you have created, which con-
     tains DSR or ROF commands, and produces an output file  format-
     ted according to those commands.  You must choose RUNOFF before
     you can print the final document.  

     The  RUNOFF option will use whichever version of Runoff is cur-
     rently your default, either DSR or ROF.  If you give only a do-
     cument  name,  it will default to the appropriate file types as
     described above.  You can override this by using the CHOOSE op-
     tion  to specify both the document name and file type.  In this
     way you can create a document with DSR  as  your  default,  and
     ".RNO" as the file type, and then change to ROF as your default
     and use CHOOSE to make the file name "docname.RNO".   (I  don't
     know  why you would want to do this, but I want to point out it
     [1mis possible[0m.) 

     DSR will produce a file called "docname.MEM", and ROF will pro-
     duce a file called "docname.DOC".  

3 PRINT 

     The  PRINT  option allows you to direct that a file produced by
     the RUNOFF option be printed.  It checks to see that an  appro-
     priate  file  exists.   If  you  are using DSR, there must be a
     "docname.MEM" file present in your directory;  if you are using
     ROF, there must be a "docname.DOC" file.  


                   ROF files can go only to the Diablo

          Documents  created  using  ROF  [1mmust[0m  be  sent to the
          Diablo printer.  They cannot reproduce  correctly  on
          any  other  printer  because spacing between words is
          done  with  special  Diablo  control  characters   to
          achieve variable spacing.  



     You  are  offered a choice of six printers:  the Diablo in ISD,
     the Diablo in Personnel, the console LA120 (not normally set up
     as  a  print  queue any more), the Advertising Department LA120
     (intended for use by Advertising Department),  the  Circulation
     Department  line  printer,  and  the computer room line printer
     (all uppercase) which can be used for fast proofs.  

     You can specify how many copies of the file you want printed.  

3 CHOOSE 

     The  CHOOSE  option  allows  you to completely specify the file
     name you are manipulating.  Its primary purpose  is  to  change
     document names within a single DOC session.  

     If  you specify the file [1mtype[0m, your specification will override
     the defaults used by DOC for Runoff source files.  That is, you
     can  create  and  edit  files  such  as  "docname.TXT" or "doc-
     name.LET".  You can also VIEW and RUNOFF such files.   However,
     the  RUNOFF  option  will  always  produce  either .MEM or .DOC
     files, and the PRINT, PURGE and DELETE options will always  ex-
     pect one or the other of these file types.  

3 PURGE 

     The  PURGE  option  allows you to clean up your directory after
     multiple edits and RUNOFFs have been performed on  a  document;
     it  will  use the document name you have specified and will de-
     lete [1mall but the most recent version[0m of  both  the  source  and
     output  files  for Runoff.  If you have DSR as your default Ru-
     noff, PURGE will operate on .RNO and .MEM files;  if  you  have
     ROF,  it will operate on .ROF and .DOC files.  The system Purge
     command will report the results of the purge;  for example,  if
     you PURGE all "DOC1" files, it will report a warning message if
     no "DOC1.MEM" file exists.  You should always purge  after  you
     have printed your file to conserve storage space on the disk.  

3 DELETE 

     The  DELETE option allows you to delete documents you no longer
     need.  Like PURGE, it will operate on different file types  de-
     pending  on  the  Runoff you have currently selected.  When you
     delete a document, [1mit is gone forever[0m;  there is no way  (short
     of backup tapes) to recover it.  If you do not delete documents
     you are no longer using, you will eventually run  out  of  disk
     space,  so  it  is  in your own interest to periodically "clean
     house".  

     You  can,  of course, use the standard DCL DELETE or PURGE com-
     mands to delete unwanted files.  

3 CHANGE_RUNOFF_VERSION 

     The  CHANGE  option changes between versions of Runoff.  If you
     are currently using DSR it will change to ROF, or  vice  versa.
     CHANGE  also changes the default file type to correspond to the
     Runoff version you are using.  

     When  you  select ROF, the following escape flags and sequences
     are automatically defined for you when you create a document:  
          
          [     Half space paper down (for superscript)
          ]     Half space paper up (for subscript)
          *     Shadow print next character
          ^*    Lock in shadow printing
          \*    Stop shadow printing
          

     If  you  want  to use any of the characters "*", "[", or "]" as
     regular text characters you can either "flag accept" them, like
     this:   "_*",  or you can "undefine" them as flag characters by
     including a command such as this in your document:  

          .NO FLAGS SPECIAL * 
     or 
          .NO FLAGS SPECIAL * [ ] 

     The  first command would allow normal use of the asterisk only;
     the second command would allow normal use of  all  three  char-
     acters.  

     To  re-establish use of "*" for shadow printing you would enter
     the line, 

          .FLAGS SPECIAL * 

3 INDEX 

     The  INDEX  option produces an index of all .RNO and .ROF files
     in your directory.  When you create a  document  using  DOC,  a
     subject  line  is always asked for and inserted into your docu-
     ment.  This subject line is reproduced by the INDEX option.  

     Here is a sample index:  
          
          Index for all RNO and ROF files
          DOCUMENT      SUBJECT
          -------------  -------
          ALTSTART.RNO   Alternate VAX startup methods
          RNOCOMPAR.RNO  ^*Comparison of Three Versions of RUNOFF\*
          RSXSYSGEN.RNO  RSX11M-PLUS POST SYSGEN NOTES
          SHACOMPAR.RNO  Comparison of shadow pair disks
          WHEREIS.RNO     Lost document
          FOLDER.ROF     File Folder Command Procedure: FOLDER.COM
          FOLDERDOC.ROF  CONTROL FILE TO PRODUCE FOLDER.DOC
          FOLDERHLP.ROF  CONTROL FILE TO PRODUCE FOLDER.HLP
          VAXDOC.ROF     ^*Bergen Record VAX Document System\*
          The following documents had no subject indicated.
             CHARTHED.RNO;1 - 7 records
             HELPDODOC.ROF;1 - 2 records
             HELPDOHLP.ROF;1 - 2 records

     Note  that  some  documents  are  listed with "no subject indi-
     cated".  This means either that the document  was  not  created
     using  DOC,  or  else  the subject line is no longer within the
     file.  Documents with multiple versions will be listed once for
     each version.  

3 TOGGLE_EDITOR 

     The  TOGGLE  option allows you to switch back and forth between
     two different text editor programs, EDT and EMACS.  EDT is  the
     standard  DEC text editor, and EMACS is a special multi-buffer,
     multi-window editor.  For more information on these editors see
     HELP  EDIT  and HELP EMACS, or read the related document on the
     editor.  

     Files created with EDT can be edited with EMACS, or vice versa. 

3 FOLDER 

     The  FOLDER option allows you to enter the "File Folder Mainte-
     nance" menu.  This is a sub-system of DOC that can be  used  to
     archive  documents  in a "file folder" with other related docu-
     ments.  For more information,  see  the  separate  document  on
     "FOLDER:  File Folder Maintenance" or type "HELP FOLDER".  



2 KNOWN_BUGS 

     Sometimes  when  you  exit  from EMACS, the screen display will
     "hang" after only a portion of the DOC menu has  appeared.   If
     this  occurs,  simply  hit  the NO SCROLL key in the lower left
     corner of the keyboard, and the menu display will complete.  

2 USER_DEFAULTS 

     DOC  will normally start up with EDT as the text editor and DSR
     as the Runoff program of choice.  You can change  these  during
     the session using options 10 and 12.  

     If,  however, you wish to use EMACS all the time as your editor
     and ROF as your version of Runoff, you can set  up  a  file  in
     your  directory  to  cause DOC to select different defaults for
     you.  

     You  can  use  DOC  to create this Defaults Control File.  Type
     "DOC DOCDEF.COM" or if you are already in DOC, use option 7  to
     change  your  document name to DOCDEF.COM.  Create the document
     (or file) using the "other" type document, and delete the  com-
     ment line at the top so you have a blank screen.  

     You  now need to create what is called a VMS Command Procedure.
     Here is a sample DOCDEF.COM command procedure to  set  yourself
     up with ROF as your Runoff and EMACS as your editor:  
          
          $! Set up default editor and runoff for VAXDOC.COM
          $ FTYPE :== .ROF
          $ FILESPEC :== MEMO.ROF
          $ OUTYPE :== .DOC
          $ USEDSR == 0 ! Assume user wants ROF.
          $ USEROF == 1
          $ RUNOFF_VER :== ROF
          $ TEXTED :== EMACS
          

     The first six lines define things for using ROF as your version
     of Runoff.  The last line selects EMACS as your text editor.  

     If  you wanted to set up DOC to choose EMACS as your editor but
     you wanted DSR for doing Runoff,  your  DOCDEF.COM  would  have
     only one line:  

          $ TEXTED :== EMACS 

     If  you  wanted ROF as your Runoff, but wished to retain EDT as
     your text editor, you would make your DOCDEF.COM with the first
     six lines exactly as shown above.  

     Once  DOCDEF.COM  has been set up correctly you will never have
     to change it.  

