4.1. INTRODUCTION TO THE VAX

4.1.1. SYSTEM DESCRIPTION

Several Computer Science classes use the VAX 4000/100 minicomputer (known as MEENA) built by Digital Equipment Corporation (DEC) and owned and maintained by Computing Services. It is located in AdHum 106 and runs the VMS (Virtual Memory System) operating system.

When you first login to the VAX (see "Logging In") you will be working at the VMS Operating System level. VMS is mainly used for file manipulation and for requesting other environments in which to work. Other environments you may use include the electronic mail environment, the general purpose system editor, etc.... Each environment has a unique prompt. When you are finished working with a given environment you EXIT it and return to the VMS Operating System level.


4.1.2. LOGGING ON and OFF

LOGGING ON

Once you have been assigned your own account you may log into the computer system by following the procedure below:

a) Turn the terminal on. Power switches are usually on the left rear of most terminals.

b) Press the[Return]key a few times to get the attention of the Dataswitch and you will be greeted by a message from one of the Dataswitches. At the request prompt type the name of the computer that you would like to use.

Request: MEENA [Return]

c) There will be a short delay; then the terminal will BEEP indicating that the Dataswitch has made a connection to the computer that you requested. At this point, press the[Return]key a few more times to get the attention of the computer that you requested.

d) You will now receive a login message from Meena. At the prompt for username, enter the username found on the account handout you were given. You will then be prompted for your password. When you type your password it will not be displayed on the terminal.

U of R Computing Services

VMS Meena at your service

Username: DOE1234J [Return]

Password: .......... [Return]

e) You will now receive a message like this:

Last interactive login on Wednesday, 1-JUL-1993 12:10

WELCOME TO VMS 5.5-2 CLUSTER ON M E E N A

On Thursday, 17-JAN-1991 at 9:35 !! Good Morning !!

$

f) You have now completed the login process. The $ is the VMS system prompt indicating that VMS is waiting for you to enter a command.

LOGGING OFF

To logout type the VMS system command LOGOUT or BYE after the VMS System prompt $.

$ LOGOUT [Return]

DOE1234J logged out at Thursday, 17-JAN-1993 10:15

Always remember to logout when you are finished working. If you forget, another user can sit down at your terminal and destroy all your work or send rude messages to other users.

*** You are responsible for messages that originate from your account.

Note: If you leave your terminal idle (do not type anything) for about 10 minutes, the dataswitch will give up on you and log you out. To avoid this happening type something every few minutes to convince the Dataswitch that your terminal is still active. Also periodically SAVE your work when you are using an editor.

4.1.3. FILES

* Most VMS system commands deal with the manipulation of files.

* All information on a computer is stored in files.

* A file is a collection of information that is stored temporarily or permanently on magnetic disk or tape.

* A file may hold data, programs, text, or any other information.

* Each file has a unique file specification that differentiates one file from another.

4.1.3.1. FILE SPECIFICATIONS

Under the VMS operating system the general form of a filename is:

FILENAME.EXT;VER

FILENAME * The name of the file.

* The maximum length is 32 characters.

* No spaces or punctuation allowed.

.EXT * Indicates file type.

* Commonly three characters in length but can be longer.

* No spaces or punctuation allowed.

Some common file types:

File Extension File Type

.BAS Basic Program

.TXT Text File

.DAT Data File

.COM Command File

.MAI Mail File

.PAS Pascal Program

.COB Cobol Program

.FOR Fortran Program

.LIS Compilation Listing

;VER Is a sequential number. Instead of replacing (overwriting) files that have been modified and saved multiple times, VMS uses version numbers. Each time a file is saved it is stored on disk with the same name and extension but with a higher version number. You can get rid of old versions of files with the PURGE command (see "File Manipulation Commands").

For example:

Most VMS commands require you to enter only the filename and extension when specifying a file. However, the DELETE command requires the version number as well. The BASIC environment requires only the filename.

4.1.3.2. COMPLETE FILE SPECIFICATION

Since VMS allows many different users it must differentiate between files of different users, even though different users may use the same filename and extension. VMS must also deal with the many different disks that it uses for storage. A complete file specification looks like:

node::device:[directory]filename.ext;ver

NODE: The name of the VAX the file is on if several VAX's are connected together to form a network.

DEVICE: The name of the disk where the file is stored.

[DIRECTORY] Gives a path to the place where the file is stored on the given disk.

FILENAME see the preceding section

.EXT see the preceding section

;VER see the preceding section

For example:

D15:[NEWS.NEWS.CS110NEWS]COVER.TXT;1

Although you will see the device and directory occasionally you will only need to provide the filename.ext in your use of MEENA. Complete file specifications are only required to copy files from other accounts.

4.1.3.3. WILDCARD CHARACTER IN FILE SPEC'S

When trying to specify filenames for VMS commands, the wild card character asterisk (*) is useful. The asterisk (*) can be used anywhere in a file specification - the file name, or the file type, or the file extension.. For example:

To get a directory listing of all the basic program files in your account use the command:

$ DIR *.BAS

To get a directory listing of all files that start with "LAB5", regardless of file type:

$ DIR LAB5.*

Also, see the examples in the File Manipulation commands in the next section.

4.1.3.4. FILE PROTECTION

The VAX system manager creates accounts and clusters them into groups. For example all student accounts for class XXX might belong to one group. All student accounts for class YYY might belong to another group. There is also a separate system group for users with special privileges. There are in total four types of users:

World

x(Group) x(System)

x(Owner1)

.

.

x(Owner)

When the system manager sets up accounts they assign a default protection for files in an account. To determine the current system default protection type.

$ SHOW PROTECTION [Return]

This will show the modes of access each user type is allowed. The access modes available are:

Read

Write

Execute

Delete

Example:

$ SHOW PROTECT [Return]

System = RWED, Owner=RWED, Group=RE, World=No Access

To change the protection codes for a file use the DCL command 'SET' followed by 'PROTECTION' or just 'PROT'.

e.g.

$ SET PROT=(S:rwed,O:rwed,G:re) filespec [Return]

The user type and access modes can be put in any order.

Note that not all user types need to be specified. If one or more are not specified the protection remains as it was before the SET PROT command was issued.

The exception to this if you enter no access modes at all.

e.g. $ SET PROT=S filespec [Return]

This disallows access of any kind to the system group.


4.1.4. VMS SYSTEM COMMANDS

* All VMS system commands are entered after the $ prompt and are executed when the[Return]key is pressed.

* VMS understands commands that have been shortened as long as they are still unique (usually 3-4 letters is enough).

* Most VMS commands have options that you can request; Options begin with a "/".

* Commands and options are separated from filenames by a space(s).

* Uppercase and lowercase characters work equally well.

For example:

$ COMMAND/OPTION FILE.EXT[Return]

If you do not receive a system error message (see "VMS System Messages") after entering the command, the command worked.

4.1.4.1. FILE MANIPULATION COMMANDS

