(edited 9-Jul-91, Chapter 2) (Getting Started\int_start_chap)

This chapter assumes that the RT--11 operating system is installed on your computer. If RT--11 is not installed, see the (aut_book) or the (ins_book) and the hardware manuals provided with your computer for instructions on installing RT--11.

This chapter describes the following basic concepts and procedures you need to understand when using the RT--11 operating system: (unnumbered) Using mass storage volumes Knowing your terminal keyboard Starting RT--11 Communicating with the computer Setting the date and time Using the SETUP command Listing volume directories Using storage devices Using files Knowing the general command format Responding to command prompts Using HELP and INDEX Running utilities (Using Mass Storage Volumes)

Mass storage volumes (for example, disks, diskettes, and magtapes) provide a storage area apart from the computer's main memory. That information storage can be user-application programs, data needed by a program, the results of a program run, textual information, and so on. For example, the RT--11 operating system is stored on a mass storage volume called the system volume. When information is needed, as it is when you start the computer, information from the storage volume is transferred into main memory. (Storing Files)

You store information on a mass storage volume in the form of files. Each file is a collection of binary codes that represents data or computer instructions. Files may be parts of programs or entire programs, program input data, or text, such as a letter or report. Whatever its content, each file is treated as a unit and occupies a fixed area of the volume.

Every file on a mass storage volume has a unique name composed of a file name and a file type. The file name and file type identify the file and distinguish it from other files on the volume.

You can instruct RT--11 to display on your terminal the names of all files on a volume. The resulting list is called the volume directory listing. By referring to the volume directory, you can find the name, size, and creation date of each file on that volume and delete old files that you no longer need. Whenever you perform an operation that affects the number or size of files on a volume, the volume's directory reflects the change. (Protecting Files)

You can protect your files in several ways: (unnumbered) By backing them up By using the protection features of the media or hardware By using the protection features of RT--11 (Backing Up Files)

A storage volume may become damaged, lost, stolen, or worn through use. For these reasons, protect your files against accidental erasure or loss. One way to protect a file is to make a copy of it on a second storage volume. That copy, called a (backup file), ensures you against the loss of your file should the original copy be lost or become unreadable.

Before you continue, make sure you have a backup copy of the files on your (working system) volume, the volume on device SY. If you cannot locate a backup for this volume, create one before you continue. For manual backup instructions, see the (ins_book). An experienced user should perform the backup operation. (Volume and Hardware File-Protection Features\vhf_sec)

Some storage volumes provide a mechanism that protects files against accidental erasure. This mechanism is generally a switch on the volume itself or on the device unit in which the volume is placed. You can set it to a write-protect or write-enable condition.

When a volume is write protected, information can be copied from that volume but not written to or deleted from the volume. When a volume is write enabled, information can be both copied from or to the volume and deleted from the volume.

To protect important files against accidental modification or deletion, you can write-protect the volume on which they reside. (Operating System File-Protection Features\osf_sec)

The RT--11 operating system provides several protection features: (unnumbered) Distributed RT--11 files cannot be deleted unless you use the UNPROTECT command to remove the protection against deletion from the files. You must confirm certain RT--11 commands that might otherwise erase important information. You can override this feature if you do not need it. RT--11 prompts you for file information when it is needed by a command. You can use the PROTECT command to protect files against deletion or modification by an editor. (Knowing Your Terminal Keyboard)

All terminals have a keyboard and a video screen or paper output device. You enter commands or information at the keyboard, and the screen or paper output device echos the characters typed at the keyboard and displays RT--11 messages and responses.

The names or symbols and the position of some keyboard keys vary among different terminals. Using (lk201_figure) as a guide, notice the layout of your own keyboard.

(LK201 Keyboard Layout\lk201_figure) (POSTSCRIPT\mlo-003561.PS\11.5)

The keys for the alphanumeric characters and the SPACE BAR, SHIFT, TAB, and RETURN keys work like keys on a standard typewriter. The SHIFT LOCK key, however, locks only capital letters.

The DELETE, CTRL, and HOLD SCREEN or NO SCROLL keys are specific to computer terminals and have functions you will learn in this chapter and the next.

(keys_tab) summarizes the use of the major keyboard keys you will be using. This manual uses the key symbols given in the table to identify the major keyboard keys. Other key and keypad (the keys to the right of the keyboard) functions are described in this manual as you use them. (Keyboard Keys\keys_tab) (multipage) (2\22) (Key\Function) ( (CAPS LOCK) or (LOCK) \Locks the (SHIFT) key so you can type letters in uppercase. Press this key again to unlock the (SHIFT) key.) ( (CTRL) \ When used with another character key, performs various RT--11 functions. While pressing the (CTRL) key, you also press another key to execute the function. This is indicated in examples by the symbol (CTRL/X) where X represents the other key pressed, like the C key in the symbol (CTRL/C).) ((DELETE) or \ The (DELETE) key has the word (DELETE) or the symbol on it, depending on your terminal type. Pressing this key once erases the last character typed (the character to the left of the cursor). Pressing the key twice erases the last two characters, and so on.) ( (HOLD SCREEN) or (NO SCROLL) \Stops a screen display from scrolling (moving) off the screen. Press the key again to resume scrolling.) ( (RETURN) or (RET) \Advances the cursor to the beginning of the next line. You press this key to execute most RT--11 commands. ) ( (SHIFT) \Allows you to select between numeric and special characters, between uppercase and lowercase characters, and, in general, between the two characters displayed on those keys having two characters.) ((SPACE BAR) or (SP) \ Identifies the space bar. Press this key once for each space you need. (SP) is used in examples only if there could be doubt as to where you should add a space.) ( (TAB) \ Moves the cursor to the beginning of the next tab stop. Tab stops on a computer terminal are usually positioned every eight spaces across the line, beginning at column 1 of the display. ) ( Any other key\ Transmits the alphanumeric or special character to the computer.)

This manual uses the following conventions for representing keys. When keys are listed in a table column by themselves or when you are asked to press a specific key, that key is enclosed in a box. But, when the key is only referred to in text, it is represented in uppercase characters without the box.

See your terminal hardware manual for additional information on using your terminal and its keyboard. (Starting RT--11)

Starting RT--11 involves turning on the computer and the hardware devices and loading the appropriate software components from the system volume into computer memory.

The start-up procedure varies depending on the computer, how it is set up, and the devices connected to the computer. Follow the directions given in your hardware manuals.

In computer terminology, (bootstrapping) or (booting) an operating system means (starting) the operating system. So, the word (boot) is often used in place of (start) when referring to starting an operating system. (Start-up Procedure\startup_p_sec)

The following start-up procedure varies depending on your PDP--11 computer: (numbered) Press the power-on switch on your terminal. Press the power-on switch on your computer. (alphabetic) The computer takes a few seconds to run some diagnostic self-tests and displays some diagnostic memory messages on your terminal screen. The computer either boots the operating system or displays a boot prompt. (unnumbered) An example of a boot prompt on a MicroPDP--11 or a PDP--11/84 is the following: Commands are Help, Boot, List, Setup, Map and Test. Type a command and press the RETURN key:

If you get a boot prompt, follow the directions in your hardware manual for booting the operating system. In response to the preceding example prompt, you would type the following command if you have your operating system on device DU0: (BOOT DU0: (RET)) When the period (.) prompt, called the monitor prompt, appears at the left margin of the terminal screen, RT--11 is ready to accept a command. Turn on any peripheral devices (for example, a printer) that you may need. (What the Computer Does When You Turn It On\what_sec)

What happens when you turn on a computer differs depending on the computer and how you have set it up. The following is a description of a startup procedure in a MicroPDP--11 or a PDP--11/84: (numbered) If the computer is in dialog mode, it prompts you for the device from which to boot the operating system.

If the computer is in automatic mode, it searches the devices connected to it for the bootstrap (start-up routine). For example, the computer might look for the bootstrap first on a diskette device, then on a fixed hard-disk device, and finally on a magtape device --- if these devices are a part of your computer system. If the computer fails to find a bootable device, it prompts you for one.

The search pattern is preprogrammed into the computer by Digital. However, you can usually reprogram this pattern to your own choosing or have the computer immediately prompt you for the bootable device by SETUP commands explained in the hardware manual. It is wise to remove from your storage devices any bootable (one having a bootstrap routine in the first few blocks) volumes you do not want to boot, unless you know the computer will not look there before it finds the one you want. When the computer finds the bootstrap, the computer copies it from the storage volume into memory. The bootstrap next takes over, loads, and starts the RT--11 operating system monitor. The monitor then displays on your terminal screen a message identifying itself with its version and update number. For example, the following message identifies the XM monitor of Version 5.6 of the RT--11 operating system: RT-11XM V05.06 Next, the monitor looks on the system volume device (SY) for a start-up command file. This file configures RT--11 the way you want it. Start-up command files for the RT--11 monitors are distributed with RT--11. You can edit these files to suit your needs. See (int_startup_chap) on how to edit a start-up command file. If there is no start-up command file on your system device, a message is displayed on your terminal screen saying that the file cannot be found. However, RT--11 should start normally. When the period (.) prompt, called the monitor prompt, appears at the left margin of the terminal screen, RT--11 is ready to accept a command from the terminal. (Restarting RT--11)

