2.1 Introduction to VAX and the SLAC DECs
VAX (Virtual Address eXtension) is a 32-bit computing system developed in the mid-1970s by the Digital Equipment Corporation (DEC) as an extension of the older 16-bit PDP-11. VAX has a huge number of addressing modes and can execute several low-level operations all in a single instruction.
The native VAX operating system is DEC's VMS (now called OpenVMS – see section 2.15). The VAX architecture and OpenVMS operating system were engineered to take maximum advantage of each other, as was the initial implementation of the VAX Cluster. The DEC Alpha, also known as the Alpha AXP (or just ALPHA), is a 64-bit system developed to power successors to the VAX line of computers. It is used in a variety of workstations and servers and it supports the VMS Alpha operating system, as well as Digital UNIX.
There are several computing systems used at SLAC, many of which are DECs:
All of the above nodes will recognize your user login but keep in mind that support for the VAXes is waning, so MCC and MCCDEV are preferred over SLC, SLCSRV, MCCA1, or MCCA2. VMS ITANIUM is transparent to MCC.
All disk space should be available from either MCC or MCCDEV, so it doesn’t matter which you log in to in terms of accessing your files. The functionality of the same program for different machines may vary.
With the exception of Section 6, this document assumes you’ll work on MCC, but the commands described should work just as well on MCCDEV. The rest of this document refers to these systems in the generic as VAXes, because the VAX has been the umbrella for all of them (save LINUX & UNIX).
2.2 Logging in and out: Local and Remote Access
There are multiple ways to log in to the VAX. The most common are: through an already open DEC Terminal (“DECterm”) (2.2.1), by logging in to a workstation (2.2.2), or login via remote access (2.2.4). Macintosh Classic, Ambassador, and Elaine logins are not supported, but Mac OSX is (2.2.3).
2.2.1 Logging in from a DECterm and DEC routing
If a workstation has already been logged in, there might be an open DECterm that you can use. There will be a prompt (usually looks like MCC>) at which you can type after you select the desired DECterm (i.e. click in it with the mouse, or double click on its icon). To log in type: set host MCC or set host MCCDEV. If the selected VAX is up, then you will be prompted for your “username” and “password.” If there aren’t any free DECterms you can start one by choosing “DECterm” from the “Applications” pull-down menu in the Session Manager Window. Once the DECterm pops up, use the set host command to log in. About DEC routing: SCCS only supports TCP/IP. They do not bridge DEC's MOP protocol, nor have they routed DECnet phase IV since 1999, or IPX (Novell's Netware protocol); by policy IPX is blocked at routers. Anyone who believes they need DECnet phase IV support should migrate to DECnet Phase V (DECnet applications over TCP). The contact person at SLAC is Charley Granieri.
2.2.2 To Log in a Workstation, EOIC_DESK, or MCCSCP Account
If the workstation of choice is not already logged in, it will have only one window on the screen underneath the word “DIGITAL” in very large font. The window has two fields for your username and password. Click OK after you’ve entered the data. This connects the workstation to the VAX and starts a window manager. Using the session manager window, pull down the “applications” menu and choose “DECterm.” In a few moments, a DECterm will pop up already logged in as you, no need to set host. The MCCSCP or EOIC_DESK accounts may only be accessed on MCCSCP or the workstation on the EOIC desk. Log in to these accounts by typing the username. The password may be obtained from the EOIC, as it is in the key safe.
2.2.3 Logins from a Macintosh Classic or Mac OSX
The AppleTalk protocol is no longer routed between SLAC IP subnets as of October 1, 2001. Devices which are on different IP subnets will not be able to communicate with each other using this protocol, thus the Macintosh is no longer a supported platform at SLAC. Individual departments and users are responsible for the total cost of maintaining the Macintosh, keeping up with anti-virus software, etc. Visit The SLAC Mac Page, and The SLAC AppleTalk Page for details.
Since Mac is not supported, the Macintosh Classic can not access the network; however, Mac OSX platforms should be able to access the network by using either Terminal or X11 and then just issue the following on the command line:
For 10.4 and above:
ssh -Y -A username@node
for 10.3 and below
ssh -X -A username@node
2.2.4 Remote Access
The methods of connecting to the Internet have evolved rapidly since the first release of this document, and the most current information on various Internet connections supported by SLAC Computer Networking is maintained on their website here, from which the salient points below were taken. For information specific to connecting via residential access, go to the SLAC residential access page.
2.2.4.1 DSL and Special DSL Considerations
With DSL you are always online. SLAC supports four DSL service choices from AT&T DSL and Stanford DSL. SCCS is the SLAC contact for AT&T DSL and Stanford DSL Service. The remote user will need a router or bridge unit, supplied by the DSL service provider, to connect the DSL line and workstation to the DSL service. SCCS will submit installation requests, handle the billing, and provide limited help when there are questions and problems. The monthly service charges and any installation cost for your DSL service will be charged back to the account number you provide on the DSL Service Request Form. With DSL, you’re always online and you will be outside of the SLAC network firewall so the DSL connection is similar to being on the public Internet. To access "SLAC only" web pages or other restricted SLAC resources and to appear to be inside the SLAC network firewall, use Citrix or VPN (see below). There are several special requirements to use DSL through SLAC: you must have a SLAC charge number, an existing AT&T phone service, a 10BaseT Ethernet interface card with a network cable, and the ability to configure IP information on your computer. SLAC credit cards are not acceptable for paying for these types of services. If you do not meet these requirements, don’t panic! Your DSL request will be resubmitted every 2 or 3 months, and SCCS has also made billing arrangements with Earthlink, which may suit your needs. If you still do not qualify then it is suggested that you contact SCCS or use the new SLAC dialup service (see below). Bear in mind that your DSL workstation is wide open to hacking because of being on a public network. There is NO absolute way to prevent hacking if your system is up and has a DSL connection. Keep your system well maintained and up-to-date with the latest security patches and run the latest virus software. Upgrade to Windows XP SP2, if possible, and turn on the Windows Firewall. For more detailed DSL resources, visit SLAC DSL page.
2.2.4.2 Intranet Access via Citrix, RPC, SSH, and VPN
Individuals that have been utilizing services which are only available to systems directly connected to the SLAC network may need to use Citrix, RPC over HTTP (for email), SSH, or VPN services, depending on their particular requirements. Outlook access to Exchange can use RPC over HTTPS to eliminate the requirement for VPN or Citrix. See the web instructions at: the SLAC RPC page for more information about how to configure your Outlook client. Access to windows file servers and other internal functions can usually be performed via Citrix. See SLAC Citrix for more information, and how to signup for a Citrix account if you do not already have one. While the recommended access to windows infrastructure is via Citrix services, when necessary, network access via a VPN (virtual private network) can be used to access SLAC internal resources. For more information, go to: SLAC VPN-PTP.
2.2.4.3 New Dialup System
To get a SLAC Dialup Account, you must have a SLAC email address and you must go here to complete the dialup account request form. You will be notified by the Help Desk and provided with your username and password when your account is ready. The SLAC Dialup Service uses 30 56kbps modems supporting the v.90 and K56Flex connection protocols and point-to-point protocol. You will dial in to: 650 223 0172. Before you get a dialup account, consider the following: as of Monday, June 5th, 2006, SLAC's dialup service conforms to commercial ISP configurations so the IP address assigned is no longer on SLAC's internal network. These changes were based upon the recommendation of the SLAC Computer Security Committee since each method of access to SLAC's network poses unique security requirements. SCCS has tested this new solution with a few users, with no particular undocumented problems encountered. While it is not the primary purpose of these changes, dialup users may also see some improved connectivity performance. Enhancements to the modem pool microcode enable faster connections (up to 50%) from modems that support V.92. Also, V.44 compression can result in improvements in transmission (from 20%-60%) for certain types of web content. SLAC dialup services have been protected from some external attacks by the existing SLAC border router firewall. The default configuration for the new service will continue to provide these protections, with some enhancements. Individuals may request that these protections be disabled by sending email to dialup-admin. Note: Terry Lahey’s how-to in doc$database: mccdialback.txt is an excellent reference for Win95 platforms; however it may not include some of the new policy information. doc$how_to contains similar dial-up information.
2.2.4.4 Elaine Machines
Elaine or (Elaine Sun) was a Sun Sparcv9 single 360MHz processor with a 100Mbps Ethernet interface running Solaris 5.7. There no longer appears to be support for her. Poor Elaine.
2.2.5 To Log in from an Ambassador
While there may still be a few Ann Arbor Ambassadors at SLAC, it is now an obsolete host. For security reasons, remote hosts such as these aren’t supported.
2.3 General DEC Command Language (DCL) rules
There is an extensive list of commands in the New OpenVMS guide (Section 2.15) and you are encouraged to consult that guide for more information; the most often used commands however are described in this section. There is also a great VAX primer that Jai Young put together in 1996 located on the Internet here. Let’s get started…
Commands you issue to the VAX once you have logged in are commands from DEC’s Digital Command Language (DCL). This language is not case sensitive (unlike UNIX). You can also truncate commands, providing just enough characters to make the command unique. The command sh does the same thing as the command “show.” Most commands take the form:
Command/qualifier parameter(s)
Command would be something like show, set, type, or directory. They are usually verbs hinting at what you want the computer to do. The qualifiers to the command are separated from the command with a slash “/”. Qualifiers usually indicate how you want the computer to do the command. The parameters are used by the computer to determine which file, directory, etc. to act on. The qualifiers don’t have to be right after the command: they can come after the parameter, but they must start with a slash.
2.3.1 HELP!
One of the most useful commands is help. If you just type help, you will get a list of all topics and next a list of the other help libraries. From the DCL prompt you can also type the following to get the topic’s help file directly:
>help topic
At the end of the help listing, it may give you sub-topics that might be of interest. To go down into one of these sub-topics, just type its name. To go up to the directory of topics, hit return. At this point type a topic name or type ? to get the list again. To leave help, you hit return until you’re back at the DCL prompt.
To get help from a different help library, type @library_name to get in. It should give you a listing of topics or hit ? to get a list.
The VAX organizes files into related groups called directories. This section describes common activities involving directories and the commands to execute these activities.P>
2.4.1 Set and Show Default
Directories represent a hierarchical “tree” structure. To get from one directory to another, you can hop to a different branch of the tree or follow a branching limb. In DCL the current directory is referred to as the “default.” To have the computer tell you which directory you’re currently in, type:
> show default
To change directories, type:
> set default directory_name
The parameter directory_name takes the form:
disk_name:[username.subdirectory]
For personal accounts on MCC the disk name is usually USER_DISK_SLC. If no sub-directories are specified, you are in your home directory. To change directories but stay on the same disk, you don’t need to specify the disk name. For example to change from the current directory to S. B. Dumper’s home directory (username SBD), type:
>set default [SBD]
From here, to go to Dumper’s sub-directory, trig, type:
>set default [SBD.TRIG]
or
> set default [.TRIG]
or
> down TRIG
Down and up are defined in SLCCOM:userlogin.com which is a COM file that is run every time you log in. See Section 2.10 for more information on COM files and the userlogin file.
A nice trick to go up one directory is:
>up
or
> set def [-]
2.4.2 Creating directories
The command to create a directory is:
>create/directory [.name]
where name is the name you want to give the new directory, and you’re currently in the directory that you want name to be a sub-directory of.
2.4.3 Looking at Files in a Directory
Once you are in the directory you want, to look at a list of all the files in that directory, type:
>directory
There are many useful qualifiers to the directory command which will alter its output to a more desirable format.
To see a list of all the files that begin with the letter d,type:
>dir d*
To see all the files that are of type “dat”, type:
>dir *.dat
or
>dir .dat
In these examples the * is used as a wildcard to specify all files that match the information given.
There is a special command for looking at all sub-directories of your current directory:
>dir [...]
(that is three periods between square brackets.)
Other useful qualifiers include:
>dir/size gives a listing of the file names and their sizes in blocks
>dir/columns=n forces the listing to be displayed in n columns
>dir/output=file_spec forces the listing to be written to the file file_spec instead of printing the list to the screen
>dir/date gives a listing of the names with their dates
>dir/owner gives a listing of the names and the files’ owners
2.4.3 Deleting Directories
A final useful command when dealing with directories is the delete command. A couple points to consider before accidentally deleting important files:
Make sure that the directory you want to delete is empty before you delete. (I’m not exactly sure what happens if you don’t do this, but I’ve been warned that it involves exploding computers and a halving of your disk quota.)
The file that you want to delete actually lives in the directory above the doomed directory with a name like dir_name.dir. Thus to delete it, type set def [-] after deleting all the files and before continuing.
All .dir files default to a level of self-protection that doesn’t let you delete them casually.
2.4.4.1 File Protection in Brief
Protection lets you control who can look at your files, execute them, delete them, and read them. These commands are used infrequently because the defaults as set by the VAX seem fine. The main use is to delete directories.
To check out a file’s protection level, type:
>dir/prot
Directory USER_DISK_SLC:[SBD]
FOO.TXT;1 (RWED,RWED,RWED,RE)
Total of 1 File(s).
This gives a list of four groups of letters separated by commas in parentheses after the file name. These refer to, in order, the privileges for system, owner, group and world. “System” refers to users with system privilege, “owner” is you, “group” refers to users with the same group number (whatever that means), and “world” is basically everybody.
The groups of letters are “RWED” or some subset thereof. These refer to read, write, execute, and delete privileges respectively.
To change any of these settings, type:
>set protection=(ownership_category:access_category) file_spec,
where “ownership_category” refers to system, owner, group or world and “access_category” refers to read, write, execute or delete. “File_spec” is the file you want to change the protection of. For example:
>set prot=(o:rwed,g:re,w:re,s:re) foo.txt
gives me, the owner, total privileges and everyone else only read and execute privileges of the file foo.txt. Thus, to delete the offending directory, give yourself the privilege to do so with the following command:
>set prot=o:d name.dir
4. The last step is to delete the directory file with the command:
>delete name.dir;*
(See section 2.5.3 below on deleting files for more information on this command.)
In summary the list of commands above are:
>sh def
user_disk_slc:[sbd.foo]
>dir
No Files found
>set def [-]
>dir .dir
Directory USER_DISK_SLC:[SBD]
foo.dir;1
1 file(s) found
>set prot=o:d foo.dir;1
>del foo.dir;1
2.5 Files
Files on the VAX, like most machines have names of the format:
file_name.file_type
The most common file types and what they mean are:
DIR sub-directory of the directory
TXT plain text
LIS list file
DAT data file
MAI mail file
COM macro file for executing commands
FOR Fortran source code
C C source code
EXE executable
OBJ object
MAT Matlab data
M Matlab macro commands
PNL SCP touch panel code
DBS SCP database source file
MKB SCP multiknob file
TPU text file used in SCP button macros
CNF SCP configuration file
BGRP BGRP config for regional beam codes
TJL text journal, automatically created when using a text editor for recording text entry; useful for when computer crashes before text file has been saved
TMP temporary file created when writing mail. File is deleted once mail is sent
DIS list of names for e-mail distribution
When using dir to look at the contents of the default directory, each file name will show a version number in the format (filename.ext;#) where ext is the file extension (e.g. .tpu, .mkb, .pnl, etc.) and # is the version number. When a file is modified and rewritten to disk, the computer doesn’t write over the old version, it creates a new version and puts the modified contents to this file with the same file name, but with a one-higher version number. For example, modifying the panel file Foo.pnl;1 will create the file Foo.pnl;2.
2.5.1 Copying Files
You can copy files within the same directory, files from one directory to another directory, or from a different disk to your directory. To copy a file within the same directory, that is you want the newly created file that’s a copy of the original file to exist in the default directory, type:
>copy old_file new_file
If you want the new file to be in a different directory than the original file, you need to specify the directory information in the file specifications. For example to copy foo.txt from your home directory to sub-directory “trig”, use the command:
>copy foo.txt [.trig]*
This command will make a copy of foo.txt, called foo.txt, and put it in the sub-directory trig.
If you want the new file to be on a different disk than the original file, add the disk information to the file specification. You can also copy files across DECNET nodes with this command (very powerful). Check out the how-to with help copy and look at the examples.
2.5.2 Renaming/Moving Files
The command rename serves two purposes: to rename a file or to move it. To rename a file, give the old name and new name specifications by typing:
>rename old_file new_file
If you include directory information in the file specification, it’s equivalent to moving the file. For example:
>rename foo.txt [.trig]foo.txt
will move the file foo.txt from the default directory to the sub-directory trig.
2.5.3 Deleting Files
The delete command is very predictable. It differs from UNIX’s rm command only in that you specify the version number to delete the file of choice:
>delete file_name.file_type;vers_number
or
>delete foo.txt;1
You can use a wild card in place of the version number (or any other part of the file information).
2.5.4 Purging Files
The purge command is essentially a selective delete command. It will delete all but the highest version number of the file(s) specified. It takes the form: >purge file_spec
2.5.5 Listing a File's Contents
To list a file’s contents, type:
>type file_spec
This will dump the contents to the screen and scroll if there is more than one page. A useful qualifier to the type command is /page. This is the equivalent to the UNIX more command. It will list the file’s first page of contents, starting at the top of the window, and prompt you at the bottom to “Press RETURN to continue.” To stop the scrolling, hit RETURN until you reach the end, Control-Z, or type something that isn’t “return.”
2.5.6 Searching a File's Contents
To search a file’s contents for a specific character string, type:
>search file_spec char_string
The file_spec can contain wildcards or be a list of files separated by commas. The string, if it contains spaces, should be in double quotes. Also if you want to specify multiple strings, just make a list separated by commas as well. To only find instances of either or both strings, type:
>search/match=and file1, file2 string1,string2
This will list only occurrences of both strings together. See help search for more sophisticated qualifiers and their usages.
2.6 Printing
The generic print command in DCL is:
>print file_spec
This will send the file to the default printer as defined by the logical SYS$PRINT (which now points to MCC$PRINT, and not SLC$PRINT - see section 2.9 below for information on manipulating logicals). You may not want the file to go to the default printer since the MCC$ and SLC$ print logicals are different, or you may not want it printed in the default orientation. If so, use the following qualifiers for the print command:
/queue= queue_name tells the computer which printer to send the file to
/header puts a header line on the top of each page giving the file’s name and the page number
/parameter=(para1=value1,para2=value2) Useful parameters and the choices for their values include:
DATA_TYPE This is used to override the file-type defaults. Its value can be: ANSI, LIST, or POSTSCRIPT. ANSI is for straight text files, LIST is for program listings (file types include COM, C, H, and FOR), and POSTSCRIPT is for PS files.
PAGE_ORIENTATION This is used to select PORTRAIT or LANDSCAPE orientation. (Default for ANSI and LIST files is portrait with 80 columns and 70 lines.)
NUMBER_UP This is used to print more than one page of text on each sheet of paper. The value is usually 2 or 4.
As an example, to print your LOGIN.COM in ANSI format, LANDSCAPE orientation and 4 pages to a sheet, you would type:
>print/para=(data=ansi,page_o=land,num=4) login.com
More help on these and other parameters can be found with help print or help print_parameters.
2.6.1 Printer Queues
It’s useful to know how to examine queues and delete print or batch jobs. When you use the print command, your file is put in a queue. To look at your “entry” in the queue, type:
>show entry
The computer will then give you the job name (a.k.a. the file name), the username, the entry number, the number of blocks and the status. To delete this entry from the queue (i.e. if you don’t want it printed), type:
>delete/entry= entry_number
with entry_number as given by the show entry command or the line of information the computer gives you after you issue the print command.
Other useful queue commands include:
>show queue queue_name will list your jobs in that queue.
>show queue/all queue_name will list all users’ jobs in that queue
2.6.2 Printers in Main Control
Printers and their queues commonly used in MCC include:
MCC$PRINT the default printer for the MCC node. It points to the HP Laserjet 8100 DN in MCC.
SLC$PRINT the default printer for the SLC node. It points to the HP Laserjet 9050 DN on the 2nd floor of MCC. (See section 2.1)
MCC_BIG the large b/w HP Laserjet in MCC
SVMCC4035 points to the Savin 4035 multifunction b/w printer in MCC.
MCC$HP_COLOR now points to MCC$SV_COLOR, the new Savin color multifunctional printer in MCC
LWB5B points to the HPB5B Laser 2100 TN printer in trailer B of the building 5 complex.
LWB5D points to the HPB5D HP 8000 N printer in trailer D of the building 5 complex.
Printers listed in prior revisions of this document that are not listed here have been removed. This list is not comprehensive; there are over 70 different print queues in use but these listed here are the most common for MCC use.
2.7 Mail
Checking email on the VAX is losing popularity to programs on the Windows and UNIX/LINUX machines. Aside from using email clients (like Thunderbird or MS Outlook), you can access your SLAC email through the Exchange by typing www-mail in an Internet browser (such as IE or Firefox). Then simply supply your username and password. Note: different Internet browsers will display different interfaces. While it is rarely used anymore, the VAX mail client is still supported. To get your mail on the VAX, type: >mail. All of your mail lives in directories called folders. The “home” folder is named MAIL. When you get new mail, it is put into folder NEW.
2.7.1 Basic Commands
VAX Mail uses basic commands that are very similar to other DCL uses and other machines’ mail utilities.
read to read a message
read/new to read a new message
read n to read message #n, message number as given by the directory command
n same as read n
send to send a message. Prompts you for To and Subject, then gives you a place to type a message.
delete files message into WASTEBASKET folder which is emptied once you exit MAIL.
directory list all messages in the currently selected folder
dir/folder lists all the folders
next to read the next message
back to read the previous message
last to read the last message
exit to exit the MAIL utility
reply to respond to the sender. The default subject is “RE: their_subject”
repl/subj=“ “ To change the subject from the default. If you have only one word, you don’t need the quotes, but mail will put the word into all caps.
print to print the message to the default printer once you exit from mail
print/que=queue_name print to the queue specified
print/now print now
extract file_spec writes the message to file_spec
extr/append appends current message to end of specified file
extr/all puts all currently selected messages (those in the current folder) into specified file, with the messages separated with a form feed.
forward forwards the message to other users
forw/edit forwards the message, but invokes the editor to allow modification of the message before sending it
select folder_name chooses to another folder
file folder_name moves the message to the specified folder
move folder_name same as the file command
help lists other interesting commands and provides help on them
Many times, you may prefer to use a text editor (as compared to the default line editor) for editing mail messages. To have mail invoke a text editor when sending, replying, or forwarding, start MAIL with the command:
>mail/edit
The default editor is EVE (see sections 2.11 and 2.15 for more information).
2.7.2 DIS Files
To send a mail message to lots of users (like all the operators or all the software folks) you can use a DIS (for distribution) file. This file has type DIS and contains a list of usernames (one per line usually and left justified). You can also type comments in a DIS file by preceding them with a !. The mail utility ignores everything to the right of the ! on a given line.
If you were to make a FRIENDS.DIS file in your home directory, you could mail a single message to this list of users by typing:
To: @friends
at the To: prompt after you’ve typed send at the MAIL prompt.
There is also a directory set up specifically to contain useful DIS files: SLCDIS. In this directory is OPERATORS.DIS which is a list of all the operations staff. To send mail to this list type:
To: @operators
2.7.3 Internet Addresses
The e-mail address for your VAX account is:
user_name@slc.slac.stanford.edu
To send mail to someone with an account on the MCC/SLC VAX cluster, in the “to” space, type his or her username. To send to someone with an account on another DECNET cluster, type:
To: decnet_node::user_name
Our DECNET nodes are SLC and MCC. To send to someone not on DECNET or the VAX, type the following weirdness:
To: SMTP%"user_name@internet.address"
or
To: IN%”user_name@internet.address”
The quotes are required. To send mail to P. D. Unit at Stanford, type:
To: SMTP%"pdu@stanford.edu"
All of this is a pain, but required. See section 2.9 on logicals to find a shortcut around this.
2.8 Telnet, FTP, and the WWW
Telnet and FTP are considered security risks and SCCS is encouraging the use of SSH instead. Since the World Wide Web can be accessed on SCPs through the Flora SUN and Vesta IBM clusters via telnet (see older revisions), then using Internet Explorer, Netscape, or Mozilla Firefox browsers on Windows machines at SLAC is encouraged instead.
2.8.1 SLAC on the WWW
Once on the Web, there are a handful of obvious starting points when looking for SLAC and Accelerator Department sites.
The SLAC home page is:
http://www.slac.stanford.edu/
The Accelerator Department has a home page too:
http://www.slac.stanford.edu/grp/ad/ad.html
Also much of our group’s documentation can be found on the web. Check out:
http://www.slac.stanford.edu/grp/ad/addo/grp_pages/addo.html
This is the accelerator department documentation page. There is lots of good stuff here. Also of interest on the web is the Controls Software Department home page:
http://www.slac.stanford.edu/grp/cd/soft/
They too have a documentation page where you can find many of the References of this document:
http://www.slac.stanford.edu/grp/cd/soft/slaconly/doc_web/doc_web.html
Other interesting on-the-Web SLAC things to mention in passing include the spires database which is searchable, the accelerator maps, and the daily operations reports. These are all accessed from SLAC’s detailed home page.
2.8.2 Printing from Web Browsers (IE, Firefox, and Netscape)
To print a page or picture from the web, pull down the file menu and select print. On IE or Firefox, you’ll get the standard print dialogue box. If the printer dialogue box does not display the printer you need, type \\webmcc in your web browser then double-click on the network printer of your choice in order to install it on your machine. On Netscape, a window opens that has a space for the so called “Print Command.” This command should look like:
lpr -P queue_name
with no space between the capital p and the queue name. Of course the queue names are different for the different systems. Some common UNIX queue names are (see Section 2.6.2 for their VAX equivalents):
mcc_big the b/w laserjet in the control room
svmcccolor the color laserjet in the control room
lp_svmcc4035 the b/w laserjet outside the control room in MCC
lwb5b the laserjet in trailer B of the building 5 complex
lwb5d the laserjet in trailer D of the building 5 complex
To check on the progress of your print job, in a window logged in as you on the appropriate UNIX machine, issue the command:
lpq -Pqueue_name
and to remove a job from the queue the command is:
lprm -Pqueue_name job_name
2.8.3 Copying VAX files to a Macintosh
As is stated above, SLAC IP subnets no longer rout Apple protocols as of October 1, 2001, thus the Macintosh Classic is no longer a supported at SLAC. You should be able to log in to the network on a Mac running OSX, but since the Mac platform is not supported there is at present no guide for its utilities. See Section 2.2.3 above for more information on OSX logins.
2.8.4 Finger
The finger command on the VAX is a way to get information about someone else's account, including if they’re logged in and possibly other miscellaneous information. Previous revisions of this document held that the node you were logged into restricted its function but it has since been tested and it appears to work on any node, even the DEC Alphas. The syntax to finger an account is:
>finger user_name
To finger someone's account that isn't on the VAX, type:
>fingxx user_name @host_name
2.9 Logicals and Symbols
On the VAX you can create shortcuts for commands or information. There are two ways to do this: via logicals and symbols. Logical names are a shorthand way to refer to specific files, directories, disk names, or device names that are used frequently. A symbol name represents a numeric, character, or logical value. DCL replaces the symbol with its value.
2.9.1 Logicals and Their Uses
Many logicals are defined by the VAX when you log in. These include such common disk aliases as USER_DISK_SLC and USER_DISK_MCC. To ask the computer for the translation of one of these, type:
>show logical user_disk_mcc
"USER_DISK_MCC" = "DISK$MCCUSERDISK:" (LNM$SYSTEM_TABLE)
1 "DISK$MCCUSERDISK" = "$255$DUA4:" (LNM$SYSTEM_TABLE)
$255$DUA4 is the actual disk name. The “system table” is just one of many tables of logicals in the VAX’s brain at any given time. Thus whenever you type USER_DISK_MCC, the VAX translates that to $255$DUA4. To define your own logicals, use the command:
>define logical_name logical_value
You could define, for the example above:
>define trigdir user_disk_slc:[sbd.trig]
>set def trigdir
>sh def
USER_DISK_SLC:[SBD.TRIG]
Logicals are most useful for disk names, directories, and files. The other common use for logicals is to define a shortcut character string to replace an internet address. For example, the command:
>define mypal SMTP%"""mypal@stanford.edu"""
Here, the triple double quotes are necessary to have a single double quote in the value of the logical.
>sh log mypal
"MYPAL" = "SMTP%"MYPAL@STANFORD.EDU"" (LNM$PROCESS_TABLE)
This is a convenient shortcut because once this is defined, you send mail to “mypal,” at the To: prompt within the mail utility, by typing “mypal” instead of the entire address. The mail utility then looks up “mypal” in the logical tables and substitutes the long address for the shortcut.
Define/nolog is convenient if you are defining a logical that might have already been defined. The nolog qualifier tells the computer to not bother to tell you that you are redefining the logical.
Assign is an equivalent command to define but it has a slightly different syntax:
>assign logical_value logical_name
Deassign is the undo command for both assign and define.
>deassign logical_name
2.9.1.1 USER_DISK_SLC
This logical and its variants all point to the same disk. You can see this when you use sh log as follows. All three point to disk DUA183:
>sh log user_disk_slc
"USER_DISK_SLC" = "DISK$SLCUSERDISK:" (LNM$SYSTEM_TABLE)
“DISK$SLCUSERDISK” = “$255$DUA183:” (LNM$SYSTEM_TABLE)
>sh log user_disk_slc1
"USER_DISK_SLC1" = "DISK$SLCUSERDISK:" (LNM$SYSTEM_TABLE)
“DISK$SLCUSERDISK” = “$255$DUA183:” (LNM$SYSTEM_TABLE)
>sh log user_disk_slc2
"USER_DISK_SLC2" = "DISK$SLCUSERDISK:" (LNM$SYSTEM_TABLE)
“DISK$SLCUSERDISK” = “$255$DUA183:” (LNM$SYSTEM_TABLE)
2.9.2 Symbols and Their Uses
The most common use of a symbol is to replace a commonly used command with a short string of characters to save the effort of typing out the same long command multiple times.
There are two ways to create a symbol: use two equal signs and quotes:
>symbol = = “symbol_value”
or a colon and two equal signs:
>symbol := = symbol_value
An example symbol definition could be:
>CD := = set default
After typing that command, just use the command cd to change the directory.
To find out how a symbol is defined, type:
>show symbol symbol_name
2.10 COM files
A file with the extension COM is usually a file of DCL commands that you want to execute all together in order. It saves the effort of typing the commands out repeatedly. The most common COM file is login.com. This file is executed every time you log in. It lives in your home directory. All com files’ lines take the form:
$ command
To “execute” a COM file, use the command format:
>@file_name
where the file_name doesn’t have to include the “.com” extension.
If you look into your login.com file, you will find that it has “logic” commands that define two sections of the file: the interactive and the batch mode sections. This logic takes the general form:
$! commands you want executed in all modes
$ if (not in interactive mode) then goto endinter
$! commands to be executed in interactive mode
$endinter:
$ if (not in batch mode) then goto endbatch
$! commands you want executed in batch mode
$endbatch:
$ exit
The $ tells the VAX that an executable command will follow. You need one of these at the beginning of all executable lines. You don't need one if you’re going to have a blank line. The ! is used to denote a comment. It can occur at any point during the line, but all text after it (i.e. to the right of the !) is ignored by the VAX.
In this file there are three locations to put your commands that you want executed every time you log in. For example, the command:
$@slccom:userlogin.com
goes in the first section. This file (go check it out if you’re curious) contains useful symbols and commands that are machine dependent and not part of the package from DEC, such as MATLAB, ERRLOG, CAMCOM, and SCP.
The next section of userlogin.com is where most folks put all their commands. (If you know what a batch job is and use batch jobs frequently, you should be able to figure out what specifically you want in the batch section.) Thus after the goto endinter command and before the endinter marker, most folks have their favorite symbols and logicals defined. This is the place to put the spiffo shortcuts mentioned previously in this document if you think they’re spiffy too. For example:
$ mail := = mail/edit
$ define mypal smtp%"""mypal@stanford.edu"""
$ define trigdir user_disk_slc:[sbd.trig]
$ cd := = set default
$ prtlwm := = print/queue=lwmcc1
$ finmypal := = fingxx mypal@stanford.edu
In general, COM files are pretty powerful entities and extremely useful. Many of the “programs” listed in this document are actually COM files.
2.10.1 To Log in without executing your LOGIN.COM file
As wonderful as your login.com file can be, sometimes you may wish to log in and start typing without waiting for it to execute. To do this, when you log in, enter your username with /NOCOM after:
Username: SBD/NOCOM
Password:
This will get you to a DCL prompt in less than 5 seconds. However, don’t forget that all your favorite commands won’t be defined.
2.11 Editors
There are a handful of editors on the VAX that are useful. The most commonly used ones are EVE and LSEDIT. EVE stands for “Extensible Versatile Editor.” LSEDIT is the so-called language-sensitive editor. They are similar; however, if you’re doing a lot of software development, LSE has many commands and functions specifically designed for that purpose. To get help from either editor, hit the “do” key on the workstation keyboard and type “help.”
Within EVE, if you hit the “help” key, it will draw you a picture of the numeric keypad and the editing shortcuts assigned to the numbers. Within LSEDIT, just hit the “PF2” key on the numeric keypad.
To get help on EVE within the VAX environment, type:
>help edit/tpu
To get help on LSEDIT within the VAX environment, type:
>help lse
If you choose to use LSE as your primary editor, you might want to redefine the EVE symbol. EVE is the default editor for the mail utility and all COM files to edit CMS files (like EDITPNL, see section 3.3.4). If you’re very used to LSE, trying to switch between them will be a pain. The best way to redefine EVE is with the (sanctioned) command:
>eve :== @slccom:lse
You would want to have that command in the interactive part of your login.com file.
2.12 Workstation Shortcuts and Miscellaneous but Useful Commands
When working at a workstation, there are a couple useful shortcuts that come in handy from time to time.
2.12.1 Mouse Button Cut and Paste
To cut and paste text from one part of a window to another part or to another window altogether, highlight the desired text by clicking and dragging the left mouse button, pull down the EDIT menu and select copy, move the cursor to the goal location, pull down the EDIT menu and select paste. Or merely highlight the text with the left mouse button, then click the right mouse button in the window where you want the text to go, and “POOF!” all done.
An even shorter shortcut is to select the text with the middle button and when you let go of the button, the selected text gets pasted at the cursor. WOW!
2.12.2 Disk Quotas
Because the machine doesn’t have infinite memory, the system imposes a limit on just how much of the memory you get to use. This is called your quota. To check your quota, use the command:
>show quota
Most operators’ accounts by default get some hideously small amount. To change this, beg the appropriate software person. As this person is subject to change, ask your supervisor.
2.12.3 Run-on Displays
If you requests a specific output (like a directory, or a file listing) that is unexpectedly many, many screens long, type the control key and the “s” key simultaneously (CTRL-S) to stop the scrolling. To start the scrolling again, type CTRL-Q. This is equivalent to the hold screen button on workstation keyboards (F1).
This is useful to remember in case you come up to a window that is “hung” and won’t respond. Try hitting the hold screen button and/or CTRL-Q. Someone might have left it in the CTRL-S state.
2.12.4 Commonly Used Control Sequences
To enter a control sequence, hold down the “control” button while hitting the appropriate letter on the keyboard. Here are several control sequences that are commonly used:
CTRL-S “STOP” Stops the screen from scrolling. CTRL-Q to undo.
CTRL-Q “START” Restarts the screen and the enter prompt after a CTRL-S.
CTRL-C “CANCEL” This will stop many things from running including EXE and COM files.
CTRL-Y “INTERRUPT” This will pause the execution of an EXE or COM file. Type “continue” at the prompt to resume. If you don’t want to resume, type “stop.”
CTRL-Z “EXIT” This is used in many utilities to tell the program that you’re done and to indicate normal, successful completion.
CTRL-T “TERMINAL” This prints one line to your screen which tells you that window’s process name and the time, etc.
CTRL-A “INSERT/OVERSTRIKE” This toggles between those two modes of line entry of a command at the prompt.
“Insert” mode allows you to insert characters into the command line. “Overstrike” mode types over already existing characters on the command line. See set term (section 2.12.5) below for an alternate method to toggle and scope out the state of this mode. F14 on the keyboard also does this toggle.
2.12.5 Useful Set/Show Terminal Commands
The terminal settings for your window include such things as: width, length, and editing mode. To see what the current settings are type:
>show terminal
This will print to your screen some 20 lines of settings. Check out help set term to find out what they all mean. To change the width, type:
>set term/width=n
where n is the number of columns you want. Standard settings are 80 or 132. To change the length, type:
>set term/page=n
where n is the number of lines you want. Standard settings include 24, 48, and 60.
To change the line editing mode, type:
>set term/overstrike
or
>set term/insert
depending on which mode you want. If you find one mode infinitely preferable to the other, you’ll probably want to include the appropriate set term command in the interactive part of your login.com.
Sometimes it’s nice to not have all the global messages come through your terminal when you’re working. To set quiet mode, type:
>set term/nobroadcast
2.12.6 Dealing with Processes
When you log in to a workstation, many processes are started to run the window manager. Also any time you log in, one process will be started to connect you to the computer. You may find that you need to find out all the processes under a certain user name and kill one or more of them. The easiest way to get process numbers and names for a given user is:
>show user/full username
This usually gives a listing like:
>sh us/full cow05
OpenVMS User Processes at 16-JAN-1997 12:36:32.13
Total number of users = 1, number of processes = 5
Username Node Process Name PID Terminal
COW05 MCC COW05 26A004AC
COW05 MCC COW05_1 26A004D0 MBA562:
(disconnected)
COW05 MCC DECW$MWM_1199 26A004CF MBA560:
(disconnected)
COW05 MCC SCP_05 26A104BC
COW05 MCC VUE$COW05_3 26A02113 (subprocess of 26A004AC)
COW05 SLCSRV CTR_MCCX21_0AE 264006A9 FTA104:_
This is a lot of processes just to run a COW.
If you need to kill one of these processes (the most frequent reason is that the process hangs and won’t let you kill it from inside), from any DECterm in the control room, do a show user and select the process you want to kill. Next type:
>stop proc/id=PID
or
>stop proc process_name
This should kill the process with PID number or process_name.
2.12.7 Command History
DCL keeps a command history to show up to the last 254 commands you’ve entered.
>recall/all
displays this list with numbers. If you want to execute command number n without having to type it all out again, just type:
>recall n
You can also use the recall command by typing recall followed by the first letters of the command desired, using only enough characters to make it unique. For example:
>recall st
would do a show proc from section 2.12.6 above.
If you’re looking for a command within the last twenty or so, it’s many times easier to just keep hitting the up arrow on the keyboard to cycle through the commands you’ve used. Also if you go past the one you want with the up arrow, push the down arrow to go the other way through the list.
2.12.8 On-line Phone Book
There exists a file with all SLAC employees’ names, offices, work phones and (sometimes) home phone numbers. This file is defined by the logical slc_phone which points to:
user_disk_slc:[phonemgr]phonlist.fromvm
Lucky for you, you don’t have to remember all that. The symbol pb is defined in userlogin.com as:
$pb*ook :== search/match=and/noheader slc_phone, slc_phone_extra
This command searches slc_phone and slc_phone_extra for the string you type after the pb command and displays all matches it finds. If you type more than one string, it will only print lines that contain both strings. SLC_PHONE_EXTRA is a pointer to a file called phonlist.extra that you can create in your home directory. This is a place for you to have your own personal address book to be searched by pb.
2.12.9 Printing text from a DECterm Screen
If you have information being displayed on a DECterm that you want printed without having to get it into a file, you can just use the print pull-down menu. This gives you choices of printing all text or selected text or graphics. To make sure the output goes to the printer of your choice, under the options pull-down menu, select printer. Here select “queued printer” then click on the options box next to that selection. This will pop up a window for you to select the printer you want in the right-hand-side scroll box. Once you’ve clicked “OK” a couple gazillion times to close the popped up windows, you only have to use the print menu to have wonderful and wonderfully convenient means of printing text.
2.13 Recalibrating COW Touch Screens
To recalibrate a COW’s touch screen there are 5 steps:
1. Press ALT function and F3 keys to get the special menu bar
2. Under SETUP, choose “Change setup parameters”
3. Choose “Input device”
4. Press “Calibrate Touch screen”
5. It will give you two buttons to press, then you’re good to go!
2.14 VAX Primer References
VMS DCL Concepts Manual in the VMS General User, Volume 3: Using DCL binder that lives upstairs in building 5.
OpenVMS Quick-Guide Including Jai Young’s VAX Primer (next section)
2.15 OpenVMS and VAX Quick-Guide
2.15.1 About VAX-VMS and OpenVMS
The Virtual Memory System (VMS) was first released in 1977 by Digital Equipment Corporation (DEC) as the operating system for the 32-bit VAX. It was rewritten in 1992 for the 64-bit DEC Alpha and then renamed OpenVMS. Compaq, which bought-out DEC, still supports OpenVMS on both VAX and Alpha platforms. In 2001, Compaq ported OpenVMS to Intel’s Itanium (IA-64) processor (SLAC uses one of these by the way) and then merged with Hewlett-Packard the following year. On January 31, 2003, OpenVMS finally booted on the Itanium-64 without crashing (woo-hoo!) and in June of that year, OpenVMS 8.2 was released to customers. SLAC uses OpenVMS on its supported DEC Alpha nodes (MCC and MCCDEV).
2.15.1.1 A Quick Bit About OpenVMS Editors
The OpenVMS operating system has extensive multi-lingual on-line help, and it supports multiple built-in text editors including:
EDT, invoked by entering the following at the prompt:
>edit/edt
There is also an Extensive Versatile Editor, or “EVE,” invoked by entering:
>edit/tpu or >EVE
And a Text Editor and COrrector, or “TECO,” is called by entering
>edit/teco
at the prompt. There is also a software-development Language Sensitive Editor, or “LSEditor,” invoked by entering
>edit/LSE
at the prompt. These editors have familiar counterparts for UNIX users: EDT is similar to the UNIX “ed,” while EVE is similar to UNIX “vi,” and TECO is equivalent to the UNIX “xedit” utility.
2.15.1.2 Special Features of OpenVMS (Verbose)
OpenVMS can have up to 32,000 versions of the same file name (allowing introduction of new program executables without a reboot), and its directories are specially sorted to aid in searches at the cost of file creation/deletion overhead. And this operating system supports many different file types (for you tecchies who are wondering, they are: stream/non-record, sequential, relative, and indexed files), and OpenVMS makes sure that every process gets access to shared resources without the expected pesky problems. Adding spooled devices such as printers is trivial, and does not require GUI tools as does UNIX, and by default the printer queues are visible to everyone on the system. Also, variables can be declared as global or local, and the logicals structure allows a specific variable to share its information between unrelated programs (without a reboot!), and all system processes are employed via quota-based resource management. UNIX (and Linux) does not have these kinds of features, which is one factor into why SLAC still supports this operating system.
The command line/batch interface for OpenVMS is DEC’s Digital Command Language (DCL) which has the special feature that every command is “syntax checked” (and all are case-insensitive) and the whole command line is bounced if a single error is detected. This prevents intolerable data loss, and in effect protects the SLAC control system from tired operators running weekend owl shifts without their coffee. In contrast to this single simple DCL, UNIX has several shells for scripting that include the Bourne Shell, the Bourne-Again Shell (also called Bash), the C Shell, and the Korn Shell – they are not as forgiving as the DCL, and all commands are case-sensitive. Here’s a comparison:
Jeremy and Lisa want to delete all files from their current directory with an extension of “.temp” using the asterisk wildcard “*” but they both accidentally put a space between the “*” and “.temp.” Lisa is working from the MCCDEV node (an Alpha running OpenVMS) and her entry at the prompt looks like this:
> del * .temp;*
and Jeremy is working from one of the UNIX shells. His entry looks like this:
# rm -r * .temp
If it weren’t for the space between the “*” and the word “.temp” both commands would do exactly what was desired. But alas, the UNIX god is not so kind as the VAX god. You see, both Lisa and Jeremy were in the root directory... Lisa’s command will immediately return a syntax error and be thrown out – nothing bad will happen. But Jeremy’s command will first delete all files then jump to the next item in the list and look for all files named “.temp” And since Jeremy had entered an “–r” switch after the “rm” all the directories under the current position will be recursively deleted, from the root down. Lisa made a simple error that the DCL recognized and she could easily correct. Jeremy just wiped his entire hard disk. He’ll be getting a call from Ken Underwood and Friends really soon. That’s OpenVMS vs. UNIX for you.
2.15.1.3 Internet Protocols with OpenVMS
Initially DEC refused to support TCP/IP, which is today the preferred (and easy) way to connect to the Internet. However, the OpenVMS group finally ported their Unix Communications eXtensions (UCX) package into TCP/IP. A company called Process Software now is the provider of two OpenVMS stacks, TCPware and MultiNet. For security reasons, SLAC uses TCP/IP almost exclusively.
2.15.2 OpenVMS vs. UNIX - An Alphabetical List of Commands
OpenVMS (ALLCAPS) Unix (bold) Explanation/examples2.15.3 Important Operators, Lexicals, and Branching Statements
In addition to the above commands, you may find the following operators, lexicals, and branching statement information quite useful when programming, building panel files, and creating multiknob files using OpenVMS from a SCP:
OpenVMS Operators(ALLCAPS) Unix Operators(bold) Explanation
================================================
.EQ., .EQS. == Equal to
.NE., .NES. ! Not equal to
.AND. && Boolean and
.OR. || Boolean or
.GT., .GTS. > Greater than
.GE., .GES. >= Greater or equal
.LT., .LTS. < Less than
.LE., .LES. <= Less than or equal
+ + Add
- - Subtract
* * Multiply
/ / Divide
var + 1 var++ Increment by 1
var - 1 var-- Decrement by 1
(NO EQUIVALENT?) % Modulo
(NO EQUIVALENT?) >> Right bit shift
(NO EQUIVALENT?) << Left bit shift
.NOT. ~ 1’s complement
.NOT. ! Logical negation
.OR. | Inclusive OR
(NO EQUIVALENT?) ^ Exclusive OR
.AND. & And
What are Lexicals? Lexical functions (or “Lexicals”) provide a powerful mechanism for syntax transformations and are useful for automatic text analysis, machine translation, and text generation. Below are some lexicals you might find useful within the OpenVMS environment:
OpenVMS Lexicals(ALLCAPS) Unix Lexicals(bold) Explanation
=============================================
F$ENVIRONMENT(‘INTERACTIVE’) tty -s Determine if you are an interactive user
F$EXTRACT(start,length,string) cut -c Locate fields in a test string and write them out
F$ELEMENT(element#,delimiter,string) cut -f -d awk Locate delimited fields in a test string
F$ENVIRONMENT(‘PROCEDURE’) [$0] ($arg [0]) Get script name [Ksh] (Csh)
F$TRANSLATE(‘SYS$SYSDEVICE’) sizer -r Get name of the device from which the operating system bootstrapped
F$GETDVI(‘TT:’, ‘DEVNAM’) tty -s Determine the name of the terminal you are using
F$GETSYI(‘HW_NAME’) sizer -c Get model name of the CPU
F$GETSYI(‘HW_MODEL’)F$GETSYI(‘CPU’) sizer -wt Return workstation device type
F$GETSYI(‘VERSION’) sizer -bstrings/vmunix|grep(Revname) -a Get kernel’s file name and version
F$GETSYI(‘BOOTTIME’) who -b Get system boot time
What Programming Branch Statements can I use? Well, the DCL command procedures of OpenVMS rely on the statements if, gosub, call, and goto for program branching. Since DCL is the only OpenVMS scripting language used by VAXes and DEC Alphas, there is little room for ambiguity. If you browse the operator panels and hit the help button for different operator panel files from the SCP, you’ll see examples of how these branching statements are used in the code. In contrast, Unix offers different branching statements for its different shells, a more complicated treatment. They are as follows:
(UNIX Shell) Branching Statements Offered
==============================
(csh) if, goto, while, foreach, switch, shift
(ksh) do, case, elif, for, function, if, select, time, until, while
(sh) if, for, while, until, case
What About Debugging Shell Scripts? Debugging of shell scripts is done in UNIX by invoking ksh or sh scripts with the -x and -v flags; this is done in the C shell by invoking them with the -v, -V, -x or -X flags. The OpenVMS equivalent of this is to use the command SET VERIFY.
In addition to this information in Chapter 2, Jai Young created an excellent reference for the VAX/VMS in 1996. This document is located on the Web here and while there are some differences in the current SLAC Control System and the one used in 1996, Jai’s guide still addresses some of the most commonly used commands, issues, and information encountered with the DEC computer systems.