$ C115LP or C115 file.ext

Print the contents of the specified file on the printers in Classroom 115. C115LP prints to the high-speed printer.

$ C135LP file.ext

Print the contents of the specified file on the printers in Classroom 135. C135LP prints to the high-speed printer.

$ COPY file1.ext file2.ext

Copy file1.ext to file2.ext. Make a duplicate of an existing file1.ext and name it file2.ext.

$ DELETE file.ext;#

Remove file.ext;#. The version number of the file must be specified. Warning: the file is gone forever...

$ DELETE file.ext;* removes all versions of the specified file

$ DELETE *.ext;* deletes all versions of all files with the specified file extension

e.g. DELETE *.obj;* <- deletes all object files

$ DELETE file.*;* deletes all versions of all files with the specified file name

e.g. DELETE lab1.*;* <- deletes all files with the name "lab1"

$ DIRECTORY Lists the names of all the files in your account. Most common abbreviation is DIR.

$ DIR/FULL Lists your files with additional data about them such as the size of the file, its protection, and so on

$ DIR/PROT Lists your files showing the current file protection settings.

$ PURGE Remove all old versions of all files, keeping only the most recent copy (the one with the highest version number). Commonly used when you run short of disk space (see SHOW QUOTA below).

$ RENAME file1.ext file2.ext

Change the name of file1.ext to file2.ext.

$ TYPE file.ext Display the contents of specified file on your terminal.

4.1.4.2. INFORMATION AND DISK COMMANDS

$ FIXQUOTA Causes your disk quota allocation to be updated. Use only at the beginning of a semester, if you are having trouble i.e. you are registered for a class but don't appear to be allocated any disk space.

$ SHOW QUOTA Display the amount of disk space (space for files) that you have allocated to your account, how much is in use, and how much is left.

$ SHOW DEFAULT Display your current default directory

$ TIME Display the time and date, for those without a watch.

$ WHO Display the usernames of everyone who is currently logged in on Meena.

4.1.4.3. SET COMMANDS

$ SET PASSWORD Changes your computer account password. This should be done soon after you receive your account.

You will be asked to enter your old password, the new password that you wish to change to, and then for a verification of your new password. Verification requires you to type your new password again to be sure it is correct. None of the passwords that you type are displayed when you type them.

A password must be at least 6 characters long and may contain alphabetic characters or numbers, but no spaces or punctuation. Upper and lowercase are the same for passwords.

Here is a sample password change for DOE1234J from 123456789 to FIREFLY (the passwords are not displayed while you are typing them):

$ SET PASSWORD [Return]

Old Password: 123456789 [Return]

New Password: FIREFLY [Return]

Verification: FIREFLY [Return]

$

$ SET TERMINAL Tell VMS what kind of terminal you are using. This command is entered with the options, /WIDTH= to describe how many columns your terminal has, and /DEVICE= to describe the name of the terminal you are using.

For the undergraduate accounts: they are all set up as VT100 terminal by default If you are using a micro, an XT100 terminal in CL135, or a VT220 in CL115 you do not have to use any set up terminal command.

4.1.4.4. VMS SYSTEM HELP

$ HELP Display help information on VMS system topics.

You will be given a long list of topics that you can receive help on. To select a topic enter its name after the Topic? prompt. Available information on that topic will be displayed along with a list of subtopics. Select a subtopic by entering it's name after the Subtopic? prompt.

Depressing [Return]after a Subtopic? prompt returns you to the Topic? prompt and a[Return]at the Topic? prompt returns you to the VMS system prompt $.

Enter [ [Ctrl] Z] at any point in Help to return directly to VMS.

4.1.4.5. OTHER COMMANDS

$ MAIL Electronic mail facility.

$ EDIT file.ext Start the general-purpose system editor and edit file.ext.

$ SETUP VI Sets up the environment for the "vi" editor.

$ VI file.ext Start the vi editor and edit file.ext.

$ PCTRANS from_file to_file

Transfer file between Meena and microcomputers at home when using YTERM as the communication software. YTERM can be obtained from the Computing Services Department, LY139.

To transfer a file from MEENA to your floppy disk at home:

$ PCTRANS file.ext;ver A:file.ext/PC [Return]

To transfer file from your floppy disk to MEENA:

$ PCTRANS A:file.ext/PC file.ext;ver [Return]

