HELP *DCL                                      Aaron Sloman January 1982

         CONTENTS - (Use <ENTER> g to access required sections)

 -- INTRODUCTION
 -- LOGGING OUT
 -- FINDING OUT WHO IS LOGGED IN
 -- READING AND SENDING MAIL
 -- DELETING AND PURGING FILES
 -- FINDING WHAT'S IN YOUR DIRECTORY
 -- FINDING OUT HOW BIG YOUR FILES ARE
 -- FULL DIRECTORY INFORMATION
 -- PRINTING OUT DIRECTORIES OF LIBRARY FILES
 -- FINDING OUT HOW MUCH DISK SPACE IS LEFT FOR YOU
 -- CHANGING DIRECTORY
 -- SUB-DIRECTORIES
 -- RUNNING POP11
 -- GETTING TO DCL FROM POP-11
 -- PRINTING FILES
 -- SEARCHING FILES FOR A STRING
 --  PROTECTING AND UNPROTECTING FILES
 -- CREATING AND REMOVING SUB-DIRECTORIES
 -- COMMUNICATING WITH OTHER LOGGED IN USERS
 -- MAKING INDEXES OF PROCEDURES IN YOUR FILES
 -- SORTING A FILE INTO ALPHABETICAL ORDER

See also HELP *DCLCOPY, TEACH *PRINTING;

-- INTRODUCTION -------------------------------------------------------

