(edited 11-Sep-91, Chapter 8) (Using the Start-Up Command File to Configure Your System\int_startup_chap)

This chapter specifically discusses the start-up command file for the XM and ZM monitors. However, the general information in this section applies also to the FB monitor. The start-up command files for the XM and ZM monitors are identical. Rather than continuously mention each monitor file and the appropriate start-up command file separately, this chapter will use the construction (x)M to represent both monitors, the construction RT11(x)M.SYS to represent both monitor files, and STRT(x)M.COM to represent both start-up command files. In each procedure, example, or illustration, use the form that is correct for the mapped monitor you want to support.

This chapter contains the following information: (unnumbered) Issues to consider before you begin Editing your start-up command file Running your start-up command file

Use the on-line index utility, INDEX, and see the on-line help utility, HELP, for more information on the topics described in this chapter.

A start-up command file is an indirect command file. It can contain commands that: (unnumbered) Display a file on your terminal screen, such as V5USER.TXT Set up and run utilities, such as SL, SPOOL, and VTCOM Change device handler characteristics Load device handlers Modify hardware characteristics Return information about your computer's configuration Run other indirect command files or IND control files

The RT--11 monitor you boot (or your computer automatically boots) looks for and attempts to run a particular start-up command file. For example, the ZM monitor looks for only the start-up command file STRTZM.COM; the XM monitor for only STRTXM.COM, and the FB monitor looks for only STRTFB.COM. To be found, a start-up command file must reside on the system (SY) device. If your monitor cannot find its start-up command file, it displays an error message.

RT--11 is distributed with a start-up command file for each of the distributed monitors. As distributed, each start-up command file only displays the file V5USER.TXT on your terminal and runs the TMSCP controller checking program, MSCPCK. It is up to you to edit your start-up command file because only you know what functionality you require from that file. (Before You Edit Your Start-Up Command File\startup_bef_sec)

Before you begin to edit your start-up command file, you should and consider the following issues: (unnumbered) What devices are part of your computer configuration?

Your configuration can include a printer, a modem or serial line connection to another computer, disk or magtape drives, and so on. (unnumbered\--) What handlers do those devices require?

Make a list of the device handlers required by those devices. Do those handlers require you to set certain characteristics?

Device handler characteristics must match those required by each device. Use SET command conditions to modify the characteristics of your device handlers to match those required by each device. Often, the default conditions for a device handler match those required by the device. However, devices such as terminals and printers may require you to configure your device handler differently than the default configuration. Also, some devices such as printers and modems may require that you set the device handler's baud rate.

Consult your device documentation for that device's required characteristics. See the SET command information in the (sug_book) for the SET command conditions available for each handler.

To include those SET commands in your start-up command file is the only way to reference those characteristics in the future; they are not displayed by any SHOW command. Are there optional characteristics you may prefer for those handlers?

You can tailor your device handler to control a device in the manner you prefer by using SET command conditions. Are there utilities you want to run at system boot?

RT--11 includes utilities you may want to run as you boot your system. For example, if you intend to use the SL editor, you probably want to turn on SL from your start-up command file. The distributed start-up command files also include commands you can enable to turn on VTCOM and SPOOL. (unnumbered\--) Do you want to run those utilities as system jobs? If so, are the device handlers for those utilities loaded?

You must load all device handlers used by system jobs. At least, you probably want to load the handler for your default data (DK) device if that device is different than your system (SY) device. If a utility requires a particular handler, does that handler require you to set certain characteristics? Are there optional characteristics for that handler you may prefer?

For example, if you are going to run the single-line editor, SL, you may want to SET SL KED to enable keypad editing of your keyboard commands. Do you want to assign a particular device as your default data (DK) device? If you are using a system job, is DK loaded?

At system boot, the default data device is automatically the same as the system device. If you want to assign a different device as the default data device, you probably want to do that from your start-up command file. Is there information about your computer configuration, such as memory allocation, that you are going to want displayed each time you boot?

For example, to display system memory each time you boot, include the SHOW MEMORY command. To examine the status of the device handlers in your system configuration, include the SHOW command. Are there other indirect command files or IND control files you want to run each time you boot your system?

You may have another indirect command file or IND control file on your system you want to run each time you boot. You can include a command to run such a file as the last command in your start-up command file. However, if you include such a command, that file will be run every time you boot your system (including a soft boot).