(FTP can be used to transfer file between Meena and PC's on campus, see Communications and Networking section for more detail.)

4.1.4.6. CONTROL AND SPECIAL CHARACTERS

The VAX uses certain control characters for special functions.

[ [CTRL] Z] - cancels command during entry

[ [CTRL] Y] - interrupts command or program and returns control to the command interpreter

- [ [CTRL] Y] is more powerful than [ [CTRL] C]

[ [CTRL] U] - discards the current line of input

[ [CTRL] Z] - signals 'End of file' for data from a terminal

[ [CTRL] S] - suspends terminal output until [ [CTRL] Q] is pressed

[ [CTRL] Q] - restarts terminal output suspended by [ [CTRL] S]

4.1.5. VMS SYSTEM MESSAGES

VMS System Messages are used to inform you about the status of the command you have just executed. The messages include error, informational, and warning messages. System messages are of the format:

% CODE-LEVEL-IDENTIFICATION, ....DESCRIPTION...

Where: CODE is the facility code which indicates the area of the system which created the message (DCL, EDIT etc.)

LEVEL is the severity level of the message as follows:

W - warning

I - informational

F - fatal

E - error

S - successful

IDENTIFICATION

A unique character code for the error. This code can be looked up in message manuals.

DESCRIPTION

An English description of the error.

Use the messages printed to discover if there were any errors and use them to correct the problem.

e.g.

%PURGE-W-FILNOTPUR, error deleting D15:[NEWS]LOGIN.COM;22

-RMS-E-PRV, insufficient privilege or file protection violation

PURGE the area of the system that created the error.

W severity level "W" for warning

FILNOTPUR the code for the error

error deleting ... the English description of the error

This error resulted from entering the purge command in a home directory. It was issued because, by default, your login.com file has the protection set so that you cannot accidentally delete the file. PURGE is telling you that if you really do want to purge your login.com files, then you must first set the protections accordingly.

By default all of the preceding fields are printed on the terminal. Any one or all of the fields can be suppressed by using the SET MESSAGE command:

SET MESSAGE / [NO] FACILITY

/ [NO] SEVERITY

/ [NO] TEXT

/ [NO] IDENTIFICATION

e.g.: $ SET MESSAGE/NOFACILITY/NOSEVERITY [Return]

This suppression will be in effect until you enter another SET MESSAGE command or until you logoff.

4.1.6. MANIPULATING VMS DIRECTORIES

The VMS operating system is set up in a tree structure. Each directory in the system is connected to other directories in the tree. The following example illustrates a directory called UGL which contains many directories for individual students. These directories are allocated to the individual students and are accessed as student accounts. Each student can make directories within his own account to separate his work. Subdirectories to these directories could also be made.

The directories below the one you are currently in will appear as files in a directory listing. The files will have the extension .DIR to indicate that the are actually directories. You cannot type or print these files as they do not contain printable ASCII characters.

When you type the directory command you get a listing of all the files in the current directory. The pathname for these files is the full path from the first directory down to the one that contains the file. For example, the file LAB3.FOR in the LABS directory of the account CROSSMAN might have the pathname:

MEENA3:[UGL.CROSSMAN.LABS]

To create a subdirectory in your account you use the CREATE command with the directory qualifier. The command requires a name for the directory.

The directory name is typed within square brackets,

preceded by a period, and

without the .DIR extension.

For example the command:

$ CREATE/DIRECTORY [.LABS] [Return]

will create a directory called LABS (file LABS.DIR) in the directory you were in. It would also be correct to use the command:

$ CREATE/DIRECTORY [UGL.USERNAME.LABS] [Return]

to create the same directory. By preceding the directory name with a period it is assumed that the directory is to go below the one you are currently in.

Once a directory has been created you can move into that directory with the SET DEFAULT command (abbreviated SETD). This command sets your default directory to whatever directory is named. The commands:

SETD [.LABS]

SETD [UGL.username.LABS]

SET DEFAULT [.LABS]

will all set the default directory to LABS. Again the period preceding the directory name indicates that the directory is below the current one. The SETD command is simply defined to be short for set default.

Once you have moved into this directory, any files created will be part of this subdirectory. To move up one directory in the tree structure you can simply type the SETD command with [-] as the directory name.

e.g. $ SETD [-] [Return]

To return to your home directory, the command HOME will do. If you were user crossman this is much simpler than typing:

$ SETD [UGL.CROSSMAN] or $ HOME [Return]

You can check which directory you are currently in by typing the command:

$ SHOW DEFAULT [Return]

You can list all the files in the current directory, and all directories below the current with:

$ DIR [...] [Return]

The COPY and RENAME commands may be used to copy files from different directories or to move files to a different directory. For example the command:

$ RENAME LAB3.TXT [.LAB]LAB3.TXT [Return]

will move the file LAB3.TXT into the subdirectory LAB and call it LAB3.TXT again. This might be a good time to use the wildcard to move your files.

Once you have deleted all the files from a directory you may delete the directory. To do this, you must first unprotect the directory and then delete it as you would any other file. To unprotect the directory lab while in the directory crossman, you would type:

$ SET PROTECTION=(O:D) LABS.DIR [Return]

Then to delete the directory you type:

$ DELETE LABS.DIR;1 [Return]

4.1.7. COMMAND FILES AND BATCHING JOBS


4.1.7.1. DEFINING SYMBOLS

A symbol definition is a way of personalizing the commands that you use. You can define a command to a different word so that when you type the new word the command will be executed. The format of a symbol definition is:

$ symbol :== "DCL command"

The symbol may be any character string up to 32 characters. The DCL command may be any valid DCL command. Some examples would be:

$ disk :== "SHOW QUOTA" [Return]

$ fort :== "FORTRAN/LIST/CROSS_REFERENCE/STANDARD" [Return]

After these definitions have been made the commands could be executed by simply typing DISK or FORT filename.

Symbol definitions are usually placed in the LOGIN.COM file so that they are executed each time you login. Login.com is discussed in the next section.

4.1.7.2. COMMAND FILES

Command files contain comments, DCL commands, and symbol definitions. They are used to execute a number of commands which are frequently entered during an interactive session. For example, the link, and run steps of program development could be placed in a command file requiring only one command to do both steps.

An example of a command file, which is present in every account, is the LOGIN.COM. This is a command file which is run each time that you login.

All command files have the file extension .COM.

Comments have an exclamation point following the dollar sign, e.g.:

$! This is a comment

To place a DCL command in a command file, you type the command, preceding it with a dollar sign. The dollar sign must be the first character on the line. The command will then be executed as soon as you run the command file. For example, the file DOIT.COM which contains:

$! This is a simple command procedure

$ WHO

$ SHOW QUOTA

$ DIR

will print the users on the system, your disk quota and then a directory of your files when it is executed. To execute the command file type an 'at' sign followed by the filename. To run the command file DOIT.COM you would type:

@DOIT [Return]

4.1.7.2.1. PASSING PARAMETERS

When writing command procedures it would be useful to have pass information to the procedure so that items such as filenames would not have to be hardcoded into the procedure. Then one procedure to compile, link, and run a program could be used for a number of programs without modifying the filename in the procedure. This can be done through the use of parameters.

There are eight possible parameters in a command procedure, numbered p1 through p8. Parameters are used in the procedure where the actual value would normally be placed. The parameter is placed with single quotes around it. For example, a procedure, COMP.COM, to compile, link, and run a file could be written to accept the parameter of the filename as follows:

comp.com

$ FORTRAN 'p1'

$ LINK 'p1'

$ RUN 'p1'

This command procedure could be executed by typing:

@COMP program_name [Return]

The parameters are replaced in the procedure in the order that they appear on the execute statement (e.g. "@COMP program_name [Return]). In this example, "program_name" would be substituted wherever 'p1' appears in the command procedure.

4.1.7.2.2. READING/WRITING AND CONTROL

Reading

You can input to a variable or a parameter.

e.g. $ INQUIRE variable

e.g. $ INQUIRE P1

A simple prompt can be combined with the INQUIRE statement.

e.g. $ INQUIRE P1 "Enter filename: "

Writing

If you wish to display only a few words use the WRITE command. e.g.

e.g. $ WRITE SYS$OUTPUT "a few words"

If you wish to display a few lines, use the TYPE command followed by the lines to be displayed. e.g.

e.g. $ TYPE SYS$INPUT

Display this line

then this line

Control

The general form of a very simple control structure is

IF condition THEN statement

Conditional operators are:

for numeric: EQ LE LT GT GE NE

for strings: EQS LES LTS GTS GES NES

e.g. $ IF variable .eq. 10 THEN command

The EXIT statement causes termination of a command procedure. EXIT can be used on a line by itself or as the statement following THEN.

The GOTO statement is associated with a LABEL in a command procedure.

GOTO - can be used on a line by itself or as the statement following THEN.

LABEL - is a variable name terminated by a colon; it must appear on a line by itself.

e.g.

$ label:

$ -------

$ -------

$ GOTO label

Example:

$! FOR.COM

$! Compile/Link/Run a FORTRAN program

$ INQUIRE standard "Standard option (yes-1 no-0)"

$ IF standard .eq. 1 THEN FORTRAN/LIST/STANDARD 'p1'

$ IF standard .eq. 0 THEN FORTRAN/LIST 'p1'

$ LINK 'p1'

$ RUN 'p1'

$ EXIT

4.1.7.3. SUBMITTING A BATCH JOB

Running a command procedure interactively is the equivalent of typing in the commands in yourself and causes your terminal to wait while running the commands. As an alternative, you could run the procedure as a batch job. This allows you to execute the procedure in the 'background' and frees your terminal so that you can be working on something else at the same time.

To run a batch job, you must write a command procedure and then use the SUBMIT command to run it. Whenever you batch a job it will execute your LOGIN.COM file before your command procedure. For this reason if you have modified your LOGIN.COM to expect input from the terminal, the batch job will terminate abnormally and not finish executing. When batching a job input and output cannot use the terminal, since the terminal is being used by you for some other work. If your command procedure requires some input it must come from a file. You may use the assign or define command in your procedure to redirect input or output to a file.

The format of the SUBMIT command is:

$ SUBMIT/qualifier(s) command_filename [Return]

The qualifiers for the submit command are:

/NOTIFY Sends a message to your terminal when your job has been completed or aborted (just like receiving NEW MAIL).

/PARAMETERS=(p1,p2,...,p8)

allows you to pass a maximum of 8 parameters to the job. The parameters are separated by commas and must be enclosed in parentheses.

/LOG_FILE=filespec if you do not specify this qualifier, the batch job will create a file with the same name as your command file but with the file extension of .LOG. This log file will contain information on all the commands that were executed, as well as any error messages which resulted.

/NOPRINTER tells the job not to print the .LOG file and not to delete this file from your account. (If you do not specify /NOPRINTER, the LOG file will be printed and then deleted from your account. )

It may be that your command file exists in a subdirectory in your account. If this is the case, and your command file refers to other files in that subdirectory, you must include the "set default [path_name]" command as the first line in your command file. Also, unless you specify /LOG_FILE=filespec (with the full path name of the subdirectory), the LOG file is placed in your home directory.

After you have submitted a job, you may change your mind. Instead of letting the job run anyway you can delete it from the queue. To do this you type:

$ DELETE/ENTRY=jobid SYS$BATCH

where the 'jobid' is the number that the system prints when it tells you that the job has been entered onto the queue.

4.1.8. VAX UTILITY SORT

Vax provides an easy to use sort that allows you to reorder the records in a file into a new sequence and to create a new file of the reordered records.

The general format of the sort statement is:

SORT input_file output_file /qualifier(s)

input_file: * specifies the file whose records are to be sorted

* up to 10 files can be sorted - separate files with commas

* no wildcards (*) allowed in file specifications

output_file: * specifies the output file for the sorted records

* no wildcards (*) allowed in file specifications

/qualifier(s) * are used to specify the sort key and other sort options

Qualifiers:

/STABLE specifies that records with identical keys are to be kept in original order.

/STATISTICS specifies that a statistical report is to be generated

/KEY=(sort_key[,...]) * Defines sort key(s).

* Up to 10 different sort keys can be specified.

* Specify /KEY=(sort_key) for each sort key

* Enclose the set of sort keys in parentheses.

* "sort_key" consists of keywords separated with commas.

Keywords for "sort_key":

Required keywords: POSITION:n * start position of key within record

SIZE:n * length of key within record

Optional keywords: ASCENDING the default sort order

DESCENDING descending sort order

Optional keywords for the format of the sort key in the file:

BINARY

CHARACTER the default format

DECIMAL

PACKED_DECIMAL

ZONED

LEADING_SIGN

TRAILING_SIGN

Example 1:

SORT SAMPLE.DAT SAMPLE.SRT /KE=(POS:3, SIZ:7, DES) [Return]

This entry would take SAMPLE.DAT as the file to be sorted and put the sorted records into the file called SAMPLE.SRT.

There is only one /KE specified; this says that the sort key is 7 characters long, and begins at the 3rd character in the records in the input file.

DES specifies that records are to be sorted in descending order.

Example 2:

SORT UNSORTED.DAT SORTED.DAT - [Return]

/KE = (POS:1 , SIZ:3) - [Return]

/KE = (POS:4, SIZ:3) [Return]

Note: These entries were made over several lines - the hyphen at the end of the first 2 lines are entered to indicate to the Sort utility, that it should expect more on the next line.

The primary sort key would be the first 3 characters of a record and the secondary key would be the 4th to 7th characters of a record.


4.1.9. PROGRAM DEVELOPMENT

Once you have learned the syntax of a particular programming language, you must be able to interface with the operating system of a computer to actually run your program. You must know how to compile, link, and run your program as well as how to inform the operating system of any input and/or output files required by the program.

4.1.9.1. COMPILE / LINK / RUN

The first step towards running a program is to convert the source code file to an object file. You must then link your object file with programming language and/or user libraries. You may then run the resulting executable file; remember though, that the operating system may need be informed of the names of input/output files (file I/O is the topic of the next section of this document).

The three steps necessary to compile, link, and run a program begin with a source code file.

In the following diagram, please note that "file" is used to denote the 'file-name'.

Under VMS, the extension of the source code file is related to the name of the programming language; for example, the extension ".COB' is used for a Cobol language source file. The results of a compilation are the object file (extension of ".OBJ') and a compilation listing file (extension of ".LIS"). When you compile, you must specify whether or not you wish to have a compilation listing produced. The listing file contains your source code plus any compiler generated information such as errors in the code. The object file is taken in by the link step which produces an executable file (extension of ".EXE").

EXAMPLE 1. (COBOL)

a) Compile the source file (uses .COB as the filetype)

COBOL/LISTING filename [Return]

This produces:

filename.LIS -- listing file

filename.OBJ -- object file

b) Link the object file

