---------------------------------------
                    V M S    M I N I - P R I M E R 
                ---------------------------------------
              
       Prepared by Dr. Giorgio P. Ingargiola and Kenneth B. Sall
       Rewritten by John Fowler, January 31, 1995
 

              ***  NOTE ABOUT SYMBOLIC CONVENTIONS ***
 
     If a command string or symbol appears between wavy brackets, { } ,
     then it is a local symbol defined by Temple University, not part
     of the standard Open-VMS.  All such Temple-specific symbols are 
     defined in: DISK$USER:[NEWS.COMS]SYSYM.COM and the curly brackets
     are NOT typed when using these locally defined TEMPLE symbols.  

     In this document all other capitalized commands & symbols are 
     common to all Open-VMS installations, and are standard Open-VMS 
     commands.  For example:  {'SU'} means the string 'SU' ( including 
     the single quotes ) is specifically defined at our installation.
     ( In this example, 'SU' is the same as "Show Users\interactive\Full" ).

 
 I.  A FEW WORDS CONCERNING VAX/VMS
     ------------------------------      

     DEC's Virtual Address Extension / Virtual Memory System is a multiprogram-
     ming system that supports multitasking.  Virtual address space is 4-Giga-
     bytes.  A block consists of 512 bytes.  The file system has a hierarchical
     directory structure.  All Temple users' directories reside on the DISK$USER
     device.  This is the default disk device and directory - DISK$USER:
 
 II.  LOGGING IN / LOGGING OUT
     ------------------------
  
     Logging Into A CIS VMS Computing Resource:
     ------------------------------------------
         After flipping the VT100 series terminal power switch (left rear) to
         "1" position, and then gaining the system's attention with one or 
         more cr's,  you log in by entering CONNECT followed by the computer 
         resource NODE NAME you wish to use.  ( The LOCAL> prompt means you
         are talking to the terminal server. )
 
            LAT VADER  -----( Name of the computer - ie: VADER / FALCON / etc )
 
         You will then see the identifier of the machine you selected, asking
         for you to "Enter Username> ".  Enter the username you were assigned,
         and the password, just as they are on the sign-up sheet you were given
 
            Your_Username          and         Your_Password 
 
         All class accounts force you to change your password immediately.
         If this applies to your account enter your new password  ( the
         password of your choice ) twice, as prompted for.  On any account
         the password may be changed at any time by typing the following
         command at the "$" prompt.  ( Note: The standard  Open-VMS Operating
         System Prompt is the dollar sign character  -  ( "$" ).
 
            SET PASSWORD  <-----( Prompts are given after this is entered )

 
                                                                      VaxPrimer
                                                                      Page - 2
 
     Logging out of a CIS VMS Computing resource:
     --------------------------------------------
 
        Typing either:        BYE       or       LOGOUT 
        will log you out ( after a summary of your activity is displayed ).
 
 
 III.  GENERAL COMMAND SYNTAX, FILENAMES, EXTENSIONS, & VERSION NUMBERS
       ----------------------------------------------------------------
 
        The basic syntax for operations on a single file is:
 
            command-verb  filename       EX:   TYPE Myfile.txt
 
        Note: A space character is the separator.  Uppercase/lowercase
            distinction is not significant at the command level in 
            the Open-VMS Operating System.  ( UN-like the UNIX Op Sys )
 
        For operations involving multiple files the command is followed by
        multiple filenames separated by commas:

            command-verb  file1, file2, file3 ...   <--- Note comma separators
 
        For example:
            DELETE TEST.txt, JUNK.txt, TEMP.TXT  <--( Note Comma separators )
            
        All names of files ( called FILESPECS ) must fit the following pattern:
 
            Simple ---> filename.Extension;Version   
                or
            Full specification:  ( Uses DECNET to access remote files )
            ---> Node-Name"username passwd"::disk:[dir.sub]filename.ext;vers
 
        where "filename" is 1 to 9 alphanumeric characters ( with a leading
        alphabetic character ), followed by a period ( with no spaces ),

        where "Extension" is 1 to 3 alphanumeric characters, followed by a
        semi-colon, and then a "Version" number, which is automatically
        incremented each time you EDIT that file.
 
        Note: Version numbers may usually be omitted in command strings, in
              which case the default file used has the HIGHEST version number.
 
        The following are examples of valid VMS file names you might see:
 
              MYFILE.TXT;1          VAX.TXT;12             MYFILE.TXT;5
              YOURFILE.TXT;7        VAXPRIMER.TXT;2        A.1;3

        The asterisk ( * ) is a WILDCARD character that matches any string
        without spaces.  For example, given the files above, *FILE.TXT would 
        match the first three, *.TXT would match the first four, *.txt would 
        match only the last one, and *A*.* would match only the last three.
        The % character is also used as a wildcard, but substitutes for a 
        single character.  Most VAX VMS commands can be abbreviated to either
        three or four characters.

 
                                                                      VaxPrimer
                                                                      Page - 3
 

 
 IV.  USING THE VMS HELP COMMAND
      --------------------------
 
       The command: 
 
            HELP  command
 
       provides general on-line help for the command "command", as well as 
       providing pointer details about the command's QUALIFIERS ( options
       that follow a slash when giving a VMS command ).
 
 
 
   Examples:
 
       HELP  - provides list of Open-VMS commands for which help is available
 
       HELP  DELETE  - discusses DELETE, shows syntax & qualifiers.
 
       HELP  DELETE file /CONFIRM - provides info ONLY for the /CONFIRM
                     qualifier for the DELETE command when used with files.
 
       HELP  DELETE *  - using the wildcard enables you to read about ALL the
                         qualifiers of DELETE, but NOT the general command
                         syntax or explanation.
 
      { HP }  - A Temple-defined symbol that evokes the public procedure file
                DISK$USER:[NEWS.COMS]HELPRINT.COM, which prompts you to display
                print, and/or save or delete a copy of help information.


 
      The HELP command can nest at various subtopic levels.  A carriage return
      will always move you up one level of nesting.  
       
      If you forget the qualifiers or subtopics while in HELP, responding to
      the HELP prompt with " ZZZ " will tell you no help is available for
      for " ZZZ "  but will also repeat the possible choices.
 
      Experimentation with the HELP command can be quite instructive.
      Simular on-line HELP is available within any Editor program and
      within MAIL, PHONE and EDIT facilities
 
      To make a file which contains the text of the help file as it 
      pertains to the Open-VMS COPY command section of examples type:
 
             HELP COPY EXAMPLES /OUT = HELP01.TXT   
 
      and then print out the file help01.txt which was created.  Most
      VMS commands allow the output which normally would have been 
      displayed on the screen to be diverted to a file.  This is a very 
      handy feature, which you can often utilize to your benefit.


 
                                                                      VaxPrimer
                                                                      Page - 4
 
 V.  COMAND FOR OPERATIONS ON FILES
     -------------------------------
 
     A small subset of the VMS file manipulation commands follows:
 
     CREATE filespec - creates and opens a new file for writing.  Use Z
                       to close file when done typing it in from keyboard.
 
     CREATE /DIRECTORY dirname  - creates and opens a new subdirectory on level
                                  down from the current default directory.
 
          Once created, it takes 2 steps to delete a directory:
          ( The directory MUST be empty to delete it. )  
 
                 SET FILE dirname.DIR /PROTECTION = ( O:RWED ) 
                 DELETE dirname.DIR
 
          Your default directory must be where the dirname.DIR file is to
          do this deletion of the directory.  The first step UN-protects the
          file.  All directory files are set to O:RE by default when created.
 
    TYPE filespec - lists contents of file on terminal screen.
 
    PRINT filespec - The standard VMS command to produce hard copy on the
                     default printer.  Type SETPR  to define your default.
 
    COPY oldfile newfile - ( note space separator ) creates duplicate of
                           "oldfile" and saves it as file named "newfile".
 
    RENAME oldname newname - changes file named "oldname" to a file "newname".
 
    The distinctions among the various DELETE & PURGE commands are important:
 
    DELETE junk.txt;4  - ( Note explicit version # is used here ) destroys
                          ONLY version #4 of JUNK.txt WITHOUT PROMPTING FOR
                          VERIFICATION - provides no "are you sure" message.
 
    DELETE /CONFIRM junk.txt;4 - Same as above, but PROMPTS FOR VERIFICATION 
                                 before deleting the file junk.txt;4
 
    DELETE /LOG junk.txt;4 - deletes and PROVIDES MESSAGE about file deleted.
 
    DELETE *.*;* /except *.PAS - deletes all files in the directory except 
                                 files with the file extension .PAS   
 
    PURGE junk.txt - ( note NO version # is permitted with purge ) destroys ALL
                     BUT HIGHEST version of JUNK.txt and gives no message.
 
    PURGE /LOG junk.txt - same as above, but lists versions destroyed.
 
    PURGE - When used with NO filespec parameter it will erase ALL BUT
            HIGHEST versions of ALL FILES in current directory, and will
            give NO message about what is doing - USE JUDICIOUSLY!
 
    PURGE /LOG - same as above, but lists the deleted files purged on screen.

 
                                                                      VaxPrimer
                                                                      Page - 5
 
   A BRIEF OVERVIEW OF EDITING:
   ---------------------------
 
     EDIT  oldfilespec - Opens an existing file for writing
 
     Note: NO WILDCARDS are permitted in the filespec when you use this 
           command.  The Version number need not be used, it will default
           to the most recent version.
 
     EDIT  newfilespec - If nonexistent it creates and then opens a file
                         newfilespec for editing.  If previously non-existent
                         it sets the version number to "1" when saved.
 
     EDIT oldfile /OUTPUT = newfile - Opens "oldfile" for writing, with the
                                      edited  result being stored in "newfile".
 
  Our default editor is EDIT/EDT, which is both a LINE-oriented editor and a
  full-screen editor.  If you have a VT terminal, you can shift to the SCREEN
  oriented mode of EDT by  typing "C"   ( or "CHANGE"  ); this will
  allow you to use the terminal's KEYPAD.   To obtain editing HELP in this 
  SCREEN-oriented mode, press the keypad key marked "PF2".  However, in the 
  LINE-oriented mode you type "HELP" instead.  Other editors, such as SOS and 
  TECO, are supported.  Type "HELP EDIT" for a summary of the available 
  editors on the VAX under the VMS Operating System.
 
 
VI.  FILE PROTECTION and INFORMATION 
     --------------------------------
 
  The command DIRECTORY ( allowed abbreviation: DIR ) provides a catalogue of 
  the files that exist in the current ( the DEFAULT ) directory. ( See Part 
  VII of this document for more information of use of DIR ).  This DIR command
  can take many qualifiers.  Type "HELP DIR" to find out more.
 
  Following are some Temple-defined variations of DIR:
 
    { DIRF } - provides FULL directory listing for EACH file; very long.
 
    { DIRL } - LONG listing ( shorter than above ), shows file size, last 
               modification date, protection, etc.
 
    { DIRT } - shows which files have been created or modified TODAY.
 
  The command:
    SHOW QUOTA   ( or use the Temple-Defined { FREE } or { USED } commands.
    displays the number of 512-byte blocks allocated, used, and available.
 
 FILE PROTECTION:
 -----------------
    The 4 protection classes are:  SYSTEM, OWNER, GROUP, & WORLD .
    The 4 protection flags are:
         R ead  [ allow use with:  type, print, copy ]
         W rite
         E xecute [ used with .COM and .EXE files ]
         D elete

 
                                                                      VaxPrimer
                                                                      Page - 6
 
 
 
 
 
    In your LOGIN.COM file ( see Part X ), the line:
 
       SET PROTECTION=WORLD:RE/DEFAULT
 
    permits ALL users to Read and Execute any file you create ( but not 
    Write or Delete ), unless you specifically set protection bits otherwise.
 
    The command:
 
       SET PROT /PROT = ( SYSTEM:RWED, OWNER:RWED, GROUP, WORLD )  filespec
 
    turns on complete protection for "filespec", but only for the owner ( and 
    the system manager ).  Only these can access a file with such protection.
 
    See HELP SET PROTECTION for more details.

 
                                                                      VaxPrimer
                                                                      Page - 7
 
 VII.  MOVEMENT THRU A DIRECTORY STRUCTURE 
       -----------------------------------
 
    DISK$USER:[yourusername] - this is your top-level, login directory which 
                               is a subdirectory of DISK$USER. If your username
                               is SMITH, SMITH.DIR is a subdirectory of
                               of DISK$USER and your login directory pathname 
                               is DISK$USER:[SMITH]
 
    SYS$LOGIN: - is the logical, common name for any user's login, but it 
                 is logically equivalent to the above directory.  Typing 
                 HOME  returns you here.
 
 
 VIII.  SUBDIRECTORIES
        --------------
 
    To create the subdirectory, " CLASS1 ", under DISK$USER:[SMITH] , type:
 
       CREATE /DIR  [smith.class1]  <-----( the brackets ARE required ! )
  
    Although your CURRENT ( DEFAULT ) directory will still be [ SMITH ], but
    if you type:  DIR *.DIR    you'll see a special file named CLASS1.DIR
    which is a directory file which is currently EMPTY. 
  
    To "move" to a particular subdirectory, ( make it your new DEFAULT
    directory ) use either of the following two commands:
 
        SET DEFAULT [home-directory.subdirectory]    ( Standard VMS Command )
    or  { TO }  home-directory.subdirectory
 
    For example:
        SET DEFAULT [smith.class1]
    or  TO  smith.class1
 
    To RETURN ("move up") to your login directory, use either:
       SET DEFAULT SYS$LOGIN     or
       { HOME }
  
    Either command will always return you to LOGIN DIRECTORY regardless of
    where you are in the directory structure.
  
    To "MOVE UP" ONE directory level, use either:
       SET DEFAULT [-]    or
       { UP }
 
    To display the Directory Name of your CURRENT default dir:
       { DN }
 
    To display the names of ALL SUBDIRECTORIES of the current directory:
 
      DIRECTORY *.DIR    or
      { LISDIR }   or
      { TO ? }
 
 
 
                                                                      VaxPrimer
                                                                      Page - 8
 
 VIII.  DEVICE INFORMATION
        ------------------
 
    SHOW QUEUE queuename - displays status of requested device and the
                           contents of the specified queue.
 
    { SQ1 }  - does same for the 10th floor Terminal Room printer
 
    { SQ3 }  - does the same for the 3rd floor printer.
 
    { SQDF } - Show Queues Devices Full displays contents
               and status of ALL QUEUES
 
    SHOW TERMINAL  - displays device type, parity, baud rate, and other
                     terminal characteristics.
 
    See HELP SHOW ( and HELP SET TERMINAL ) for more details.
 
 
 
 IX.  MAIL & PHONE UTILITIES AND SEARCH COMMAND
      -----------------------------------------
 
    The command   MAIL    evokes the MAIL utility to send messages or 
    files electronically.  After you get the prompt:  MAIL>  type HELP to
    get a list of MAIL commands available to you. The main MAIL commands are:
 
       READ, SEND, DELETE, PRINT, EXIT, DIR, FILE, FORWARD
 
       DIR  -  displays a summary of your mail.
 
       FILE -  enables you to convert a file received ( stored in MAIL.MAI )
               to a separate file in your SYS$LOGIN.
 
       FORWARD  to send mail you've received on to one or more other users.
 
    The command:  PHONE   evokes the PHONE utility which permits 2 or more 
    users to communicate with each other in screen windows on their terminals.
    After you get the prompt PHONE> you can do any of the following commands:
    ( Type HELP to obtain assistance. )  The main commands are:
 
       DIAL smith  - Either command dials the user Smith, and then beeps the
       PHONE smith   terminal waiting for Smith to type ANSWER .
 
       ANSWER  - Instructs phone utility to accept an incoming call
 
       EXIT  or Z - Breaks the current PHONE communication link.
                              Note:  You MUST use Z if you trying to
                              terminate a phone session with another user.
 
   SEARCH filename(s) string(s)    <--- Use commas to separate 
                                            multiple filenames and strings
 
   The SEARCH command evokes the VMS SEARCH utility that finds occurrences 
   of the requested string(s) in one or more specified files.

 
                                                                      VaxPrimer
                                                                      Page - 9
 
 
 
   For example:
      
      SEARCH  *  package  - displays ALL the occurrence(s) of the
                            string "package" in ALL the files in the 
                            current directory.
 
      SEARCH  thisfile.ada  package  - displays occurrences ( if any )
                                       of "package" in the specified file.
 
      SEARCH  thatfile.ada  package, text_io - displays occurrences of EACH 
                                               of the 2 strings PACKAGE and 
                                               TEXT_IO in file THATFILE.ADA
    See HELP SEARCH for more details.
 
 
 
 X.  COMMAND FILES  & LOGIN.COM
     --------------------------
 
    A VAX command file is an executable sequence of system-level commands;
    such command files have the extension   .COM
 
    To execute the command file DOIT.COM, type either:
 
       @DOIT.COM   or  @DOIT   ( The .COM extension is assumed with @ )
 
    To execute a file not in your current directory, give the full path name.
    For example to use the .COM file greetme.com in the [NEWS] directory type:
 
       @DISK$USER:[NEWS.COMS]greetme.com
 
    For more details type HELP PROCEDURE  and explore the options presented.
 
 
 
 LOGIN.COM USER INITIALIZATION FILE
 ----------------------------------
 
    As you login, the system checks your directory for a start-up file which
    is named LOGIN.COM  where you put any VMS commands that you always want to
    be executed each time you log in.  After each edit of your LOGIN.COM, you 
    can test out your changes by typing:
 
       @LOGIN     <---- This forces the commands to be executed without 
                            having to log out, and then log in again.
 
    As mentioned earlier, the command file SYSYM.COM, located in the directory
    DISK$USER:[NEWS.COMS], contains system-wide symbols pre-defined for all
    Temple users.  This is one of the files executed between your correct 
    password entry and the VMS System "$" prompt.  ( These are the symbols
    presented in this document between wavy brackets. )  You may wish to do:
 
       PRINT DISK$USER:[NEWS.COMS]SYSYM.COM 

 
                                                                      VaxPrimer
                                                                      Page - 10
 
 
 XI.  OTHER MISCELLANEOUS USEFUL VMS COMMANDS
      ---------------------------------------
 
 
   SHOW USERS  ( or { SU } )  - displays names of users logged in.
   SQA  -  See contents of all queues ( including print queues )
 
 
   There are a number of other symbols & escape sequences defined in your 
   LOGIN.COM file which have not been discussed in this document.
 
 
   Control Characters:
   -------------------
 
    ^C or ^Y  - Stop execution of any programs & cancel command interpretation.
                from any .COM file which was used as a source of the commands.
                Control C should be used first.  Control Y is a more severe
                command, and shoud be used only when control C has failed.
 
    ^Z  - Signals end of input, such as end of letter in MAIL, or end of 
          communication link in PHONE.  In other places signals END-OF-FILE.
 
    ^0  - Discards terminal output until next end-of-file.
 
    ^S  - temporarily suspends terminal output. ( Ascii X-OFF char is sent )
 
    ^Q  - Resumes suspended terminal output.    ( Ascii X-ON char is sent )
 
    ^T  - Shows time of day and CPU time used.  Something to do when bored, 
          while waiting for the compiler to be done.  Note that ^T only
          has this function if the following is in your LOGIN.COM:
 
          $ SET CONTROL=(T)