You should be careful about running any files that initialize or configure a device from your start-up command file. You probably want to initialize or configure a device only at initial boot and not when you soft boot your system. In that case, manually run such an indirect file after your start-up command file has run. Is everything you reference in your start-up command file located on your system (SY) device? If not, you have to make provision for that.

Your start-up command file looks for everything (all utilities, device handlers, other files, and so forth.) on the device your are booting -- your system device. If anything you reference is not on your system device, you must explicitly indicate the device on which it resides. All device handlers used by system jobs must be on your system device. (Editing the Start-Up Command File\startup_edit_sec)

After you have decided what functionality you require when you boot your system, you can edit your start-up command file. Use the following information as a general guide to that editing process. You should have considered the points discussed in (startup_bef_sec) and know what functionality you want at system boot. (numbered) Open your (sug_book) to the SET commands section. If you have not already looked up the SET commands for the handlers you will be using, look them up as you read the following information. Print your start-up command file.

If your system includes a printer, issue the following command: (.)(PRINT SY:STRT(x)M.COM (RET)) Look at your printed copy of the file.

Note that all commands except TYPE V5USER.TXT at the beginning of the file and R MSCPCK at the end are preceded by an exclamation point (!). Those exclamation points are comment characters. When RT--11 runs an indirect command file (such as a start-up command file), commands that are preceded by comment characters are not executed. You enable commands by removing comment characters from the commands you want executed. You disable commands by adding comment characters to commands you do not want executed. If you have not done so already, preserve your distributed start-up command file. (.)(COPY SY:STRT(x)M.COM STRT(x)M.DIS (RET)) Issue the following command to remove the file protection: (.)(UNPROTECT SY:STRT(x)M.COM (RET)) Start the KEX editor as a system job: (.)(SRUN KEX.SAV (RET)) Issue the following commands to open STRT(x)M.COM for editing: ((CTRL/X)) (Job?)(KEX (RET)) (KEX>) (SY:STRT(x)M.COM (RET))

The file STRT(x)M.COM is displayed on your terminal screen. Assuming you have read V5USER.TXT and do not want it displayed whenever you boot your system, add a (!) to the beginning of that command line: !TYPE V5USER.TXT

The monitor that processes your start-up command file when you boot your system stops parsing a line when it encounters the comment character (!). Therefore, you achieve no real increase in speed by deleting the line. Following the module identifier and the TYPE V5USER.TXT command is mixed-case text. That text is explanation of the commands that follow the text. If the size of the file is a concern to you, you can delete explanatory text after reading and understanding it. However, Digital recommends you keep the text until you are sure the file is executing the way you want. In any event, never delete just the comment character (!) in front of explanatory text. Your monitor would then attempt to execute that text as a command. Do not enable the command SET TT QUIET. That command stops the display of the file as it executes. If there is a problem with the file's execution, you would not know where the problem exists if you cannot see the file execute.

After you have edited and run the file and it executes in the manner you want, you can enable the command SET TT QUIET. However, seeing the display of commands each time you boot your system is a good reminder of how the file is configuring your system. Because you are using KED or KEX to edit this file, you do not want the following two commands. The commands SET TT NOSCOPE,NOTAB,FORM,NOCRLF and SET EDIT EDIT are applicable only if you are using a hard-copy terminal, and you cannot run KEX on a hard-copy terminal. The following two command lines turn on the SL (single-line) command editor. They also turn on the unsupported LET utility. For the purposes of this exercise, it is assumed you do not want the LET utility. You can find out about LET in the (sum_book).

Assuming you do want SL, you probably also want to use the keypad to edit command lines. To turn on SL and the keypad editing functionality, edit those two command lines to appear as follows: SET SL RECALL,KED SET SL KMON

To ensure that the characteristics of the SL handler match those of your monitor and to ensure that SL is installed on your system, go to the background environment and issue the following commands: ((CTRL/B)) (SET SL SYSGEN (RET)) (INSTALL SL (RET))

Then, return to editing the file: ((CTRL/X)) (Job?)(KEX (RET)) ((CTRL/W)) The next command is (SET RUN VBGEXE). Remove the comment character (!), as this command enables automatic job loading in the completely virtual environment. You can see the (Sim_book) for information on the completely virtual environment. The following set of command lines turns on the virtual terminal communications package, VTCOM. The first set is appropriate to PDP--11 computers. Use the second set if you are running a Professional series computer. The command lines use the (FRUN) command to run VTCOM as the foreground job. If you want to run VTCOM as a system job to keep the foreground environment open for other uses, change the (FRUN) command to an (SRUN) command.