LINK filename [Return]

This produces:

filename.EXE -- executable file

c) Enter any references for I/O files - this may not always be necessary

d) Run the executable file

RUN filename [Return]

EXAMPLE 2. (PASCAL)

a) Compile the source file (uses .PAS as a filetype)

PASCAL filename [Return]

This produces:

filename.LIS -- listing file

filename.OBJ -- object file

b) Link and run as per the previous example.

EXAMPLE 3. (FORTRAN)

a) Compile the source file (use FORTRAN as filetype)

FORTRAN filename [Return]

This produces:

filename.LIS -- listing file

filename.OBJ -- object file

b) Link and run as per the previous example.

4.1.9.2. FILE INPUT/OUTPUT

In business, you would perform initial tests of your program on a small data file. When the program logic has been proven, you would then perform a "production run" using 'live' data. A file definition at the operating system level allows you to perform these different program runs using various data files. An editor is used to create/modify source files and input data files. Input and/or output files OTHER THAN THOSE SPECIFIED IN THE SOURCE PROGRAM must be defined to VMS before the program is run.

File Specification

The file referenced in a program must exist when an input file is referenced. An output file will be created during execution (for an output file). In the program, a file is referred to only by a filename. However, remember the three parts to a VMS file specification:

1 2 3

filename . extension ; version# e.g. infile.dat;3

The version number can be disregarded for the most part since VMS always assumes that the highest version number of a file is desired.