You may have to restart the operating system if you want to boot from a different disk or monitor. When the hardware is turned on and RT--11 is running, you can restart RT--11 with the BOOT command. This command runs the bootstrap sequence described in (what_sec), beginning at step 3. This procedure is called a (soft) (software) (boot), whereas starting the computer when the hardware has been turned off is called a (hard) (hardware) (boot).

Restart RT--11 by typing the command BOOT SY: and pressing (RETURN); for example: (.)(BOOT SY: (RET))

If you have a foreground or system job running on RT--11 when you issue the BOOT command, you will get the prompt: Foreground loaded; Are you sure?

All jobs (foreground and system) are aborted by rebooting RT--11. Chapters (int_fb_chap\value) and (int_sysjob_chap\value) explain what a job is and how to run foreground/background and system jobs.

The message (Foreground loaded; Are you sure?) means you have a foreground job running and it will be aborted if you continue restarting your computer. If the job is printing a file, stop the print job first; if the job is an editor with an open file, close that file or you will lose the information in the file.

If you want to abort restarting RT--11, type N and press (RETURN) in response to the preceding prompt. Conclude any jobs you want to conclude and then again restart RT--11 with the BOOT command.

If you want to continue restarting RT--11 after getting the preceding warning prompt, type Y and press (RETURN) in response to the prompt.

If you do not get a prompt with a message ending (Are you sure?), RT--11 will restart automatically.

Once you have created your own start-up command file, you can restart RT--11 with the BOOT command to reinitialize the operating system with the features of your start-up command file. ((int_startup_Chap) describes startup command files and how to create them.) When you are more familiar with RT--11, you will learn other reasons for using the BOOT command. (Communicating with the Computer\cwc_sec)

You communicate with the computer through commands. These commands can be in any of the following languages: (unnumbered) Keyboard monitor (KMON)/Digital Command Language (DCL) Command String Interpreter language (CSI) Concise Command Language (CCL) User-defined languages (defined through the UCL and the UCF features)

These languages are different from the traditional computer programming languages, such as FORTRAN and COBOL, in that their purpose is to communicate between the user and the operating system, not to create programs. Accordingly, they are called (command) (not (programming)) languages.

The Digital Command Language (DCL) is a standard interface between a user and a Digital operating system. DCL as implemented on RT--11 is also called the keyboard monitor command language or the KMON command language, since KMON (short for keyboard monitor) is the program that interprets the language. The implementations of DCL on other Digital operating systems, such as RSX and VMS, are somewhat different.

CSI and CCL are are not as easy to use as DCL. In all three languages you can do many of the same things, but if you are a systems programmer, you may want to use CSI or CCL for some additional functionality.

The User Command Linkage (UCL) and the User Command First (UCF) features let you define your own commands. These features are different from the three preceding languages and are explained in (int_defcom_chap).

Whenever you issue a command, KMON inteprets that command, no matter what language it is in. (unnumbered) If the command is DCL syntax, KMON first checks to see if the command is simple or complex. If the command is a simple one, KMON itself executes the command; if the command is complex (that is, requires action from a utility), KMON determines the correct utility program to execute that command, and then passes the command to the utility to execute. If the command is a CSI or CCL syntax, KMON passes that command to the utility you have named in the command; then the utility executes the operation.

(SEq_figure) shows the difference in the sequence of events when you issue a DCL complex command or a CSI or CCL command.

(Sequence of Events with DCL and CSI or CCL Commands\seq_figure) (postscript\mlo-003562.ps\10)

This chapter explains how to use DCL, the language you should learn first. See the (sum_book) and the (sug_book) for an explanation of CSI and CCL commands. (DCL Commands)

DCL commands are letters and English or English-like words that instruct RT--11 to perform specific tasks. These commands usually approximate the name of the task you want to accomplish. TYPE, PRINT, and RUN are examples of DCL commands.

A prompt character --- a period at the left margin of the terminal printer or screen --- appears whenever the RT--11 monitor is waiting for you to type a command.

On a terminal screen, a blinking symbol, called the (cursor), indicates where the character you type will appear. The cursor can be a blinking rectangle or a blinking underline, depending on how you set your terminal. The cursor moves one character to the right each time you type a character.

You can abbreviate a command to its fewest unambiguous letters. For example, you can type PRI for the PRINT command or PRO for the PROTECT command. But you would get an error message if you just typed PR since that could be interpreted as either PRINT or PROTECT.

Three letters of a command are usually all you need, but sometimes less than three letters are enough. Consistently abbreviating commands to three letters helps avoid confusion. A few commands, like FORMAT and FORTRAN, require four letters. (Issuing a Command)

After typing a command, you (issue) or execute it by pressing (RETURN). This is indicated by (RET) in the examples in this manual. Pressing (RETURN) tells the monitor to initiate the command and to perform the operation.

If you type a command correctly and completely, the period (.) prompt is again displayed on the screen when the command has completed its function.

If you make a mistake or omit a required part of a command when you issue the command, RT--11 displays an RT--11 error message or prompts you for more information. (Correcting Typing Mistakes)

If you make a typing mistake, you can correct it in several ways: (unnumbered) By pressing (DELETE) or (CTRL/U). (unnumbered\-) To delete the single character to the left of the cursor, press (DELETE) once. To delete (all) the characters to the left of the cursor, press (CTRL/U); that is, while holding down the (CTRL) key, press the (U) key.

For example: (numbered) At the monitor prompt, type in any ten characters. Delete the last five by pressing (DELETE) five times. Press (CTRL/U) to delete the other five. By using the Single-Line (SL) Command Editor

The RT--11 SL Editor lets you do many editing functions (from moving the cursor to any point in a command line and inserting text within a command already typed, to recalling and repeating commands).

For now, all you need know is how to delete typing mistakes on the command line. However, after you finish this chapter, you should read and do the exercises in (int_SL_chap), which describes how to load and use the SL editor. (Aborting or Canceling a Command)

If you change your mind about issuing a command, you can either abort or cancel the command. (unnumbered) To abort a command that is executing, press (CTRL/C) (CTRL/C). That is, while pressing the (CTRL) key, you also press the (C) key twice. For example: (numbered) Issue the DIRECTORY command. (.)(DIR (RET))

A listing of the files on your default storage volume will start to be displayed on the terminal screen. Before the display of file names is finished, press (CTRL/C) (CTRL/C). Each CTRL/C is echoed on your terminal as ^C

This stops the display and returns you to the monitor prompt even though the display may not be finished. To cancel a command, press (CTRL/C).