Note that all SET commands are issued before the XL handler is loaded.

The following example command lines turn on VTCOM as a system job for the PDP--11 computer: SRUN SY:VTCOM.SAV/PAUSE LOAD XL=VTCOM RESUME VTCOM The following two sets of command lines turn on the transparent spooler, SPOOL, and configure your printer. The first set is for serial interface printers supported by the LS handler. The second set is for parallel interface printers supported by the LP handler. If you do not know what type of printer you have, you can probably use the first set. The following discussion illustrates the first set of commands and the LS handler; the discussion also applies generally to the second set and the LP handler.

Various SET commands may be required to run your printer correctly. (unnumbered) You must set the CSR and vector addresses if you are using a PDP--11 computer. The correct addresses are located in the (syg_book). Your printer may require that you change some default LS handler SET conditions; consult your printer documentation and the SET commands section for the LS handler in the (sug_book). You should include any LS handler SET conditions that configure your printer to perform as you want. You can configure the SPOOL utility handler (SP) for some characteristics, such as flagpage and endpag support. Some RT--11 utilities, such as DUMP, send list files by default to the LP handler. To prevent any potential problems, you should assign the printer handler (LS or SP) to the logical name LP.

The following example command lines include the set commands and device assignments described above. In the example, (nnnnnn) represents the correct CSR and (nnn) represents the correct vector for your LS handler. The LS handler is set to not process form-feeds. The SP handler is set to not issue a flagpage and to perform a form-feed after printing each file.

Note that all SET commands are issued before the LS handler is loaded. SRUN SPOOL.SAV/PAUSE SET LS CSR=nnnnnn SET LS VECTOR=nnn SET LS NOFORM0,ENDPAG=0 SET SP FLAG=0,ENDPAG=1 LOAD LS=SPOOL RESUME SPOOL ASS SP0 LP ASS SP0 LP0 ASS SP0 LS ASS SP0 LS0 Enable the command LOAD DU (remove the exclamation point (!)) if your system includes a DU device.

If you are unsure, examine the current status of your device handlers to determine if DU resides on your system device. (numbered) Go to the background and issue the SHOW command: ((CTRL/B)) (SHOW (RET)) See if the SHOW command displays the existence of DU. Return to editing STRT(x)M.COM: ((CTRL/X)) (Job?)(KEX (RET)) ((CTRL/W)) Enable the next command, LOAD LD (remove the exclamation point (!)). You will be using the LD handler in further exercises. As mentioned previously, a device handler must be installed before it can be loaded. Use the following procedure to determine if LD is installed: (numbered) Go to the background and issue the SHOW command: ((CTRL/B)) (SHOW (RET)) If the LD handler is listed in the SHOW command display, it is installed on your system. If the LD handler is not listed, copy the LD handler (LDX.SYS) to your system (SY) device and then issue the following command: (.)(INSTALL LD (RET)) Return to editing STRT(x)M.COM: ((CTRL/X)) (Job?)(KEX (RET)) ((CTRL/W)) Do not enable the following command lines: !INITIALIZE/NOQUERY VM: !ASS VM0 CF !ASS VM0 WF

Those commands apply to VM. You will learn about using the VM device in (int_VM_chap). Enable the next command, SETUP WHITE ON BLUE, only if you are using a Professional series computer with a color monitor. The following command line, SETUP VT100,JUMP,DARK,CLEAR, configures your terminal and clears the screen. Remove the exclamation point (!). See the (sug_book) for more information on SETUP commands. The next command, SHOW MEMORY, displays your system memory each time you boot. Remove the exclamation point (!). There are a number of other SHOW commands you can include. See the SHOW commands section of the (sug_book) for more information. Enable the command DATE (remove the exclamation point (!)), if you want to be reminded of the current date.

If your computer requires you to enter the date each time you turn it on, including this command will remind you to do so. The next command, SET TT NOQUIET, need only be turned on if you turned on the command, SET TT QUIET, at the beginning of your start-up command file. The last command, R MSCPCK, runs a program that checks the controller revision level for TMSCP (MU) magtape devices. It is assumed that if your hardware configuration includes a TMSCP magtape device, you have already received any report produced by that command. Disable this command by adding the exclamation point (!) before it. Close STRT(x)M.COM and abort KEX. ((PF1)(7)) (Command:)(Exit (Enter)) (*)((CTRL/C)) If your system has a printer, issue the following command to print your edited start-up command file: (.)(PRINT SY:STRT(x)M.COM (RET)) (Running Your Start-Up Command File\int_startup_run_sec)