DCL is the first system you talk to after logging in. It prompts you
with a dollar sign '$', and understands quite a wide range of commands,
most of which can be abbreviated. When typing commands to DCL you can
type in lower case. DCL can't tell the difference between lower or upper
case, being a relic of an old-fashioned operating system designed for
terminals which can only type in upper case. If you make a typing error,
you can delete the last N characters you've typed, by pressing the DEL
button N times. To delete the whole line, hold down the CTRL button and
and press 'U' once (don't hold the 'U' key down). DCL will echo with
'^U' and move the cursor to a new line. You can then type the command
again. Each command is terminated by pressing the RETURN key, after
which you cannot modify the command with the 'DEL' button or CTRL-U.

Some help on DCL  comands can be obtained by giving the command HELP in
reponse to the DCL dollar prompt after logging in:

    $ HELP

This will tell you what information the DCL HELP command can give you.
Usually requests to DCL for help can be abbreviated, e.g.

    $ HELP DIRECTORY

can be abbreviated to

    $ HE DIR

Sometimes the help file printed out will indicate that there is further
information. For example, the above command will tell you there is
further information on '/SINCE'. You can get it printed out by typing
the same thing as before, followed by the extra item, e.g.

    $ HELP DIRECTORY /SINCE or
    $ HE DIR /SI

There is also a HELP facility in POP11. This does not accept
abbreviations.

POP11 users have access to all the DCL commands that are available to
other VAX users. Some additional commands are available only to POP
users, whose LOGIN.COM files have the effect of defining new DCL
commands. In the commands given below, the '$' is included as a reminder
that you have to give the command to DCL, not POP11. If you are talking
to POP11 you can give a DCL command by first typing the '$', provided it
is the FIRST character on the line. If you are already talking to DCL,
it will 'prompt' you with '$', and you should not type it.

The following are among the DCL commands which you will find useful:
(some of the commands are not normal DCL commands but ar made available
with POPLOG and may not have been installed by the system manager)

-- LOGGING OUT --------------------------------------------------------

The command

    $ LOGOUT

can be abbreviated to

    $ LO

and will log you out. To get information on resources you have used while
logged in, type

    $ LO/FULL

(You can abbreviated 'FULL' to F).
Before logging out, it is wise to type

    $ KEEP3

which will get rid of old versions of files, saving the three newest
versions of all your files. (More on PURGING and deleting files below.)

-- FINDING OUT WHO IS LOGGED IN ---------------------------------------

    $ WHO
This will print out information about logged in interactive users. The number
on the right is the 'process number'. You can get more detailed information
with the command

    $ SHOW SYSTEM

but this will provide information that is intelligible only to experts. To
find out more about the SHOW facility type

    $ HELP SHOW or
    $ HELP SHOW SYSTEM

-- READING AND SENDING MAIL -------------------------------------------

The following command will enable you to talk to the MAIL program:

    $ MAIL

It will prompt you by typing:

    MAIL >

on the screen. You can then just press the 'RETURN' button to
read your mail, or you can give a command to SEND mail to someone,
DELETE a message you've received, REPLY to a message you've received, or
print out a DIRECTORY of messages stored in your mail file. To get
information on these options, type:

    MAIL > HELP

I.e. just type 'HELP' then press return. 'HELP SEND' will tell you how
to send mail. If you just go on pressing RETURN it will print out unread
mail. At the end it will say 'no more messages', but if you press RETURN
again, it will cycle through the messages you've read previously. Type D
then RETURN to delete the last message you have read. (This will help to
save space on the disk.)

-- DELETING AND PURGING FILES -----------------------------------------

    $ DEL FOO.P.7
    $ DEL FOO.P;7

These two are equivalent. They will delete version 7 of your file FOO.P
Previous versions are left intact.

    $ DEL FOO.P.*
    $ RM  FOO.P

These two are equivalent. They will delete ALL versions of your file
called FOO.P. '*' is called a 'wild card'.

When you do a lot of editing you may find that you have multiple copies
of the same file. The copies will have the same name, but a different
version number. The largest version number will refer to be most recent
version of the file. It is often useful to get rid of all but the last
few versions, to save space, since with multiple copies you can easily
run over the amount of space allocated to you on the disk. The simplest
thing to do is to type

    $ KEEP3

which is equivalent to

    $ PURGE /KEEP=3

This will get rid of all versions of your files except the three most
recent.

If you are VERY short of space, type

    $ KEEP2

instead. This will get rid of all but the two most recent versions of
all your files.

As a last resort, when desperate, you can type:

    $PURGE

This will keep only one version of every file. This can be dangerous,
since often (especially after running out of disk space) the latest
version of one of your files will be incomplete. If you happen to have a
very big file called, say FOO.P, and have two copies of it, and you are
SURE that the latest version is OK, then you can type:

    $PURGE FOO.P

to get rid of all but the latest version.

You can also use VED for purging. The command ENTER PURGE reads in
information about your current directory and gives you instructions for
purging. See HELP *PURGE.

-- FINDING WHAT'S IN YOUR DIRECTORY -----------------------------------

    $ DIR

Prints out names of all files in your directory

    $ LSQ

Like DIR, but prints only most recent versions. Most useful for a
Quick LiSting of your files.

    $ DIR *.P

Prints out names of all files ending in '.P'.

    $ DIR *.P /DATE

Prints out names and creation dates of all your files ending in '.P'

    $ DIR *.*.0 /DATE

Prints out names and creation dates of most recent versions of all
your files. If you give '0' as a version number, then it is interpreted
as the most recent version.

    $ DATE

This is just an abbreviation for $DIR/DATE. You can also ask for a
subset of your files to be printed out, e.g.

    $DATE/SINCE

will print out the files created today. To print out files created
yesterday or today, type:

    $ DIR /DATE /SINCE:YESTERDAY
    $ DATE /SINCE:YESTERDAY

If you want all files created since 11:30, or since 1st February, type:

    $ DATE /SINCE:11:30
    $ DATE /SINCE:1-FEB

For more information on 'SINCE' options give the DCL commands:

    $ HELP DIR /SINCE
    $ HELP SPECIFY

You may have files in your directory created by somebody else. You can
find out who the system thinks created your file with the WHOSE command,
e.g.

    $ WHOSE FILE.P

will tell you who owns FILE.P

If you merely wish to know which files have multiple versions, prior to
purging, use the

    $ MULTI

command. For details see HELP *MULTI.

You can examine your directory from inside VED using the ENTER DIR or
ENTER FDIR commands. See HELP *DIR.

-- FINDING OUT HOW BIG YOUR FILES ARE ---------------------------------

    $ DIR /SIZE

Prints out names of all your files with sizes in blocks. A block is
512 characters, including spaces and line-breaks.

    $ SIZE

This is an abbreviation for DIR/SIZE

-- FULL DIRECTORY INFORMATION -----------------------------------------

You can get more information than you will be able to make sense of by
typing:

    $ DIR/FULL

If you just want to get information about SIZE, creation date, and
protection, you can type

    $ FDIR MYFILE
    $ FDIR *.P
    $ FDIR

The last will give information about all the files. If you want latest
versions only, do

    $ FDIR *.*;0

For more information on options for the DIR(ectory) command, type HELP
DIR to DCL.

-- PRINTING OUT DIRECTORIES OF LIBRARY FILES --------------------------

The POP11 system uses several libraries, i.e. directories of files for
use with POP11. One of them is a collection of library programs which
form an extension to POP11. These are programs which are compiled when
you use the command LIB in POP11. (See HELP *LIB). You can print out a
list of library programs with the DCL command

    $LIBDIR

You can look at the contents of such a file using the VED command

    <ENTER> SHOWLIB <file name>

There are also  libraries of HELP and TEACH files. To get a list of
TEACH files, type

    $TEACHDIR

To get a list of HELP files do

    $HELPDIR

The HPRINT command can be used to print out HELP files on the big
printer in E202.

Finally, there is a library of POP11 system information, for REFerence
purposes. A list of the files can be printed out using the DCL command:

    $REFDIR

These files can be accessed with the ENTER REF command using VED. They
will be of use only to advanced programmers.

-- FINDING OUT HOW MUCH DISK SPACE IS LEFT FOR YOU --------------------

    $ SHOW QUOTA

This will tell you how much space (in blocks) is available for your
files, and how much you have used. The amount specified as 'overdraft'
doesn't seem to be of any use.

-- CHANGING DIRECTORY -------------------------------------------------

When you refer to files the operating system assumes they are in your
disk directory unless you specify a directory explicitly. If your login
name is
        ADOLFZ
then your directory will be called
        [ADOLFZ]
and if you have a file called MYFILE.P, then other users can access it
(unless you have protected it) by specifying the directory as well as
the file name. E.g. they can type

        $DATE [ADOLFZ]MYFILE.P

to find out when your file was created. If no directory is specified in
a file name, then the current DEFAULT directory is used, normally your
login directory. You can change the default by typing, for examle

    $SET DEFAULT [ADOLFZ]

or the abbreviated version:

    $SE DEF [ADOLFZ]

If you don't like typing the brackets you can use the 'CD' command to
Change Directory:

    $CD ADOLFZ

    $ HOME

This can be used to return you to your normal directory. It is
equivalent to

    $SET DEF SYS$LOGIN

-- SUB-DIRECTORIES ----------------------------------------------------

The VAX file system can be thought of as uside-down- tree-structured,
with branches fanning out down the tree:

                                top
                              /  |  \
                           /     |    \
                         /       |      \
                   [DIR1]      [DIR2]     [DIR3]
                   / | \       / | \       / | \
                 /   |   \   /   |   \    /  |   \
            [DIR4] [DIR5] etc, etc.
             /  \
            /    \
          etc     etc

At the top of the tree is the basic directory on the disk, with
information about all the user directories. Each user directory can also
have sub-directories, and those in turn can have sub-directories.
Subdirectories, (created using MKDIR, see below) are useful if you want
to sort your files into different categories. If your current directory
has any subdirectories, they will be shown by the DCL DIR command as
having the suffix '.DIR'.

If you have a sub-directory  e.g. called POPLIB then you have to put a
'.' in front of its name, to get access to it, or files in it, so to
find out what is in your subdirectory, POPLIB.DIR, type:

    $ DIR [.POPLIB]

E.g. to change to your subdirectory called POPLIB, if you have one, do:

    $SE DEF [.POPLIB] or:
    $CD .POPLIB

If the first directory name starts with a dot, as in these examples, it
will refer to a subdirectory of your current directory. The subdirectory
may itself have subdirectories, which can then be accessed in the same
manner. If you are in a directory which has a subdirectory called, say
[.LIB1], which in turn has a subdirectory called [.LIB2], then you can
go directly to the second directory, using

    $CD .LIB1.LIB2

To go to the subdirectory called POPLIB in ADOLFZ's directory:

    $CD ADOLFZ.POPLIB

The fact that there is no dot before 'ADOLFZ' means it is to be taken as
a 'top level' directory, not a sub-directory of your directory.

After any of the CD or SET DEF commands, you can access files in the
specified directory without specifying the directory, e.g.

    $TYPE MYFILE.P              instead of
    $TYPE [.POPLIB]MYFILE.P

If your login name is ADOLFZ and you have used the CD command to get to
a; subdirectory, then you can return to the orignal directory with the
command:

    $ UP

which takes you one step UP the directory tree. An equivalent command
is:

    $ SET DEF [-]

You can't type

    $ CD -

to go up, since DCL interprets the '-' at the end of the line to mean
you haven't finished the command!

If you want to step up a level and go down to another sub-directory, say
[ADOLFZ.REF], then you can give the command:

    $ SET DEF [-.REF] or:
    $ CD -.REF

-- RUNNING POP11 ------------------------------------------------------

The following command formats are available:

    $POP11

This will run POP11. If you have a file called INIT.P it will be loaded.
You can then call VED or TEACH from inside POP11. When you do that, if
you have a file called VEDINIT.P it will be loaded.

    $POP11 PROG ARG1 ARG2 ARG3

This will run POP11, then look to see whether in your directory, or
in the POP11 library directory there is a file called PROG.P, in which
case it will be loaded. The variable POPARGLIST will be given a list of
strings

    ['PROG' 'ARG1' 'ARG2' 'ARG3']

so the program can find out how it was called.

    $POP11/VED ARG1
    $VED ARG1

These two commands are equivalent. POP11 will be run and will then
look for a saved POP11 image called VED.PSV, either in your directory,
or in the POP11 library. It will restore the image, and set POPARGLIST
to be a list with a string: ['ARG1'] The version of VED.PSV in the
library will immediately call VED, on the file named in the argument.

    $POP11/FOO

As above, but looks for a saved image called FOO.PSV. You can create
images using the POP11 procedure SYSSAVE. (See HELP SYSSAVE).

    $ELIZA

This runs a saved image containing the ELIZA program. You can run
POP11, then type

    :LIB ELIZA;
    :ELIZA;

but it is much quicker to run the saved image from DCL

-- GETTING TO DCL FROM POP-11 -----------------------------------------

The POP-11 Macro DCL can be used to go temporarily to DCL from POP-11.
The POP-11 system will suspend itself. When you get the DCL prompt:

    $

you can then give DCL commands.
When you wish to return to POP-11 type

    $ Q
or
    $ LO

(don't type '$' - that's the prompt).
You will then return to POP-11 and continue from where you were. If you
wish to go direct from VED to DCL do

    ENTER : DCL

(I.e. type the ':' to tell VED this is a POP-11 command).

Note for experts: If after going to DCL from POP-11 you use the DCL
ATTACH command to get back to the suspended POP-11 process, then
thereafter the DCL command will work more quickly.

-- PRINTING FILES -----------------------------------------------------

The DCL PRINT command will print out a file for you on the line printer
in use at your installation. E.g.

    $ PRINT MYFILE.P

If your file name does not include a "." then you should add one at the
end, otherwise the PRINT command will assume that you intended ".LIS" to
be at the end. (One of many ways in which DCL doesn't do exactly what
you want most of the time.) E.g.

    $ PRINT MYFILE.

The easiest way to print a file is to get it into the VED editor, then
press ENTER, then type PRINT, then press RETURN. This will also work for
library files and for help and teach files.

-- SEARCHING FILES FOR A STRING ---------------------------------------

The command used for this 'GREP' (Global REPort ??) is named after a
similar command in the UNIX operating system, but UNIX users need to
remember than on the VAX the string to be looked for comes last, not
first.

    $GREP *.P DEFINE FOO

This will search through all the latest versions of your '.P' files, and
print out any lines containing 'DEFINE FOO'. This is a useful way of
finding out where you have defined a procedure, if you've forgotten. To
find out which files used the procedure, you can type

    $GREP *.P FOO

This will print out all lines containing 'FOO',
telling you which files they are in.

You can also search a particular file to see which lines contain
procedure definitions, e.g.

    $GREP MYFILE.P DEFINE

The general form is

    $GREP <filespec> <string>

No comma should precede the <string>. If you leave out the <string> grep
will prompt you for the search string. You can, in that case, include a
search string with a trailing space, e.g. you can type: 'DEFINE '
(without the quotes) then press RETURN. This will print out all
procedure headings, without printing out the lines containing
'ENDDEFINE'

-- PROTECTING AND UNPROTECTING FILES ----------------------------------

    $PROT MYFILE.P

This alters your file so that other people can look at it but not
edit it or delete it. To do this to all your *.P files, do

    $PROT *.P

If you do protect your files in this way, it will occasionally get in
the way of tutors helping you. E.g. they will have to log out and log in
as you to alter one of your files. We have set the default protection so
that every time you create a file it is fully accessible to anyone.

    $UNPROT MYFILE.P

If you happen to have protected a file so that you cannot delete it,
or so that others cannot look at it, etc., this command will remove all
the protection.

For further information about protecting files, type, to DCL

    $HELP SET PROTECTION

-- CREATING AND REMOVING SUB-DIRECTORIES ------------------------------

    $MKDIR POPLIB

This will create in your director a sub-directory called POPLIB.DIR.
You can access it using CD (see above), or using the directory name

    [.POPLIB]

    $RMDIR POPLIB

This will remove the directory, provided that it is not empty.

-- COMMUNICATING WITH OTHER LOGGED IN USERS ---------------------------

If a user called FRED is logged in, the command

    $ PHONE FRED

will cause a message to appear on FRED's terminal saying you want to
talk to hime. In order to respond he has to leave whatever he is doing,
e.g. leave POP11, and go back to DCL. He should then type

    $ PHONE ANSWER To DCL.

Each of you can then type, and what you type will occur on both screens,
one in the upper half, one in the lower half. When you've finished your
conversation, type CTRL-Z.

-- MAKING INDEXES OF PROCEDURES IN YOUR FILES -------------------------

If you want all the procedure headings in your file FOO.P to be stored
in a file called FOO.IND you can type

    $ MKINDEX FOO FOO

If you want the index to be called PROCS.IND type, instead:

    $ MKINDEX FOO PROCS

If you want an index file listing all the procedures in all your '.P'
files, do

    $ MKINDEX * PROCS

The file will be called PROCS.IND. There is no attempt at alphabetic
sorting. The procedures are simply grouped by file, and left in the same
order as in the file.

-- SORTING A FILE INTO ALPHABETICAL ORDER -----------------------------

The command SRT requires two arguments, the input file name and the
output file name. Thus if you have a file called NAMES with a name on
each line and you want to create an alphabetically ordered version
called NAMES.OUT do

    $ SORT NAMES. NAMES.OUT

N.B. the dot after 'NAMES' is essential. The VAX sort program has a
variety of complex facilities, which you can read about using the DCL
commands

    $ HELP SORT
    $ HELP SORT QUALIFIERS

See also
    TEACH *FILES         - introduction to what files are
    TEACH *TEACHFILES    - an overview of TEACH files
    HELP  *HELPFILES     - an overview of HELP files
    HELP  *DOCUMENTATION - overview of means of accessing documentation

-----<Copyright University of Sussex 1987.  All rights reserved.>-------