You can cancel a command if the command has not yet been executed (you typed in a command, but then changed your mind before you pressed (RETURN), or if a command (or program) is waiting for you to enter information at a prompt. For example: (numbered) Type the DIRECTORY command and then press (CTRL/C) once. The CTRL/C is echoed on the terminal screen as ^C beside the canceled command. For example: (.)(DIR^C) (.)

This leaves the command line on your terminal screen as you had typed it, but it does not execute the command. Instead, the cursor is placed on a new line beside the monitor prompt beneath the canceled command line. Next, issue the COPY command, but press (CTRL/C) when you receive a prompt. This action cancels the command at the command prompt. (.)(COPY (RET)) (From? ^C) () (.) (Responding to Error Messages)

If you make a mistake when you issue a command, you will receive an error message, beginning with a question mark, displayed on your terminal's screen. For example: ?KMON-F-Invalid option

or ?PIP-E-Protected file already exists

These messages are in the format:

(?ProgramName--ErrorLevel--MessageText\bold)

where:

(3\1\14\) (\(ProgramName\bold)\ is the name of the program that found the error. This may be the command interpreter (KMON or CSI) or any one of the utilities to which KMON forwards the command. For example, PIP (in the preceding example) is one of the utilities that the COPY command uses.) (\\) (first) (\(ErrorLevel\bold)\ is a single letter indicating the severity of the error.) (\\) (last) (\(MessageText\bold)\is the error description.) (\\)

(levels_table) lists the error levels, their meanings, and their effects.

(Meaning and Effect of Error Levels\levels_table) (3\6\12) (Error Level\ Meaning \ Effect) (I\ Information\Command execution continues. The program detected a condition that you should be informed of. The message appears at the terminal or in the listing file. The condition may affect execution at a later time and may require future action. ) (W\ Warning\Command execution continues. The program detected a condition that may cause errors in execution. Corrective action may be necessary. The message appears at the terminal or in the listing file. ) (E\ Error\Command execution may terminate. The program detected an error that can cause other errors during execution. Corrective action is necessary. The message appears at the terminal or in the listing file. ) (F\ Fatal\Execution terminates. The program detected a serious error. You must enter another command to continue processing. The message appears at the terminal or in the listing file. ) (U\ Unconditional Abort\Execution terminates. An extremely serious error occurred that prevents further processing.)

All RT--11 error messages are listed in the (msg_book). They are listed alphabetically first by the program that displayed them, then by the error code, and finally by the message text. Under each message is an explanation of it and a possible way or ways to correct the situation.

When you get an error message and are not sure what it means, look it up in the (MSG_book) and read the explanation and suggested correction given for that message. For practice, look up the explanations for the two sample error messages given in the previous example. (Command Options)

Most commands can take one or more options that qualify how the command acts. You place the options after the command and separate them from the command and from each other by a slash character (/). For example, the DIRECTORY command gives you a directory listing of the files on your default storage volume, in the order they are stored on that volume. However, you also have the option of alphabetizing that listing; and the DIRECTORY/ALPHABETIZE command gives you the same directory listing, but in alphabetical order.

Options can also be abbreviated to the fewest unambiguous letters, which is usually three; for example, the DIRECTORY/ALPHABETIZE command can be abbreviated to DIR/ALP.

Issue the DIRECTORY/ALPHABETIZE command as in the following example, but after a few lines press (CTRL/C) twice to abort the listing, since it could be long: (.)(DIR/ALP (RET)) ( .) ( .) ( .) ( ^C ^C)

As a second example, notice the DIRECTORY/ALPHABETIZE/VOLUMEID command. This command displays the volume ID and owner name of your storage volume in addition to an alphabetical directory listing.

Issue the DIRECTORY/ALPHABETIZE/VOLUMEID command: (.)(DIR/ALP/VOL (RET)) (Setting the Date and Time\sdt_sec)

To set the date and time you enter them with the DATE and TIME commands. Once you accurately enter them, the computer keeps them both current as long as the computer is kept on. This helps in record keeping for RT--11 operations and helps you identify when RT--11 operations were performed.

For example, by entering the current date you instruct RT--11 to assign this date to all files you create on that day. The date will also appear in volume directories and listings produced by the various language processors and utility programs.

If your processor has a clock, by specifying the current time of day, you instruct RT--11 to keep track of time based on the time you set. The current time is printed on listings when they are produced, and may also be used to control certain program operations.

For PDP--11 computers, you must (reset) the date and time each time you turn on your computer. (Setting the Date\sd_sec)

If you used the automatic installation procedure to install RT--11, you set the date when you installed your files. However, if you have turned off your computer since then, you will need to reset the date.

To set the date, use the DATE command in the following command format: DATE dd-mmm-yy

where:

(3\1\10) (\ (dd-mmm-yy) \ represents the day, month, and year) (\ (dd) \is a number from 1 to 31) (\ (mmm) \is the first three characters of the name of the month) (\ (yy) \is the last two digits of the year)

Do the following exercise: (numbered) Set the date to January 10, 1990, by issuing the monitor DATE command with the day, month, and year as follows: (.)(DATE 10-JAN-90 (RET)) Since the preceding date is not current, enter the correct date by using the same command format. Entering a new date resets the date.

(Remember:\bold) the date that is set is temporary. You must reenter it whenever you turn on your computer. (Displaying the Date)

Once you set the date, display it with the DATE command. For example: (.)(DATE (RET)) (10-Sep-90)

If RT--11 responds to the DATE command with the message (?KMON-W-No date), the date has not been set. (Setting the Time)

To set the time, use the TIME command in the following command format: TIME hh:mm:ss

where:

(3\1\8) (\ (hh:mm:ss) \represents the time in 24-hour notation) (\ (hh) \is the hour) (\ (mm) \is the minutes) (\ (ss) \is the seconds)

RT--11 keeps track of time in hours, minutes, and seconds, based on the initial time that you enter in the command.

Set the time by issuing the monitor TIME command with the hour, minutes, and seconds in 24-hour notation as follows: (.)(TIME 15:01:00 (RET))

If your processor does not have a clock, the monitor prints a message on the terminal; this message informs you that the command is not valid for your computer configuration: ?KMON-W-No clock

Otherwise, the time is set to 3:01 p.m. If your processor has a clock, enter the correct time by using the preceding command format. Entering the new time resets the clock.

The clock stops when you turn off your computer. If you want the time to be kept current, you must reenter it whenever you turn on your computer.

If your processor has a clock and you do not set the time, the TIME command will return the time elapsed since the last hardware boot. (Displaying the Time)

To check the time, issue the TIME command. For example: (.)(TIME (RET)) (15:06:19)

RT--11 responds by printing the time, based on the information you previously entered. (Using the SETUP Command)

The SETUP command you set various features of your terminal and printer. For brief on-line descriptions of these, check the help files for those two devices by issuing the following commands: (.)(SETUP TERMINAL HELP (RET)) (.)(SETUP PRINTER HELP (RET))

Not all the features displayed in the help text are available for all terminals or printers. See your hardware manuals for setup features specific to your devices.

The SETUP CLEAR command, which clears your terminal screen, is a command you may find useful. To see how this command works, do the following: (numbered) Type ten letter Xs in a row and then press (CTRL/C). (.)(XXXXXXXXXX ^C) Next, to clear your screen, issue the SETUP CLEAR command: (.)(SETUP CLEAR (RET))

(int_startup_chap) explains how to incorporate some of the setup features you might want in an RT--11 start-up command file so that you will always have RT--11 set up your way each time you start it. (Listing Volume Directories\lvd_sec)

Every storage volume with files on it has a directory, which is a list of all the files stored on the volume. You can display a volume directory on your terminal, using the DIRECTORY command as described in the examples illustrating the DCL command format.

To list the directory of your system volume (the volume from which RT--11 was booted), type: (.)(DIRECTORY SY: (RET))

Since the directory of the system volume may be quite long, after approximately 10 lines have printed on the terminal, press (CTRL/O).

This control command is echoed as: ^O

This command sequence inhibits the remainder of the listing output from printing on the terminal, although the information on the total number of files and blocks is still given. When control returns to monitor command mode, look at the directory listing. For example: 22-Feb-91 SWAP .SYS 28P 03-Jan-91 RT11XM.SYS 122P 03-Jan-90 VMX .SYS 3P 16-Jan-91 PIX .SYS 68P 03-Jan-90 DWX .SYS 6P 03-Jan-91 DZX .SYS 4P 03-Jan-90 LSX .SYS 5P 03-Jan-91 SPX .SYS 11P 03-Jan-90 XCX .SYS 4P 03-Jan-91 LDX .SYS 10P 03-Jan-90 SLX .SYS 20P 03-Jan-91 DUP .SAV 51P 03-Jan-90 DIR .SAV 19P 03-Jan-91 PIP .SAV 30P 03-Jan-90 KEX .SAV 74P 03-Jan-91 VTCOM .SAV 24P 03-Jan-90 SPOOL .SAV 21P 03-Jan-91 DUMP .SAV 9P 03-Jan-90 SETUP .SAV 42P 03-Jan-91 RESORC.SAV 30P 03-Jan-90 UCL .SAV 16P 03-Jan-91 ^O 36 Files, 740 Blocks 650 Free blocks

The listing contains the current date, a list of file names and types, file sizes, file protection status, file creation dates, and a directory summary. (unnumbered) (Current Date\bold)

At the top of the listing is the current date, as you entered it earlier in the DATE command. (List of File Names and Types\bold)

Following the date, in 2-column format, is a list of the files on the volume. They are listed in the order they are stored on the volume. Read across the columns, moving from left to right, one row at a time.

First the file name appears, followed by a dot and a file type that is used to identify the file's format and contents. (type_taBLE) lists some common RT--11 file types with their meanings.

(Common File Types\type_table) (2\10) (File Type\Meaning) (.OBJ\Object file) (.BAK\Editor backup file) (first) (.BAS\BASIC source file) (.COM\Command file) (.DAT\Data file) (.DSK\Logical disk file) (.FOR\FORTRAN source file) (.JOU\ Journal file) (.JBK\ Journal backup file) (last) (.SAV\Executable program file) (.SYS\Operating system files and handlers) (.TXT\ASCII test file)

Note that while monitor and device handler files have a .SYS file type, other RT--11 operating system files do not have that file type. (File Sizes\bold)

After the file type is a number indicating the size of the file. The size is given in blocks, the smallest unit of space into which a mass storage volume can be divided. A block can contain 512 characters. (File Protection Status\bold)

The protected status of a file is indicated by the letter P following the file size in a directory listing. The P means the indicated file cannot be deleted or modified by an editor. Files furnished on the distribution medium have a protected status. However, you can change the protected status of a file with the UNPROTECT command, which is explained in (int_manag_chap). (File Creation Date\bold)

The date on which a file was created is displayed at the right of each file listing. However, this space is empty for files created on the day you started RT--11 without entering a date.

If you start RT--11, do not enter a date, and let RT--11 run overnight, the date program tries to increment a zero date. This is one way RT--11 can store a BAD (meaning (invalid)) date in your directory. If, in this situation, you create a file and get a directory listing for that file, the message --BAD-- appears in the date column next to your file. (Directory Summary\bold)

At the bottom of the directory listing, you are told how many files are on the volume, their total length, and the number of free blocks available for your use.

You can also obtain an abbreviated directory, which lists only file names and file types in 5-column format. To do this, use the DIRECTORY command with its /BRIEF option. After several lines have listed, interrupt the directory listing by pressing (CTRL/C) twice to abort the listing and return to monitor command mode. For example: (.)(DIRECTORY/BRIEF (RET)) ( 10-Feb-91 SWAP .SYS RT11XM.SYS VMX .SYS PIX .SYS DWX .SYS DZX .SYS LSX .SYS SPX .SYS XCX .SYS LDX .SYS SLX .SYS DUP .SAV DIR .SAV PIP .SAV KEX .SAV VTCOM .SAV SPOOL .SAV DUMP .SAV SETUP .SAV RESORC.SAV UCL .SAV UCL .DAT VBGEXE.SAV SRCCOM.SAV TECO .SAV TABFIX.TEC GNC .TEC DISK .TEC TAGEXP.TEC TEXT .TEC DOC .TEC RNO .TEC MEM .TEC MACRO .TEC LOCAL .TEC STRTXM.COM) (^C ^C)

Volume directories can be printed on a printer if one is available in your computer system. Use the /PRINTER option to print a directory listing. If you have a printer, make sure it is turned on, and then issue the DIRECTORY command as shown: (.)(DIRECTORY/PRINTER (RET))

The listing may be quite long. When the printer has finished printing, retrieve the listing. (Using Storage Devices)

RT--11 identifies storage volumes (and consequently the files on those volumes) by the names of the devices in which the volumes reside. These device names (or device specifications) are divided into two categories: (physical names) (names that represent specific devices) and (logical names) (symbolic names that can represent any storage device connected to your computer).

This section describes: (unnumbered) How devices are referenced by RT--11 The names of the handlers enabling you to use devices The names of the files containing those handlers How you can create your own logical names to reference devices How you can create your own logical disks as parts of a physical disk (Physical Device Names\pdn_sec)

A physical device name consists of a 2- or 1-letter mnemonic, a unit number, and a colon; for example, DU1:.

The (physical) name is not the hardware name for the device. Rather, the physical name is a (device specification); that is, a name RT--11 uses to specify (represent) a specific device.

The format for writing the name is:

(DDn:\bold) (for devices with 1 to 8 units)

or

(Dnn:\bold) (for extended-unit devices)

where:

(multipage) (3\2\10) (\(DD\bold) or (D\bold) \ is a 2- or 1-letter mnemonic identifying the type of device and naming a device handler (a program that lets you interact with that type of device).

For example, the device could be a printer, a terminal, or a storage device. A storage device in turn could be a a magtape, diskette, a disk device, or a partition of a large disk.

In the example device name, DU1:, DU names the DU handler, which controls MSCP disk devices. This handler lets you interact with a disk drive or disk partition connected to an MSCP controller.

The single letter (extended-unit) form is available only for certain device handlers after you have done an optional system generation.

When you have more than one device of the same type connected to your computer, the individual devices of the same type are identified as units of the device. If there are 8 or less units of this device attached to your computer, you use the 2-letter mnemonic. If there are more than 8 units of this device attached to your computer and you generated support for the extended-unit handler of that device, you use the 1-letter mnemonic. See the (SRN_book) for information on extended device-unit handlers.) (First) (\\) (\(n\bold) or (nn\bold)\ is an octal number identifying the unit of the specified type of device. This enables RT--11 to distinguish between different devices of the same type.

RT--11 assumes unit 0 of a device if no unit number is given. For example, DU: is equivalent to DU0:.

The first 8 units of a device are numbered 0 to 7. If you have generated support for the extended device-unit handler (which can handle up to 64 units of a device), then units 8 through 63 (decimal) are numbered 10 through 77 (octal). For example, D10: is the device name for the 9th device unit. ) (\(:\bold) (colon)\ tells RT--11 that the alphanumeric characters preceding the colon represent a device. You must use the colon in a device specification when RT--11 could confuse a device name for a file name. Otherwise, you do not need the colon (in a device specification), though you can use it. This means: (unnumbered) When a device name is part of a file specification, you must end that name with a colon so as to separate it from the file name that follows. For example, a colon separates the device name DL1 from the file name MYFILE in the file specification DL1:MYFILE.TXT. (SF_sec) describes how to specify a file in RT--11. When a command can take either a file specification or a device specification as its object, you must use the colon if you intend to specify a device. For example, the command DIRECTORY SY: gives you a directory listing of all the files on the system device SY:; but the command DIRECTORY SY gives you a directory listing of only those files whose name is SY on the default storage device. If you have no files whose name is SY, the command DIRECTORY SY displays the following message: 0 Files, 0 Blocks When a command can take only a device specification as its object, then you do not need a colon. For example, the ASSIGN, DEASSIGN, and MOUNT commands work only with devices and so do not require a colon when you specify a device name. ) (\\ (unnumbered) RT--11 on-line listings of logical device assignments omit the colon from the device name. In RT--11 documentation, the device name is often spelled without the colon. However the colon is included in table listings of device names and in command examples using device names. )

Some standard RT--11 physical device names and their corresponding devices are listed in (physical_names_table). These names represent not only storage devices but also other kinds of devices that might be connected to your operating system. The letters (n) and (nn) (in the case of extended units) indicate the unit number.

(Physical Device Names\physical_names_table) (multipage) (2\15) (Name\Device) (DLn: \RL01/02 disk) (DMn: \RK06/07 disk) (DUn: or Dnn: \MSCP disks and diskettes) (DXn: \RX01 diskette) (DYn: \RX02 diskette) (LD: or Lnn: \Logical disk) (LP: \Parallel-interface printer) (LS: \Serial-interface printer) (MMn: \Magtape) (MSn: \Magtape) (MTn: \Magtape) (MUn: \TMSCP Magtape) (RKn: \RK05/06 disk) (SPn: \Spooler) (TT: \Console terminal) (VM: \Virtual memory device) (XL: \Serial communication) (Device Handler Names)

Device handlers let you use devices, whether they are storage devices, terminals, printers, or whatever other devices you have connected to your computer. RT--11 refers to a handler by the same 2-letter mnemonic as the device names but without the unit numbers or colons. In fact, physical device names are the handler names minus the unit numbers and colon, with one exception. A handler with extended device-unit support keeps its 2-letter name, while the physical device names for its units over 8 have 1 letter.

Whenever you specify a physical device name, you are specifying a device handler.

To see what device handlers your operating system currently knows (that is, are installed), issue the SHOW command. For example: (.)(SHOW (RET))

A listing like the following should appear: (.)(SHOW (RET)) (TT (Resident) DL (Resident) DU0 = DK , SY MQ (Resident) VM LD SP XL (loaded=VTCOM) LS (Loaded) LS0 = (SPOOL) NL 19 free slots .)

TT, DL, MQ, and so on are names of device handlers in the preceding display. The line (DU0 = DK , SY) illustrates a logical device assignment, which is be explained in (ldn_sec).

Some RT--11 commands (for example, INSTALL and LOAD) affect device handlers. These commands and the installing and loading of handlers are explained in the (sug_book). (Device Handler Files)

The device handlers are contained in files whose names (or file-name specifications) begin with the same 2-letter mnemonic that identifies the device handler and end with the .SYS file type.

Issue the DIRECTORY command as follows: (.)(DIRECTORY DU.SYS (RET))

If you have the DU handler file for the unmapped monitors, RT--11 lists on your terminal something like this in response to the previous command: 10-Feb-91 DU .SYS 10P 25-Jan-91 1 Files, 10 Blocks 13313 Free blocks

If you do not have this file, RT--11 gives you a message like this: 10-Feb-91 0 Files, 0 Blocks 13313 Free blocks

Device handler file names for the mapped monitors have an X added to the end of the handler mnemonic. This X, however, does not appear in the handler name --- only in the handler file name. So, if you are using a mapped monitor, issue the DIRECTORY command as follows: (.)(DIRECTORY DUX.SYS (RET))

If you have the DU handler file for a mapped monitor, RT--11 lists on your terminal something like this in response to the previous command: 10-Feb-91 DUX .SYS 10P 25-Jan-91 1 Files, 10 Blocks 13313 Free blocks

So, a physical device name, the name of the handler that services that device, and the name of the file containing that handler are all similar but slightly different. These differences are summarized in (dif_table).

(The Differences Between Device, Handler, and File Names\dif_table) (multipage) (2\13) (Name\Representation) (DU0:\ An RT--11 unit of a storage device) (DU \A handler for that device) (DU.SYS \ A file containing the DU handler for the unmapped monitors) (DUX.SYS \ A file containing the DU handler for the mapped monitors) (Logical Device Names\ldn_sec)

In addition to physical device names, RT--11 uses two special logical (symbolic) device names, as listed in (logical_names).

(Logical Device Names\logical_names) (2\10) (Name\ Representation) (SY: \The operating system device; that is, the device from which the monitor was bootstrapped) (DK: \The default storage device (initially the same as SY:))

Note that a logical device name ends with a colon just as a physical device name ends with a colon. However, you must specify the colon only when RT--11 needs it to know you are specifying a device rather than a file (see (pdn_sec)).

This section describes a simple way to reference your system device and your default storage device through the preceding two logical names.

You can use the logical device name SY for your system device instead of its physical device name, and you can use the logical device name DK for your default storage device instead of its physical device name. These two names, however, represent the same device (whenever) you start your operating system. That is, the system device SY and the default storage device DK are the same when you start your operating system, even if in a past operating system session you changed them to represent different devices. As an illustration of this, issue the SHOW command again: (.)(SHOW (RET))

In the listing shown on your terminal, you should see a line similar to the following: DU0 = DK , SY

This means that the physical device name DU0 is represented by both the logical device names SY and DK. Notice also that this listing showing the logical name assignments is an example of when RT--11 displays device names without the colon ending.

Unlike DU or SY, the name DK is not tied to any one device. Rather, you can assign this name to represent any storage device connected to your computer. (aln_sec) explains how to do this.

Whatever device DK represents is your default storage device. This means if you do not specify a device name after a command, the command will work on whatever device is named DK. For example, issue the following DIRECTORY command by itself without a device name to get a listing of the files on DK. However, press (CTRL/C) twice to abort the command after the first few lines of the listing, since the listing could be long. (.)(DIR (RET)) ( .) ( .) ( .) (^C ^C)

Although the name DK is not tied to one device, the name SY is tied to one device: (unnumbered) The device from which RT--11 is booted. You get an error message if you attempt to change the assignment of that name. The default device used by KMON commands to run their programs. For example, the DIRECTORY command uses the DIR utility program. If the file DIR.SAV, the file containing the DIR utility, is not on SY, the DIRECTORY command cannot function.

To see the file name of the DIRECTORY utility program, issue the DIRECTORY command as follows: (.)(DIR SY:DIR (RET))

You should get a file listing similar to the following: 10-Feb-91 DIR .SAV 19P 25-Jan-91 1 Files, 19 Blocks 13313 Free blocks (Assigning Logical Names\aln_sec)

You can assign a specific storage device on RT--11 to be your default storage device (DK). To do so, use the following command format: ASSIGN physical-device-name logical-device-name

For example: (.)(ASSIGN DU1: DK: (RET))

Note in the command format that the (physical-device-name) precedes the (logical-device-name). When you assign a logical device name to a physical device name, you first specify the physical device in the command line.

If you are not sure what devices are connected to your operating system, issue the SHOW command to find a device name for a storage device different from your system device: (.)(SHOW (RET))

Using the preceding ASSIGN command example as a guide, assign DK to an available storage device different from your system device. Then issue the SHOW command again to check that the assignment has been made. You should get a display similar to the following: (.)(SHOW (RET)) (TT (Resident)) (DU (Resident)) ( DU0 = SY) ( DU1 = DK) (MQ (Resident)) (VM) (LD) (SP) (XL (loaded=VTCOM)) (LS (Loaded)) ( LS0 = (SPOOL)) (NL) (19 free slots) (.)

In addition to using RT--11's two default logical names, you may also want to assign your own logical device names to physical devices. For example, when programmers cannot predict which physical device will be available for use, they use logical device names in their programs. Then, before running the programs, they assign the logical device names they created to the physical device names on their operating system. A logical device name can be from 1 to 3 alphanumeric characters followed by a colon.

Use the ASSIGN command again to assign a 3-character name of your own choosing to the storage device you also assigned to DK. For example: (.)(ASSIGN DU1: VOL: (RET))

You can assign more than one logical name to a device. Issue the SHOW command to check your assignment: (.)(SHOW (RET))

Logical device names are temporary; that is, you must reassign them each time you boot RT--11. However, you do not have to reboot RT--11 to remove a logical name. To delete a logical name assignment, use the DEASSIGN command in the following format: DEASSIGN logical-device-name

Now deassign the logical name assignment you just made as in the following example: (.)(DEASSIGN VOL: (RET))

To check that the logical name assignment is deassigned, issue the SHOW command: (.)(SHOW (RET))

To deassign all your own logical name assignments in one step and to reassign DK to the same device to which it was originally assigned by RT--11, issue the DEASSIGN command by itself. For example: (.)(DEASSIGN (RET))

Finally, issue the SHOW command to check that the logical name assignments are back in their original state: (.)(SHOW (RET)) (Using Logical Disks\uld_sec)

You can subset your physical disks into smaller logical disks. (Do not confuse logical device names with logical disks; although similar in name, they are completely different.) Logical disks, though actually just sections of a physical disk, are treated by RT--11 as if they were totally separate physical disks. This section introduces you to logical disks. See (int_ld_chap) for a complete explanation of why and how to use them.

The logical disk handler is named LD. To understand what that handler is and how to use it, do the following: (numbered) Issue the SHOW command to see if the LD handler is installed: (.)(SHOW (RET))

If the LD handler is installed, it is listed in the display of known handlers. Go to step 2.

If the handler is not listed in the display, then you must install it with the following command: (.)(INSTALL LD (RET))

If you get no error messages, go to step 2. If you get either of the following error messages, the LD handler file is not on your system volume: ?KMON-F-File not found SY:LD.SYS

or ?KMON-F-File not found SY:LDX.SYS

If you get one of the preceding error messages, copy the file indicated in the error message (LD.SYS or LDX.SYS) from your distribution volume to your system volume. Use the following command format: COPY device-name:LD.SYS SY:

or COPY device-name:LDX.SYS SY:

Then, install the LD handler with the INSTALL command: (.)(INSTALL LD (RET)) Set aside a section of your default storage disk as a logical disk file, named INTRO.DSK, by issuing the following CREATE command: (.)(CREATE INTRO.DSK/ALLO:400 (RET))

The /ALLO:400 is an abbreviation for /ALLOCATE:400, which means you want the file INTRO.DSK to have 400 blocks allocated to it.

Once you have created the file, INTRO.DSK can be treated by the logical disk handler as if it were a separate disk volume. Verify the creation of INTRO.DSK on your default data device by issuing the following command: (.)(DIR INTRO.DSK (RET)) Associate your logical disk file INTRO.DSK with a logical disk unit, by issuing the following MOUNT command: (.)(MOUNT LD0: DK:INTRO.DSK (RET))

This is similar to placing a physical volume into a physical disk drive. And the logical disk unit LD0 is treated by the operating system as a physical device name. In the preceding command, you can picture yourself as having (placed) your logical disk (into) LD0 (logical disk, unit 0). You can use 8 logical disks at a time since there are 0 through 7 logical disk units for the LD handler.

If you need to use more than 8 logical disks simultaneously, you can do a system generation and select extended device-unit support for the LD handler. This extends the available logical disk units to 32. See (int_ld_chap) for a description of the LD handler. Create a file directory structure on your logical disk by issuing the following INITIALIZE command: (.)(INIT LD0: (RET))

In response to the preceding command, you should get a prompt like the following: (LD0:/Initialize; Are you sure?)

Type Y in response to this prompt.

A new (unused) volume, even a logical disk volume, must be initialized before it is used. You can, however, also initialize a used volume. In that case, the INITIALIZE command clears the directory and effectively deletes the files on the specified volume. To caution you against initializing a volume containing files you may want, RT--11 gives you the prompt, (Are you sure?), when you issue the INITIALIZE command. Examine the directory of your new logical disk by issuing the following DIRECTORY command: (.)(DIR LD0: (RET))

You should get a directory listing something like the following: 25-Jan-91 0 Files, 0 Blocks 392 Free blocks

Note the 392 free blocks. With the CREATE/ALLO:400 command, you set aside 400 blocks for this logical disk file. However, when you used the INITIALIZE command, 8 blocks of the 400 were set aside for a directory and volume header information.

Once you have completed the preceding, you have a logical disk that is ready for use. For the purposes of this introduction, we will use that logical disk as your default storage device. To do so: (NUMBERED) First, make sure you understand what physical devices DK and SY represent. Review (ldn_sec) if necessary. Next, with the following command, assign to DK the logical disk unit (LD0) on which you have mounted your logical disk file: (.ASSIGN LD0: DK: (RET)) To check this logical disk assignment, issue the SHOW command: (.SHOW (RET))

One line in the display should read: LD0 = DK Finally, issue the following four commands. However, after the first few lines of the system volume listing, press (CTRL/C) twice to abort the display: (.)(DIR SY: (RET)) ( .) ( .) ( .) (^C ^C) (.)(DIR DK: (RET)) ( .) ( .) ( .) (.)(DIR LD0: (RET)) ( .) ( .) ( .) (.)(DIR (RET)) ( .) ( .) ( .)

Note that your system volume and your default storage volume (the volume RT--11 assumes when you do not specify a volume) are now different. The system volume remains as it was, but the default storage volume is now your logical disk volume. Since you have not yet created any files for your logical disk volume, that volume's directory listing should indicate that it has 0 files.

For the rest of this chapter and for the other chapters in Part I of this book, keep the volume INTRO.DSK (LD0) as your default storage volume DK. Also, reassign LD0 as DK each time you boot RT--11, since RT--11 automatically assigns SY as DK each time it is booted. This way, the files you create while doing the exercises in Part I will remain together in one place and you will have practice distinguishing between SY and DK. (Using Files)

Most DCL commands work on files. You identify a file by its file specification, abbreviated as (filespec). (Specifying Files\sf_sec)

A complete filespec consists of a device name, the file name, and the file type in the following format: devicename:filename.filetype

where: (#)

(multipage) (3\1\13) (\ (:\bold) #and# (.\bold)\ The colon and period are called (delimiters). The colon, indicating the (limit) or end of the device name, separates the device name from the file name. The period, indicating the end of the file name, separates the file name from the file type. For example, the following filespec refers to the file called MYFILE.TXT stored on the volume in device DU1:. DU1:MYFILE.TXT ) (\(devicename\bold)\is the name of the device containing the volume holding the file. This part of the filespec specifies on which volume information can be found or to which volume information should be written, and can be the physical or logical device name.) (\\ Each device supported by RT--11 is identified by a device name, as explained in (pdn_sec). A logical device name consists of any three alphanumeric characters followed by a colon.

If you do not include a device name in your file specification, RT--11 assumes DK, the default storage device. It is a convention in RT--11 documentation to indicate a generic device name with the symbol (ddn).) (\(filename\bold) \is one to six alphanumeric characters assigned by the person or program that created the file.) (\(filetype\bold) \is zero to three alphanumeric characters that indicate the format or contents of the information in the file and assigned by the person (or system program) that created the file.

Note, however, that to create a file with a blank file type, you must specify a period (.) after the file name when you create the file.) (\\ If you create a file without specifying a file type or the period ending the file name, the name will include whatever file type is the default for the file creation operation you perform. For information on creating files with the KED editor, see (int_Ked_Chap).) (\\ Categorize your files according to type, using the file names to distinguish between individual files. For example, you might use the file type .TXT to identify the following text files: MYFILE.TXT FORM.TXT MEMO1.TXT

(type_table) lists some common file types.) (Abbreviating File Names and Types)

When you specify files, you can abbreviate their names and types in two ways: through wildcards and through factoring. (Using Wildcards)

When you want a command to act on a number of files with similar file specifications, use wildcards in the filespec to abbreviate the file names. The two symbols used as wildcards in RT--11 are the asterisk (*) and the percent sign (%).

The asterisk (*) can replace any character or string of characters in a file name or type (up to 6 for a file name, up to 3 for a file type). For example, if you have a series of files with the same file type, like MEMO.TXT, EXAMP.TXT, and INTRO.TXT, you could use the notation *.TXT to represent all these files. The following exercises illustrate some of the ways you can use the asterisk wildcard: (numbered) Find out how many files on your system volume have the file type .SAV, by issuing the command: (.)(DIR SY:*.SAV (RET)) Find out how many files on your system volume have a file name beginning with RT11, by issuing the command: (.)(DIR SY:RT11*.* (RET)) Find out which files on your system volume have a name beginning with the letter S and ending with the letter P, by issuing the command: (.)(DIR SY:S*P.* (RET))

If you omit the file type or the file name and file type in a file specification, RT--11 assumes a wildcard for that part or parts of the specification. For example, the following two commands are equivalent: (.)(DIR SY: ) (.)(DIR SY:*.* )

So too, the next two commands are equivalent: (.)(DIR DU1:PROG1 ) (.)(DIR DU1:PROG1.* )

However, these two commands are not equivalent: (.)(DIR DU1:PROG1. ) (.)(DIR DU1:PROG1.* )

PROG1. is a file having no characters in its file type, and the command DIR DU1:PROG1. means: (The following gives you the 9 point code-ex font) defcodexamplefontninepointmono Display a directory listing of any file on device DU1: having the name PROG1.

While the command DIR DU1:PROG1.* means: Display a directory listing of all files on device DU1: having the file name PROG1 (The following gives you the 10 point code-ex font) defcodexamplefonttenpointmono

To avoid making mistakes as a new user of RT--11, it is better to use wildcards for each part of a file specification than to omit the last part or parts of the specification.

The percent sign (%) can replace any single character in a file name or type. For example, if you had two files named MEMO1.TXT and MEMO2.TXT, you could use the notation MEMO%.TXT to represent both files. Find out how many files on your system volume begin with the letter D and have only two letters, by issuing the command: (.)(DIR SY:D%.* (RET))

You can use as many % wildcards in a filespec as required, each wildcard specifying one letter. For example, one or the other of the following two commands displays your file handler files. If you have a mapped monitor running your operating system, the first command displays your handler files; otherwise, the second command displays those files: (.)(DIR SY:%%X.SYS ) (.)(DIR SY:%%.SYS )

You cannot use wildcards to specify devices. (Factoring File Specifications)

Another way to specify several files at once on the same device is to use factoring. Factoring is valid for any command in the KMON command language.

In factoring, you enclose in parentheses the part of a multiple file specification that differs. This part can be multiple file names, multiple sections of a file name, multiple file types, or multiple sections of a file type. For example, the following two lines are equivalent: MEMO(1,2,30).TXT MEMO1.TXT,MEMO2.TXT,MEMO30.TXT

Find out what files (if any) on your system volume have names beginning with the two letters KE and ending with a D or an X, by issuing the command: (.)(DIR SY:KE(D,X).* (RET))

Factoring is useful when you are performing an operation on a group of files stored on a particular storage device. Take the following command as an example: (.)(COPY DU0:(FILE1.RNO,FILE2.RNO,FILE3.RNO) DU1:*.*)

In this case, using factoring saves you from having to type in the device name for each file specification, if all the files are on DU0.

However, if DU0 is not your default storage device, and you issue the following command, you will get an error message: (.)(COPY DU0:FILE1.RNO,FILE2.RNO,FILE3.RNO DU1:*.*)

Because RT--11 assumes FILE2.RNO and FILE3.RNO are on your default storage device, it will not be able to find the files. Notice the difference between these last two examples. This is a case where factoring the file specifications helps you correctly abbreviate them.

Note that the example command could also be expressed this way: (.)(COPY DU0:FILE(1,2,3).RNO DU1:)

You can even factor a unit number in a device specification. For example, the following two commands are equivalent. They both tell RT--11 to copy the file MYPROG.FOR from device DU0 to device DU1: (.)(COPY DU(0 1):MYPROG.FOR) (.)(COPY DU0:MYPROG.FOR DU1:MYPROG.FOR)

This example illustrates how to factor multiple device specifications. The other examples illustrate how to factor multiple file specifications. (Knowing the General Command Format)

The correct way to type a DCL command with its options and parameters (what the command acts on --- usually filespecs) is called its format or syntax. This differs slightly for each command, depending on the nature of the command and its options, if it has any.

A command will not function unless it is issued with its correct syntax, including correct spelling, spacing, and punctuation. In the following general format, square brackets indicate optional qualifiers and characters, and the ellipsis symbol () indicates repetition; that is, you can repeat the item preceding the ellipsis: COMMAND[/option] INPUT[/option] OUTPUT[/option]

where:

(multipage) (3\2\19) (\(COMMAND[/option])\First you indicate, by command, which system operation you want performed. Command options change the way the command normally operates.) (first) (\) (\ (INPUT[/option]) \ You next indicate input information that is to be used during the operation. This is usually one or more file specifications, though some commands affect only the in-memory image of the monitor rather than files (for example, the ASSIGN and DEASSIGN commands).

When you do not specify input, the command may take a (default) input; that is, the command assumes input. For example, the default input of the DIRECTORY command is the directory of the current storage volume (DK).) (\\ The input is separated from the command by one or more spaces so as to differentiate it from the command; for example, MEMO.TXT, located on DK, is the input filespec in the following command: (.)(PRINT MEMO.TXT) ) (\\ Some commands can take more than one input filespec; for example, the PRINT command can take more than one. To specify more than one filespec as input, separate them from one another by commas (,). For example: (The following gives you the 10 point code-ex font) defcodexamplefontninepointmono (.)(PRINT DU0:FILE1.TXT,DU1:FILE2.TXT,DU1:FILE3.TXT) ) (The following gives you the 10 point code-ex font) defcodexamplefonttenpointmono (\\ If you do not specify a device name with a filespec, that file must be on DK. For example, in the following example all files must reside on DK: (.)(PRINT FILE1.TXT,FILE2.TXT,FILE3.TXT) ) (\\ Three limitations to issuing multiple filespecs on a command line are: (unnumbered) You can include no more than six file specifications at a time (you can use wildcards in a filespec). You cannot add spaces after the commas (between the filespecs). The command cannot exceed 80 characters after factor expansion. ) (\\ An input filespec can also be qualified by options. As with command options, you place the option after the information it qualifies, and you separate the option from the filespec and from other options by a slash character. For example, the command (.)(DIRECTORY INDEX.SAV/BEGIN)

gives a directory listing of the default storage device beginning with the file INDEX.SAV. Issue the command: (.)(DIR INDEX.SAV/BEGIN (RET)) ) (\\) (last) (\(OUTPUT[/option])\ Finally, some commands require output information to be created as a result of the operation. For example, the COPY command requires input (the files you want to copy from) and output (the files you want to copy to). You separate input from output by leaving a space between them on the command line. You usually have only one output filespec. In the following example, the input and the output are on DK. (COPY MEMO.TXT MEMO.OLD)

Output file options are available to let you alter default output operations.

Some commands do not use OUTPUT. ) (Responding to Command Prompts)

If you issue a command without specifying required parameters (input and output necessary for the command to function) and the command does not take default input, the monitor prompts you for the needed information. For example, if you issue the following command: (.)(COPY (RET))

The monitor prompts with: (From?)

At the (From?) prompt, type in the specification of the files you want copied and press (RETURN). The monitor next prompts you with: (To ?)

Respond to this prompt with the specification of the files to which you want the copied file transferred. (Monitor Command Descriptions)

If you want information about a monitor command, you can either look it up in one of the following manuals or use the on-line HELP utility:

(2\26) ((mrm_book)\ Lists monitor commands alphabetically and gives a summary explanation of each command.) ((sug_book)\ Lists monitor commands alphabetically and gives a complete description of each command with examples.) (Using the On-Line HELP Utility\uoh_sec)

The HELP utility, distributed with the RT--11 operating system, lists the keyboard monitor commands and describes how to use them. This utility is activated by the HELP command. However, the file (HELP.SAV) must be on SY for the HELP command to work. You can determine whether this file is present on your system disk by issuing the command DIRECTORY SY:HELP. For example: (.)(DIR SY:HELP (RET))

The exercises in this section assume the file HELP.SAV is on SY.

To familiarize yourself with using the HELP command, do the following: (unnumbered) Display at your terminal a list of all the keyboard monitor commands with a brief description of their functions, by issuing the command HELP *. For example: (.)(HELP * (RET)) Get a detailed description of the use of the HELP command itself, by issuing only the HELP command. For example: (.)(HELP (RET))

When you do this, notice that the description of the HELP command begins with the name of the command and its function. The rest of the description is divided into four parts (called (subtopics)). Every complete HELP description of a command is divided into these same four parts, which are listed in (section_table).

(The Four Parts of a Help Descripton\section_table) (2\12\) (Part\Description) ((Syntax) \Shows how to type a command) ((Semantics) \Briefly explains the meaning of the command elements used in the preceding (syntax) section) ((Options) \Lists and briefly describes all of a command's options) ((Examples) \Lists a few examples illustrating how to use the command)

The HELP display should look something like this: (The following gives you the 9 point code-ex font) defcodexamplefontninepointmono HELP Lists helpful information SYNTAX HELP[/options] [ topic [ subtopic [:items... ]...]] or HELP * SEMANTICS HELP * lists the items for which help is available. HELP lists the HELP text (of which this is a part). HELP topic lists information on the specific topic only. HELP topic subtopic lists information on the specific subtopic only (for example, HELP HELP SEMANTICS lists the paragraph of which this text is a part). HELP topic subtopic:item lists only the text associated with the specific item. HELP topic/item (5) lists the text associated with the specific item under the subtopic OPTIONS. Valid topics are the keyboard monitor commands. Subtopics are "SYNTAX", "SEMANTICS", "OPTIONS", and "EXAMPLES". Items are specific command options. OPTIONS PRINTER Prints the HELP text on the line printer TERMINAL (default) Types the HELP text on the terminal EXAMPLES HELP COPY !Lists information about COPY command HELP/PRINTER EXECUTE !Prints information about EXECUTE !command HELP PRINT OPTION:COPIES!Describes the COPIES option for PRINT HELP COPY/BOOT/DEVICE !Describes the listed options for COPY defcodexamplefonttenpointmono

The following list of descriptions and operations explains the items in the command syntax section of the preceding example: (callout) (/Options\bold) specify HELP command options; there are only two: /PRINTER and /TERMINAL. The /PRINTER option sends the help information to a printer if one is available. The /TERMINAL option (the default mode) sends the information to the terminal.

As when issuing a monitor command, when you use the HELP utility, you can also abbreviate a command or option to the least number of ambiguous letters, usually three letters.

Print the HELP listing given in the previous example by issuing the command: (.)(HELP/PRI (RET)) (Topic\bold) specifies a monitor command about which you want information, for example: DIRECTORY. Get a complete help description of the DIRECTORY command by issuing the command: (.)(HELP DIR (RET)) (Subtopic\bold) specifies any one of the four sections of a complete HELP listing. Display the EXAMPLES section of the HELP DIRECTORY listing by issuing the command: (.)(HELP DIR EXA (RET)) (Item\bold) specifies one of the members in the subtopic group. For example, you might want a brief explanation of one option to a command. Display an explanation of the /ALPHABETIZE option for the DIRECTORY command by issuing the command: (.)(HELP DIR OPT:ALP (RET))

Note that you can specify more than one item in the command line if you separate the items with a colon (:). Display explanations for both the ALPHABETIZE and NEWFILES options of the DIRECTORY command by issuing the command: (.)(HELP DIR OPT:ALP:NEW (RET)) For information about an option or options, you do not have to use the OPTIONS subheading. Instead, all you need to type is the command with its options. Issue the command: (.)(HELP DIR/ALP/NEW (RET)) (Running Utility Programs\int_util_sec)

RT--11 has many programs, called (utilities). Two utilities already mentioned in this chapter are the DIR utility and the HELP utility. Other utilities, such as PIP (Peripheral Interchange Program), SRCCOM (Source Comparison program), and KEX (Keypad Editor program for mapped monitors) are mentioned in Chapters (int_manag_chap\value) and (int_KEd_chap\value). Most utility programs are described in the (sum_book).

You can run RT--11 utilities in the following ways: (unnumbered) By issuing a KMON command, if the utility you want to run (or a function of a utility you want to run) has a KMON command that interacts with it. Many KMON commands run utilities, as described in (cwc_sec). Two examples in this chapter of utilities that KMON interacts with are the DIR utility (see (ldn_sec)) and the HELP utility (see (uoh_sec)). By issuing the KMON R command with the name of the utility (or the name of the file containing the utility). The utility must be on SY, unless you include a file-structured device in the file specification. For example: (.)(R DIR (RET)) (*)

or (.)(R DK:MYPROG.SAV (RET)) (*) By issuing the KMON RUN command with the name of the utility (or the name of the file containing the utility). The utility must be on DK, unless you include a file-structured device in the file specification. For example: (.)(RUN DIR (RET)) (*)

or (.)(RUN MYPROG.SAV (RET)) (*)

The asterisk (*) is the utility prompt. Once you receive this prompt, you issue CSI (Command String Interpreter) commands to control the utility. By issuing the KMON V command with the name of the utility (or the name of the file containing the utility). The V command calls the virtual program loader, VBGEXE.SAV, which must reside on SY. VBGEXE loads and runs the utility, which must be on SY, unless you include a file-structured device in the file specification. For example: (.)(V INDEXX (RET)) (*)

or (.)(V DK:MYPROG.SAV (RET)) (*) By issuing the KMON VRUN command with the name of the utility (or the name of the file containing the utility). The VRUN command calls the virtual program loader, VBGEXE.SAV, which must reside on SY. VBGEXE then loads and runs the utility, which must be on DK, unless you include a file-structured device in the file specification. For example: (.)(VRUN INDEXX (RET)) (*)

or (.)(VRUN MYPROG.SAV (RET)) (*)

The asterisk (*) is the utility prompt. Once you receive this prompt, you issue CSI (Command String Interpreter) commands to control the utility. By issuing the KMON FRUN or SRUN command with the name of some utility files: For example: (.)(FRUN SY:KEX.SAV (RET)) (*)

or (.)(SRUN SY:KEX.SAV (RET)) (*)

See (int_fb_chap) and (int_sysjob_chap\value) for an explanation of how to use the FRUN and SRUN commands. By issuing the name of the utility as a CCL (Concise Command Language) command with input and output information (in CCL format) on one command line. For example: (.)(KEX filename (RET)) (.)(SRCCOM file1,file2 (RET)) (.)(PIP input-file output-file (RET)) (.)(PIP output-file=input-file (RET))

(relationship_table) lists the ways of running a utility with the utility location RT--11 assumes for each way. The R, RUN, FRUN, and SRUN commands also let you specify a file-structured device with the utility name. If the utility is not in the assumed or specified location, RT--11 cannot find the utility and the command fails.

(Relationship Between Running a Utility and Its Location\relationship_table) (2\25) (Way of Running Utility \Assumed Location of Utility) (KMON (DCL) command\ SY:) (R utility_name\ SY: ) (RUN utility_name\ DK: ) (V utility_name\ SY: ) (VRUN utility_name\ DK: ) (FRUN utility_name\ SY: ) (SRUN utility_name\ DK: ) (utility_name\ SY:)

For further information on running utilities, see the (sum_book) and the on-line index entry for the specific utility. (Using the On-Line Index)

You can use the on-line index, INDEX, to find the most current information about topics located in the RT--11 documentation set. INDEX immediately displays almost all the information contained in the (mas_book) on your terminal screen.

The on-line package consists of the utility files INDEX.SAV or INDEXX.SAV, and the index data files INDEXA.IMG, INDEXB.IMG, and INDEX.IDX. Use the virtual version of the index utility, INDEXX.SAV, if you are using a mapped monitor. Otherwise, use INDEX.SAV. The data files (type .IMG and .IDX) are used with all monitors.

You access the on-line index as you would any other utility, as previously described in (int_util_sec). The index data files can reside on the system (SY) or default data (DK) volume.

The rest of this section assumes you have INDEX.SAV or INDEXX.SAV on SY.

INDEX is not a DCL command; you must run the INDEX utility. For example, under a mapped monitor: (.)(INDEXX (RET))

INDEX then displays an introductory frame on your screen. That frame lists the mnemonics for the manuals in the RT--11 documentation set that are contained in the index. The spines (legends) on the manual binders contain those mnemonics for easy reference. These manuals are:

(2\10) ((INS\BOLD)\ (ins_book)) ((INT\BOLD)\ (Int_book)) ((MRM\BOLD)\ (MRM_book)) ((PRM\BOLD)\ (PRM_book)) ((RLN\BOLD)\ (SRN_book)) ((SSM\BOLD)\ (SSM_book)) ((SUG\BOLD)\ (SUG_book)) ((SUM\BOLD)\ (SUM_book)) ((SYG\BOLD)\ (SYG_book)) ((V5N\BOLD)\ On-Line Release Notes (V5NOTE.TXT))

Manuals not listed in the introductory frame are not included in the index.

Press (RETURN) to get into the index. Then, in response to the search prompt, type a search string and press (RETURN). For example, look for references to the word MONITOR by typing the letters MONI: (Search string: )(MONI (RET) )

INDEX displays any entries matching the string. Continue to press (RETURN) to scroll through the index or type another search string and press (RETURN).

Press (CTRL/C) to exit from INDEX.

As you proceed through this manual, use INDEX to find more information on a given topic. (Chapter Summary)

This section summarizes how to specify a file and format a DCL command. The section also lists some useful keys, key sequences, and helpful DCL commands.

Complete information on DCL commands is in the (SUG_BOOK) and a summary of DCL commands is in the (MRM_BOOK). (File Specification Format)

You store information in files on mass storage volumes. You then identify a stored file by a file specification, which names the device containing the volume holding the file. A complete file specification includes the device name, the file name, and the file type in the format: devicename:filename.filetype

For example: DU1:MEMO1.TXT (DCL Command Format)

The primary way of interacting with the computer is through the DCL command language. The following is the general format of this language: COMMAND[/OPTION...] INPUT[/OPTION...] OUTPUT[/OPTION...]

where:

(multipage) (3\1\10\) (\(COMMAND)\ is a word indicating the task you want to accomplish. Word commands can be abbreviated to the least ambiguous letters, usually three or four. For example: DIRECTORY

or DIR ) (first) (\(/OPTION)\ alters the normal (default) operation of a command. For example: DIRECTORY/ALPHABETIZE/VOLUMEID

or DIR/ALP/VOL ) (\(INPUT)\ is information to be used during the operation. The MEMO files are the input in the following two examples: PRINT MEMO1.TXT PRINT MEMO1.TXT,MEMO2.TXT,MEMO3.TXT ) (\(OUTPUT)\ is information to be created as a result of the operation. The file MEMO1.OLD is the output in the following example: COPY DU0:MEMO1.TXT DU1:MEMO1.OLD ) (Useful Keys and Key Sequences)

The following list gives useful keys and key sequences discussed in this chapter:

((CTRL/C)\bold) (simple) Exits a program (for example, the INDEX or HELP program) when the program is prompting you for input and returns control to the monitor. Also cancels a command that has not yet been executed.

((CTRL/C) (CTRL/C)\bold) (simple) Aborts a command or program that is in the process of executing and returns control to the monitor.

((CTRL/O)\bold) (simple) Inhibits the remainder of the output from being displayed on the terminal screen.

((CTRL/U)\bold) (simple) Deletes the line of characters to the left of the cursor.

((RETURN)\BOLD) or ((RET)\bold) (simple) Executes a command line.

((DELETE)\bold) or (simple) Removes one character at a time to the left of the cursor. (DCL Commands)

The following alphabetical list gives the major DCL commands discussed in this chapter: (ASSIGN)(physical-device-name logical-device-name) (simple) Defines a logical name equivalent for a physical device. (CREATE)(filespec/ALLOCATE:size) (simple) Creates a file entry in a volume's directory and allocates the specified amount of space for the file on that volume. This command does not store any data in a file. (DATE)([dd-mmm-yy]) (simple) Sets or displays the current system date, if it has been set. (DEASSIGN)([logical-device-name]) (simple) Removes logical name assignments made with ASSIGN. (DIRECTORY)([ddn:]) (simple) Lists a directory of the volume in the specified device. If you do not specify a device, this command lists a directory of the default storage volume (DK). The listing is displayed on the terminal screen in the order in which the files are on the volume. (DIRECTORY/ALPHABETIZE)([ddn:]) (simple) Lists a directory of the specified volume. The listing is displayed on your terminal screen in alphabetical order. (DIRECTORY/BRIEF)([ddn:]) (simple) Lists a brief directory of the specified volume. The listing is displayed on the terminal screen, showing only file names. (DIRECTORY/NEWFILES)([ddn:]) (simple) Lists on your terminal screen only those files on the specified volume having the current system date. (DIRECTORY/PRINTER)([ddn:]) (simple) Lists on the system printer the directory of the specified volume. (DIRECTORY/VOLUMEID)(ddn:) (simple) Displays on your terminal screen the volume ID and owner name along with the directory listing of the the specified volume. (HELP)() (simple) Displays brief descriptions of monitor commands and command options. (INITIALIZE)(ddn:) (simple) Creates and clears a file directory structure on the specified volume. (MOUNT)(logical-disk-unit logical-disk-file) (simple) Associates a logical disk unit with a logical disk file. (R)(filespec) (simple) Runs a program located on the specified file-structured device, or, if not specified, on the system (SY) volume. (RUN)(filespec) (simple) Runs a program located on the specified file-structured device, or, if not specified, on the default storage (DK) device. (SETUP)(CLEAR) (simple) Clears the terminal screen and places the cursor at the top left of the screen. (SETUP)(PRINTER HELP) (simple) Lists SETUP commands letting you set various printer characteristics. (SETUP)(TERMINAL HELP) (simple) Lists SETUP commands letting you set various terminal characteristics. (SHOW)([optional-information]) (simple) Lists on the terminal screen the installed devices and logical device assignments. Options are also available to make this command show other configuration information. (TIME)([hh:mm:ss]) (simple) Sets or displays the current system time.