You can now run your start-up command file by soft-booting your processor. Issue the command: (.)(BOOT SY: (RET))

Watch your terminal screen as your file executes the commands you turned on. Your file should run to conclusion. That is, the last command you enabled in your file should execute and RT--11 should then display the monitor prompt (.).

If your file does not run to conclusion, do the following: (numbered) On your printed copy of the edited file, mark the point where the file stopped running. If any error message was displayed where the file stopped, look up that error message in the (msg_book). Compare the portion of text of your printed copy where the file stopped with the appropriate portion of text in (startup_edit_sec). Keep any error message in mind as you compare the text. If the solution is not obvious to you, reread (startup_bef_sec). Keep any error message in mind as you read that section. Edit your start-up command file to correct the error you believe halted its running. Edit your printed copy of the file to reflect that change. Rerun your start-up command file by again soft-booting your processor: (.)(BOOT SY: (RET))

If your start-up command file previously ran to where it had started any foreground or system jobs, RT--11 displays the prompt: Foreground loaded; Are you sure?

For the purpose of debugging your start-up command file, you can respond by typing Y (YES) without being concerned about the meaning of that message. The general significance of that message is explained later in this section. Repeat this process, if necessary, until your start-up command file runs to completion.

Once your start-up command file runs to completion, you should consider the following information: (unnumbered) If you are using VM as your system device, you must copy the file you just edited to your default system device to preserve it. A start-up command file that runs to completion does not guarantee that your system is now configured as you desire. (The commands it executed can be syntactically correct but not perform the operations you expect or desire.) You should test your system to be sure it performs as you expect before you use your system for any critical application. RT--11 does not accept a command to run a program that is already running. Once you have edited your start-up command file to start at least one foreground or system job and then booted your processor, RT--11 is then running at least that program. Therefore, you cannot use the standard indirect command file start construction ($@STRT(x)M) to run STRT(x)M.COM unless you first abort all programs you started from STRT(x)M.COM. Typically, rather than abort programs, you soft-boot your processor.

If you are currently running any foreground or system jobs and issue the command to soft-boot your processor (BOOT SY:), RT--11 displays the following prompt: Foreground loaded; Are you sure?

That prompt informs you that at least one foreground or system job is currently loaded in your processor's memory. Soft-booting your processor could corrupt a file opened by a job or interrupt an operation being performed by a job. When you see that prompt, you should ask yourself: (unnumbered) What foreground or system jobs are currently loaded?

If you are unsure about what job or jobs are currently loaded and perhaps running on your system, type NO (N) and issue the following command to display those jobs: (.)(SHOW JOBS (RET))

You can disregard the job RESORC. That job is called by the SHOW JOBS command. Will interrupting the running of those jobs cause any problems?

At least you will want to close any file open on an editor before you soft-boot your processor. You should also consider the effect a memory rearrangement or interruption may have on any job currently loaded and perhaps running on your processor.

Soft-booting your processor can rearrange the contents of memory in your processor. That rearrangement can lose the contents of any file open on a job such as an editor. Soft-booting your processor can also interrupt the operations of a job that is maintaining communications, performing input/output operations, or monitoring a device. (Chapter Summary)

This chapter describes editing a start-up command file to configure your computer system when you boot. Important points to remember about using a start-up command file are: (unnumbered) Each monitor looks for a specific start-up command file. The FB monitor requires STRTFB.COM, the XM monitor requires STRTXM.COM, and the ZM monitor requires STRTZM.COM. The start-up command file must reside on the system (SY) device. The exclamation point (!) is the comment delimiter. You remove the exclamation point to enable a command and add one to the beginning of a command line to disable a command. Do not remove the exclamation point from comment (explanation text) lines. Although a start-up command file may run to completion (execute all commands), that does not necessarily mean that the system is configured as you expect. You should verify that the system is configured as expected before using the system. The start-up command file typically starts at least one job. RT--11 forbids running a job that is already running. Therefore, you generally must soft-boot your system to rerun the start-up command file, rather than rerunning it directly, using the $@STRTFB, $@STRTXM, or $@STRTZM command.