But, what if your account contained two files called "infile.txt" and "infile.dat" and your program referred to a filename of "infile". Which file would be selected when your program is run? The answer is based on the fact that VMS again makes an assumption for you. VMS assumes that you want a file with an extension of "dat". This is true for an output file as well as an input file.

Define Statement

The assumption VMS makes concerning a file extension is generally convenient. However, what would have to happen if you wanted to run your program with a different data file?

This is a reasonable question since programmers often wish to use a small 'test' data file in the initial stages of development. Once the program has been proved sound, a run is necessary on the larger 'real' data file. The test data file, and the real data file would have different filenames, possibly also different file extensions.

In order to run the program with a different file, you would have to make sure that the file extensions in your account were "dat" and also edit the program and re-compile it every time you wished to use a different data file. However, re-compiling for such a small change is time consuming (and on some systems, expensive). This problem can be easily overcome by using the VMS "define" statement before running the program.

$ define logical_name filename.filetype [Return]

The logical_name is the name of the data file as it appears in the program.

The filename.filetype is the file specification of the file you wish to use in your account; note that the version number is not specified.

EXAMPLE 1: (COBOL)

Suppose this "Select" statement was given in a COBOL source program:

SELECT INPUT-FILE1 ASSIGN TO IFILE.

If you had "IFILE.DAT" in your account, then you could just go ahead and compile/link/run your program normally.

However: if you wanted to run the program with a data file called "SALES.DAT", you would have to enter this just before the program is run:

define IFILE SALES.DAT [Return]

This would indicate that the input is to come from the disk file "SALES.DATA".

The following diagram illustrates the link between the Cobol FD name, the logical filename, and the name of the file as it exists on disk in an account.

EXAMPLE 2: (PASCAL)

Given this first line from a PASCAL source program:

PROGRAM testing (infile)

If you had "INFILE.DAT" in your account, then you could just go ahead and compile/link/run your program normally.

However: if you wanted to run the program with a data file called "numbs.DAT", you would have to enter this just before the program is run:

define INFILE numbs.DAT [Return]

The following diagram illustrates the link between the filename in the program, the logical filename, and the name of the file as it exists on disk in an account.

EXAMPLE 3: (FORTRAN)

Given this line from a FORTRAN source program:

OPEN(UNIT=15,FILE='myfile',STATUS='OLD')

If you had "MYFILE.DAT" in your account, then you could just go ahead and compile/link/run your program normally.

However: if you wanted to run the program with a data file called "numbs.DAT", you would have to enter this just before the program is run:

define MYFILE numbs.DAT [Return]

4.1.9.3. PHOTO - CAPTURING SCREEN DISPLAY

You can use the PHOTO command to capture output from the screen into a file. To start the photo session, simply type PHOTO and press [Return]. Once you have finished "recording" your information, type BYE, LOGOUT, or LO. The output is saved in a file called PHOTO.LOG.

When inside photo the system prompt changes from $ to PHOTO_$. You can type any VMS command at the PHOTO_$ prompt.

You can save your photo session to a file other than PHOTO.LOG by typing that name along with the photo command. For example, if you wished to save your photo output to the file LAB7.PHOTO you would type PHOTO LAB7.PHOTO [Return].

Example:

$ PHOTO LAB7.PHOTO [Return]

Begin PHOTO session

PHOTO_$ dir

Directory M2:[COMPSCI.LUIMEG.CS130]

A.FOR;10 FOR010.DAT;1 FOR020.DAT;6 LAB4.FOR;1

filename

Total of 5 files.

PHOTO_$ lo [Return]

Process LUIMEG_1 logged out at 27-JAN-1989 10:50:14.00

End PHOTO session

Everything appearing after the "Begin" line and before the "Process" line is captured in a file called "filename" (the name after the PHOTO command).

$ dir [Return]

Directory M2:[COMPSCI.LUIMEG.CS130]

A.FOR;10 FOR010.DAT;1 FOR020.DAT;6 LAB4.FOR;1

LAB7.PHOTO;1

Total of 5 files.

$

4.1.10. SYMBOLIC DEBUGGER

The symbolic debugger is a utility program that is used to aid in the debugging of programs. It can be used with many languages, but this discussion is restricted to FORTRAN. The debugger allows you to run your program interactively; to stop the execution of your program, check the values in your variables, change the values and continue running the program.

There are two options which are required to use the symbolic debugger. These are:

/[NO]DEBUG - on the compile step this option provides information for the symbolic debugger

- on the link step this option passes symbolic data created by the compiler to the debugger

- on the run step it invokes the symbolic debugger. If /DEBUG was used on the link step it is not necessary to include it on the run step, unless you include /NODEBUG to prevent the debugger from being invoked.

/[NO]OPTIMIZE - compiler produces optimized code. Must specify /NOOPTIMIZE during a debugging session to insure that the debugger has sufficient information to locate errors in the source program.

To invoke the symbolic debugger you compile, link, and run your program as follows:

$ FORTRAN/NOOPTIMIZE/DEBUG/LIST filename

$ LINK/DEBUG filename

$ RUN filename

This will begin running your program with the symbolic debugger. The prompt for the debugger is:

DBG>

At this point you can enter any debug commands that you wish. The format for the debug commands is:

command [keyword] [operand[,operand]...]

where:

command - is the command name

keyword - is the qualifier for the SET, SHOW, and CANCEL commands

operand - object of command. May consist of constant, names of variables or array elements, or expression

The available commands are in the following table:

Command Explanation

HELP - get on-line debug help

EXIT - finish the debugging session

GO - begin/continue program run until the end of the program or the next watch or break point

STEP n - execute "n" units beginning at the current location

- see the SET STEP command for a description of the unit lengths

EXAMINE[/qual] variable - look at the contents of a variable

- the contents is displayed in the data type associated with the variable

- to override the default data type for displaying the variable use one of the qualifiers: /BYTE, /WORD, /LONG, /FLOAT, /D_FLOAT, or /ASCII

- for integer types the base may also be set using one of: /DECIMAL, /OCTAL, or /HEXADECIMAL

DEPOSIT[/qual] variable=v1[,v2] - change the contents of a specified variable to a new value, v1 (v2 is the imaginary part for a complex number)

- The value may be defined in bases 10 (default), 16 (/HEXADECIMAL), or 8 (/OCTAL), by using the appropriate qualifier

EVALUATE[/qual] expr - use the debugger as a calculator to determine the value of a numerical expression, expr, which may contain variables, constants and operators

- The value may be determined in bases 10 (default),16 (/HEXADECIMAL), or 8 ( /OCTAL ), by using the appropriate qualifier

CALL subr(arg1,arg2,...) - call a subroutine, named "subr", from the debugger, passing arguments, "arg1, arg2,...", as in the FORTRAN CALL statement

SET keyword [object] - specify the contents of a keyword

SHOW keyword - show current value of a keyword

CANCEL keyword [object] - cancel current setting of the keywords

For the SET, SHOW, and CANCEL commands the available keywords and the objects which accompany them are:

Keywords Purpose

BREAK[/qualifier] point - select specified point of the program before which execution can be suspended

- break point may be a line number from the listing (%LINE 5), or a program statement label (%LABEL 100)

- an optional qualifier /AFTER:n may be used to specify the break is to occur the nth time the point is executed and thereafter

MODULE unit - select program units that are accessible during debug session

- by default only the first program unit specified in the LINK command is accessible

STEP unit - set unit length for the STEP command

- unit length may be either a line of the listing LINE) or a FORTRAN statement (INSTRUCTION)

- the unit count may include a subroutine call as a single unit (OVER), or each line of the subroutine as a unit (INTO)

WATCH variable - monitor specific variables and be informed when attempts are made to change their contents

- a watch point also acts as a break point, stopping execution when the variable is modified

4.1.11. DUMPING NON-TEXT FILES

The dump utility is used to look at the contents of non-text files. When a file contains a numeric value, not ASCII codes, it cannot be directly printed to the screen. An attempt to print the file results in the numbers being printed as the ASCII codes they represent, some of which are non-printable. Some of the ASCII codes represented may cause the terminal settings to be modified so that you can no longer recognize input from the keyboard, or so that the terminal beeps. To look at the contents of a non-text file the DUMP command is used. The format of the DUMP command is:

$ DUMP/options file_spec

The options for the dump command are:

/BYTE - format dump in bytes instead of words

/DECIMAL - format dump in decimal instead of hexadecimal or octal

/OCTAL - format dump in octal instead of hexadecimal or decimal

/HEX - format dump in hexadecimal instead of octal or decimal

/OUTPUT=file_spec

- writes the output to the specified file instead of the screen. If no file is specified the output is sent to a file with the same name as the input file except the extension becomes ".DMP"

/RECORDS = (option[,option...])

- dump the file one record at a time instead of one block at a time. The options are:

- start:n n is the first record to be dumped

- end:n n is the last record to be dumped

- count:n dump n records (cannot be used with the end option).

You could dump the file test.dat using the command:

$ DUMP/BYTE/RECORD TEST.DAT x(Return)

Looking at the resulting output, it can be divided into two major parts: the HEX and the ASCII.

The HEX is on the left-hand side of the page and is read from right to left by words (4 bytes).

The ASCII is on the right-hand side of the page and is read from left to right. On the far right is the address of the record in the file.

An example of one record dumped in the above manner is:

Record number 1 (00000001), 27 (001B) bytes

The ASCII is the representation of the byte. If the character is non-printable then a period (.) is used to hold the position.

If the type of data stored in each byte of the dump is known you can read the dump by converting each field. For example, CHARACTER data are stored in their ASCII representation, REAL in floating point notation, INTEGER in binary, LOGICAL as a byte, and COMPLEX as two contiguous floating point values.

4.1.12. SOURCE AND OBJECT LIBRARIES

4.1.12.1. SOURCE LIBRARIES

Although the discussion in this section is based on Cobol, the concept of a source library is quite similar for other languages. For example, in Pascal, the "include" statement is used instead of "copy" as in Cobol. Consult the appropriate language reference guide for particulars in other programming languages.

Cobol "Copy"

In business applications, programmers often reference a library for segments of code common to different programs. These common sections of code are referred to as "copy members". The code in a copymember must follow standard Cobol syntax. Use the editor to create a copy member, and give it the extension ".cob" as you would a Cobol program.

For example, the data definitions describing the format of a record could be common to many programs that access that type of record. Having only one set of data definitions means that each program does not have to be changed if there is a change in the format of the record.

The general format of the Cobol Copy statement is:

COPY copymember IN libraryname.

Notice that there are no file extensions included in the Copy statement. Place the Copy statement where you would put normal code in a program.

Cobol Copy Member Libraries

After you have used the editor to create copy members and put Copy statements in a Cobol program, you use the VMS "library" command to create a library and manipulate copy members in it. There are different types of libraries in VMS, but the one you are interested in is the text type. Therefore, you must specify the /text option in each library command that you use. The extension of your library will be .TLB which stands for "text library". You will not need to specify this extension, but you will see it when you do a "dir" to see files in your account.

Here are library commands necessary for using copy members:

library/create/text libraryname copymembername.cob

library/insert/text libraryname copymembername.cob

library/replace/text libraryname copymembername.cob

library/delete=copymembername.cob/text libraryname

Compiling with Copy Member Libraries

When you compile a program that references a copy member library, the code in the copy member is drawn from the library into your program. It is just as if you had typed the copy member into the original program. Use the following to include the contents of copy members in the listing.

cobol/copy/listing programname

Important: If you use the editor to make a change to a copy member, be sure to replace it in the library before you recompile the main program.

4.1.12.2. SEPARATE COMPILATION

When writing large programs it is not always possible nor desirable to include all of the code in a single source file. The source program may become too long to edit or the time required to compile the program may become excessive. You may also want to use the same routine in several programs making it desirable not to type the routine into each program separately. For these reasons, it may be desirable to break up a large program into several smaller pieces, placing each into a separate source file.

FORTRAN allows separate compilation of modules (subroutines and main program) which may then be linked together into one large program. This can be done by writing the main program in one file and the subroutines in another (or as many other files as required). The files may then be compiled separately and linked together to be run. For example, given the main program in a file called "main.for" and a subroutine in a file called "sub.for", the following would be typed:

$ FORTRAN main

$ FORTRAN sub

$ LINK main,sub

$ RUN main

When this is done you will have an object file for each file compiled (ie. "main.obj" and "sub.obj"), and one executable file which will be named after the first filename in the link command (i.e. "main.exe").

4.1.12.3. LINKAGE LIBRARIES

If you wish to use a large number of subroutines in separate files it may become very cumbersome to type all the filenames on the link step. To avoid this, the object files may be entered into a single linkage library which can then be defined so that it will be linked together with the main program during the link step. To do this, the LIBRARY command must be used. The format of the library command is:

$ LIBRARY/option lib_name obj_name[,obj_name...]

where:

lib_name - is the name of the library. The default extension for the lib_name is '.OLB'

obj_name, - are the names of the object modules. The default extensions for the object modules are '.OBJ'.

/option - is one of the possible options given below

Available options:

/CREATE - create the library naming it "lib_name" and inserting the object files "obj_file..." into the library.

/INSERT - allows you to insert more object files into an existing library file. If the subroutine you are trying to insert already exists an error will be generated and the subroutine will not be inserted.

/DELETE=(mod_name,...)

- delete the "mod_name..." modules from the library

/LIST=outfile.lis

- gets the librarian to produce a listing of the contents of the library in a file named "outfile.lis".

/SELECTIVE_SEARCH

- request that the files being inserted into the library are to be selectively searched. This means that only the subroutines that are needed by the program are linked into it.

Once the library is set up with all the subroutines stored in it, you must define the library so it will be linked with your main program. The define statement required is:

$ DEFINE LNK$LIBRARY library_name

This will define "library_name" to be automatically searched during the link step.

An alternative method is to use the assign statement, rather than the define statement:

$ ASSIGN library_name LNK$LIBRARY

As an example, given the main program in a file called "main.for" and a subroutine in a file called "sub.for", the following would be typed:

$ FORTRAN main

$ FORTRAN sub

$ LIBRARY/CREATE forlib sub

$ ASSIGN forlib LNK$LIBRARY

$ LINK main

$ RUN main

When this is done you will have an object file for each file compiled (ie. "main.obj" and "sub.obj"). The object file "sub.obj" is stored in the library "forlib.olb". The linker used the library and the "main.obj" object file to create the executable file "main.exe".

4.1.12.4. IMSL LIBRARIES

IMSL, or the International Mathematical and Statistical Library, is a set of FORTRAN routines which do mathematical functions. These subroutines can be linked into your FORTRAN programs and used, rather than writing the code again yourself. To access this library, include the following lines in your LOGIN.COM file:

$ Setup IMSL

$ DEFINE LNK$LIBRARY IMSL

Then use the following LINK command:

$ LINK yourobjfiles x(Return)

On the following pages are a few entries from the IMSL reference manual. You may want to use them. For more information consult the IMSL reference manuals in Computing Services in room LY139.

4.1.12.4.1. MRRRR/DMRRRR (SINGLE/DOUBLE PRECISION)

Purpose: Multiply two real rectangular matrices, A*B.

Usage: CALL MRRRR (NRA, NCA, A, LDA, NRB, NCB, B, LDB,

NRC, NCC, C, LDC)

Arguments

NRA - Number of rows of A. (Input)

NCA - Number of columns of A. (Input)

A - Real NRA by NCA rectangular matrix. (Input)

LDA - Leading dimension of A exactly as specified in the dimension statement of the calling program. (Input)

NRB - Number of rows of B. (Input)

NRB must be equal to NCA.

NCB - Number of columns of B. (Input)

B - Real NRB by NCB rectangular matrix. (Input)

LDB - Leading dimension of B exactly as specified in the dimension statement of the calling program. (Input)

NRC - Number of rows of C. (Input)

NRC must be equal to NRA.

NCC - Number of columns of C. (Input)

NCC must be equal to NCB.

C - Real NRC by NCC rectangular matrix containing the product A*B. (Output)

LDC - Leading dimension of C exactly as specified in the dimension statement of the calling program. (Input)

Algorithm

Given the real rectangular matrices A and B. MRRRR computes the real rectangular matrix C = AB.

Example

Multiply a 3 x 4 real matrix by 4 x 3 real matrix. The output matrix will be a 3 X 3 real matrix.

C Declare variables

INTEGER LDA, LDB, LDC, NCA, NCB, NCC, NRA, NRB, NRC

PARAMETER (LDA=3, LDB=4, LDC=3, NCA=4, NCB=3,

* NCC=3, NRA=3, NRB=4, NRC=3)

C

REAL A(LDA,NCA), B(LDB,NCB), C(LDC,NCC)

EXTERNAL MRRRR, WRRRN

C Set values for A

C A = ( 1.0 0.0 2.0 0.0 )

C ( 3.0 4.0 -1.0 0.0 )

C ( 2.0 1.0 2.0 1.0 )

C Set values for B

C B = (-1.0 0.0 2.0 )

C ( 3.0 5.0 2.0 )

C ( 0.0 0.0 -1.0 )

C ( 2.0 -1.0 5.0 )

C

DATA A/1.0, 3.0, 2.0, 0.0, 4.0, 1.0, 2.0, -1.0, 2.0, 0.0, 0.0,

* 1.0/

DATA B/-1.0, 3.0, 0.0, 2.0, 0.0, 5.0, 0.0, -1.0, 2.0, 2.0,

* -1.0, 5.0/

C Compute C = A*B

CALL MRRRR(NRA,NCA,A,LDA,NRB,NCB,B,LDB,NRC,NCC,C,LDC)

C Prints results

CALL WRRRN ('C = A*B', NRC, NCC, C, LDC, 0 )

END

Output

C = A*B

1 2 3

1 -1 0 0

2 9 20 15

3 3 4 9

4.1.12.4.2. WRRRN/DWRRRN (SINGLE/DOUBLE PRECISION)

Purpose: Print a real rectangular matrix with integer row and column labels.

Usage: CALL WRRRN (TITLE, NRA, NCA, A, LDA, ITRING)

Arguments

TITLE - Character string specifying the title. (Input)

TITLE = ' ' suppresses printing of the title. Use '%/' within the title to create a new line. Long titles are automatically wrapped.

NRA - Number of rows. (Input)

NCA - Number of columns. (Input)

A - NRA by NCA matrix to be printed. (Input)

LDA - Leading dimension of A exactly as specified in the dimension statement in the calling program. (Input)

ITRING - Triangle option. (Input)

ITRING Action

0 Full matrix is printed.

1 Upper triangle of A is printed.

2 Upper triangle of A excluding the diagonal of A is printed.

-1 Lower triangle of A is printed.

-2 Lower triangle of A excluding the diagonal of A is printed.

Remarks

1. A single format is chosen automatically in order to print pretty output. A field width of 10 is used. If all of the elements of A have no fractional part and are less than 10**9 in absolute value, an I10 format is used. Otherwise, a D, E, F format is used to print 4 significant digits for the largest element of A in absolute value. IMSL routine WROPT can be used to change the default format.

2. Horizontal centering, method for printing large matrices, paging, method for printing NaN (not a number), and printing a title on each page can be selected by invoking IMSL routine WROPT.

3. A page width of 78 characters is used. Page width and page length can be reset by invoking IMSL routine PAGE.

4. Output is written to the unit specified by IMSL routine UMACH.

Algorithm

Subroutine WRRRN prints a real rectangular matrix with the rows and columns labeled 1, 2, 3, .... The printing parameters described in Remarks 1, 2, 3 and 4 can all be changed via IMSL routines PAGE, WROPT, and UMACH. More information about these topics can be obtained by consulting the manual document for each of these routines.

In addition, subroutine WRRRN can print only the elements of the upper or lower triangles of matrices via the ITRING option. Generally, the ITRING option is used with symmetric matrices.

Example

The following example prints all of a 3 x 4 matrix A, where

aij = i + j/10.

INTEGER ITRING, LDA, NCA, NRA

PARAMETER (ITRING=0, LDA=10, NCA=4, NRA=3)

C

INTEGER I, J

REAL A(LDA,NCA)

EXTERNAL WRRRN

C

DO 20 I=1, NRA

DO 10 J=1, NCA

A(I,J) = I + J*0.1

10 CONTINUE

20 CONTINUE

C Write A matrix.

CALL WRRRN ('C = A*B', NRC, NCC, C, LDC, 0 )

END

Output

A

1 2 3 4

1 1.1 1.2 1.3 1.4

2 2.1 2.2 2.3 2.4

3 3.1 3.2 3.3 3.4

4.1.12.4.3. SVIGN

Purpose: Sort an integer array by algebraic value.

Usage: CALL SVIGN (N, IA, IB)

Arguments

N - Number of elements in the array to be sorted. (Input)

IA - Integer vector of length N containing the array to be sorted. (Input)

IB - Integer vector of length N containing the sorted array. (Output)

If IA is not needed, IA and IB can share the same storage locations.

Algorithm

SVIGN sorts the elements of an integer array, A, into ascending order by algebraic value. SVIGN uses the algorithm discussed in IMSL routine SVRGN. On completion Aj <= Ai for j < i.

Example

This example sorts the 10-element array IA algebraically.

C Declare variables

PARAMETER (N=10)

INTEGER IA(N), IB(N)

C Set values for IA

C IA = ( -1 2 -3 4 -5 6 -7 8 -9 10 )

C

DATA IA/-1, 2, -3, 4, -5, 6, -7, 8, -9 10/

C Sort IA by algebraic value into IB

CALL SVIGN (N, IA, IB)

C Print results

CALL UMACH (2, NOUT)

WRITE (NOUT, 99999) (IB(J),J=1,N)

C

99999 FORMAT (' The output vector is:', /, 10(1X,I5))

END

Output

The output vector is:

-9 -7 -5 -3 -1 2 4 6 8 10

4.1.13. VMS COMMAND SUMMARY

* All VMS system commands are entered after the $ prompt and are executed when the X(Return) key is pressed.

* VMS understands commands that have been shortened as long as they are still unique (usually 3-4 letters is enough).

* Most VMS commands have options that you can request; Options begin with a "/".

* Commands and options are separated from filenames by a space(s).

* Uppercase and lowercase characters work equally well.

For example: $ COMMAND/OPTION FILE.EXT X(Return)

$ ASSIGN library_name LNK$LIBRARY Defines a user library.

$ C115LP or C115 file.ext Print file on the printers in Classroom 115.

$ C135LP file.ext Print file on the printers in Classroom 135.

$ COBOL/LISTING filename Compile a Cobol program.

/COPY Include copy members in listing.

/ANSI Source code is standard Ansi format.

/[NO]DEBUG Provides information for the symbolic debugger.

/[NO]OPTIMIZE Produces optimized code for the debugger.

$ COPY file1.ext file2.ext Make a duplicate of file1.ext , name it file2.ext.

$ CREATE/DIRECTORY [.dirname] Creates a directory.

$ DEFINE logical_name filename.filetype

Associate file with logical name.

$ DEFINE LNK$LIBRARY IMSL Sets up a definition for the IMSL library.

$ DEFINE LNK$LIBRARY library_name Defines a user library.

$ DELETE file.ext;# Remove file.ext;#. Must speciry version number.

$ DELETE/ENTRY=jobid SYS$BATCH Take entry out of batch queue.

$ DIRECTORY Lists the names of all the files in your account.

$ DIR/FULL Lists files with size of the file, its protection, and so on.

$ DIR/PROT Shows the current file protection settings.

$ DUMP/options file.ext Dumps the specified file.

/BYTE /DECIMAL /OCTAL or /HEX To specify dump format.

/OUTPUT=file.ext Output to file instead of screen.

/RECORDS = (option[,option...]) Dump one record at a time.

start:n n is the first record to be dumped

end:n n is the last record to be dumped

count:n dump n records (not with end option).

$ EDIT file.ext Start general-purpose system editor.

$ FIXQUOTA Causes your disk quota allocation to be updated.

$ FORTRAN/LISTING filename Compile a Fortran program.

/[NO]DEBUG Provides information for the symbolic debugger.

/[NO]OPTIMIZE Produces optimized code for the debugger.

$ HELP Display help information on VMS system topics.

$ LIBRARY/qualifiers Manipulate a user library.

For an object library, do not specify /text.

$ LIBRARY/CREATE/TEXT libraryname mod_name.ext

$ LIBRARY/INSERT/TEXT libraryname mod_name.ext

$ LIBRARY/REPLACE/TEXT libraryname mod_name.ext

$ LIBRARY/DELETE=mod_name.ext/TEXT libraryname

$ LINK filename Link and object file with libraries.

/[NO]DEBUG Passes symbolic data to the debugger.

$ LOGOUT Ends the current Meena session.

$ MAIL Electronic mail facility.

$ PASCAL/LISTING filename Compile a Pascal program.

/[NO]DEBUG Provides information for the symbolic debugger.

/[NO]OPTIMIZE Produces optimized code for the debugger.

$ PCTRANS from_file to_file Transfer file between Meena and micro.

$ PHOTO [file.ext] Capture screen display to file. LO to end.

$ PURGE Remove all old versions of all files.

$ RENAME file1.ext file2.ext Change the name of file1.ext to file2.ext.

$ RUN filename Run an executable program.

/[NO]DEBUG Invokes the symbolic debugger.

$ SETD [-] Moves up one directory.

$ SET DEFAULT [.dirname] Move to named directory.

$ SET MESSAGE Set levels of error message reporting.

/[NO] FACILITY

/[NO] SEVERITY

/[NO] TEXT

/[NO] IDENTIFICATION

$ SET PASSWORD Changes your computer account password.

$ SET PROT=(group:settings) file.ext Sets protections on files.

$ SET TERMINAL Tell VMS what kind of terminal you are using.

$ SETUP IMSL Prepares the environment for IMSL use.

$ SETUP VI Sets up the environment for the "vi" editor.

$ SHOW DEFAULT Display your current default directory.

$ SHOW PROTECTION Displays file protection information

$ SHOW QUOTA Display the amount of disk space used and allowed.

$ SORT input_file output_file /qualifier(s)

/STABLE keep records with identical keys in original order.

/STATISTICS generate a statistical report

/KEY=(sort_key[,...]) Defines sort key(s).

Required keywords:

POSITION:n * start position of key

SIZE:n * length of key

Optional keywords:

ASCENDING DESCENDING

BINARY

CHARACTER the default format

DECIMAL

PACKED_DECIMAL

ZONED

LEADING_SIGN

TRAILING_SIGN

$ SUBMIT/qualifier(s) command_file

Submit a command file for batch processing.

/NOTIFY Notifies when job has been completed or aborted.

/PARAMETERS=(p1,p2,...,p8) Allows you to pass parameters

/LOG_FILE=filespec Lets you specify the log file name.

/NOPRINTER Don't print the .LOG file or delete it.

$ TIME Display the time and date.

$ TYPE file.ext Display the contents of specified file on your terminal.

$ VI file.ext Start the vi editor and edit file.ext.

$ WHO Display the usernames of those logged on .