(edited 9-may-91) (Defining Your Own Commands\int_DEFCOM_CHAP)

RT--11 lets you define your own commands. You can define two basic categories of commands: (unnumbered) You can define new commands. You can change the definition of existing commands.

RT--11 provides a command processor that can be used for both categories. You use the distributed utility, UCL.SAV, to define new commands. To change the definition of existing commands, you use the utility, UCF.SAV, which you create from UCL.

This chapter describes: (unnumbered) The three methods you can use to define commands. How to define new commands with UCL. How to redefine existing commands with SYSGEN and UCL. How to redefine existing commands with UCF.

Defining new commands and changing the definition of (redefining) existing commands are different. It is a lot simpler to define new commands than it is to change the definition of existing commands. Also, because of the command processing order, changing the definition of existing commands imposes an increase in the time required to execute all commands. Therefore, if possible, you should define new commands to meet your needs rather than change existing command definitions.

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

This chapter describes three methods you can use to define commands: (numbered) Define new commands by using the UCL command processor.

UCL stands for (user command linkage), which you can think of as user commands (last). RT--11 checks that a command has valid UCL syntax only after checking first for DCL, CCL, and CSI valid syntax. Therefore, defining new commands as UCL commands imposes no overhead on processing other commands. Also, RT--11 distributes UCL.SAV; UCL is the simplest to implement and use. You should try to use this method first. Use one of the following two methods only if necessary. Remove support for an existing DCL command using the system generation (SYSGEN) procedure and then use UCL to define that command as a new command.

Once support is removed for a DCL command, that command can be treated as a new command and defined using UCL. This method only applies to redefining DCL commands and requires a SYSGEN. However, using this method imposes no overhead on command processing speed and is therefore preferable to the next method. Change the definition of an existing command by creating and implementing the UCF command processor.

The UCF command processor is a preprocessor that checks all commands you enter for valid user-defined syntax before checking for valid DCL, CCL, or UCL syntax. UCF is a utility that must be called into memory and run each time you enter any command. Therefore, creating and implementing UCF imposes noticeable overhead on command processing speed. You should create and implement UCF only if the first two methods cannot meet your requirements.

The remainder of this section describes in more detail what new and changed commands are and lists reasons why you might want to use UCL or UCF. (New Commands --- UCL)

You use UCL with commands you invent. That is, you cannot define a UCL command that conflicts with a command that is recognized by the RT--11 DCL or CCL command processors. For example, with any distributed RT--11 monitor, you cannot use UCL to define the command PRINT. PRINT is supported by the distributed DCL command processor. However, you can perform a SYSGEN and build a monitor without support for the PRINT command and then define PRINT as a UCL command.

You can invent commands that: (unnumbered) Perform some function that is specific to an application program. You can invent a command set that is "customized" for an application. Issue a string of commands. You can invent a command that then issues a defined sequential group of commands. Execute one or more indirect command files or IND control files. You can invent a command that executes a specified file.

Using the distributed UCL is described in (defcom_ucl_sec). Included in (defcom_ucl_sec) is a procedure to optimize the speed of the UCL command processor.

Using the SYSGEN procedure to remove support for a DCL command and then using UCL to define that DCL command as a new command is described in (defcom_syg_sec). (Changed Commands --- UCF)

You can change the meaning of a command. If you create and enable UCF, RT--11 checks all commands for valid UCF syntax before checking the other command processors for valid syntax. Therefore, you can change the meaning of a distributed command by including the command in UCF.

You can use the UCF facility to: (unnumbered) Process a standard keyboard command in a nonstandard manner. Process a standard keyboard command in a standard manner. Cause a standard keyboard command to be ignored by RT--11. Cause a nonstandard (invalid) keyboard command to be processed by RT--11 in the manner you want.

UCF command processing imposes overhead on other command processing because UCF is the first command processor. Any DCL, CCL, or UCL command you issue must first be checked for UCF syntax. Also, unlike the DCL and CCL command processors, the UCF command processor you create is not resident in the monitor and must be called by the monitor each time you issue a command. Thus, UCF imposes a further execution speed penalty on all non-UCF commands. Therefore, you should not create and enable UCF command processing unless a command you must define conflicts with other command processor syntax.

Creating and enabling UCF is described in (defcom_ucf_sec). Included in (defcom_ucf_sec) is a procedure to optimize the speed of UCF. You should optimize UCF to minimize the overhead that UCF imposes on other command processing. (Defining New Commands with UCL\defcom_ucl_sec)

You use the UCL command processor to define new commands. The two components to UCL are the utility UCL.SAV and the data file UCL.DAT. RT--11 distributes UCL.SAV and all distributed RT--11 monitors support UCL. The UCL data file, UCL.DAT, is created automatically by UCL.SAV as a result of defining the first UCL command.

The file UCL.SAV must reside on your system (SY) device. Issue the following command to determine if UCL resides on SY: (.)(DIR SY:UCL.SAV (RET))

If the file UCL.SAV does not reside on your system device, you must add it with the COPY command. (UCL Command Syntax\defcom_ucl_syn_sec)

Once you have made sure the file UCL.SAV resides on your system device, you can create UCL commands. The first UCL command you create in turn creates the UCL data file. Use the following syntax to create UCL commands: newcommand:==command[/options[command/options...]]

where: (3\3\14) (\newcommand\Represents the UCL command you are defining. The UCL command can include up to 16 letters and numbers. Newcommand cannot contain the slash character (/); you cannot include command options in newcommand.

You can define an abbreviation for newcommand by including an asterisk character (*). For example, the following UCL command line defines the newcommand STATUS and specifies the shortest valid abbreviation for that command as STAT: .STAT*US:==SHOW ALLSHOW QUEUE ) (\:==\Is the command definition separator, which separates the UCL command from those commands that define the UCL command.) (\command\Represents the UCL command definition. You can define a UCL command as: (unnumbered) One or more valid RT--11 commands (including valid options and option parameters) One or more previously defined UCL commands A modified IND or indirect command file calling syntax. After entering the UCL command to call the modified IND or indirect command file, you must then edit the UCL data file to change the command line modification. See (defcom_ind_sec) for information on using UCL to call IND or indirect command files. ) (\\Is the command separator you use if you include more than one command as the definition of the UCL command.) (\\Is the terminator you use if you define the UCL command as a string of more than one command.)

You can include up to 128 characters in each UCL command definition. (Adding Information from the Command Line)

Some information that you include in a command, such as a file specification, can change with each command. You plan for this kind of information change by including the UCL append symbol (^) in command definitions. The append symbol (^) lets you show UCL where to add information you supply in the command line.

For example, the following UCL command definition creates a command, KILL, that unprotects and deletes without confirmation the file specification you supply for the two append symbols: .KIL*L:==UNPRO ^\DEL/NOQ ^\\(RET)

When you then issue the KILL command, any text following that command is inserted in place of the append symbols when UCL processes the command. For example, the following UCL command would unprotect and then delete, without confirmation, all files on diskette DU2: .KIL DU2:*.* (RET) (Displaying Command Definitions)

The SHOW COMMANDS command displays UCL command definitions. The default output device for the SHOW COMMANDS display is your terminal. The following example shows a sample list of UCL commands: .SHOW COMMANDS (RET) ! User Command Linkage (UCL) vm :== $@vm\boot vm:\\ vmprg :== $@vmprg\boot vm:\\ vmgen :== $@vmgen\boot vm:\\ vmmin :== $@vmmin\boot vm:\\ stat*us :== show all\show queue\\ kil*l :== unpro ^\del/noq ^\\

You can also send the display to a file you specify, using the /OUTPUT:filespec option, or to your printer, using the /PRINTER option. (Redefining and Deleting UCL Commands)

You redefine an existing UCL command by issuing a new command definition. After UCL processes and stores the new command definition, RT--11 returns the monitor prompt (.). You can then issue SHOW COMMANDS to verify the command redefinition.

You delete an existing UCL command by issuing a null definition, which consists of only the existing UCL command and command definition separator with no definition. For example, assume the existence of the following UCL command: kil*l :== unpro ^\del/noq ^\\

You could remove the UCL command, KILL, by issuing the following command: (.)(KILL:== (RET))

You use the SHOW COMMANDS command display to verify the removal of a UCL command. (Using UCL Commands to Run IND or Indirect Command Files\defcom_ind_sec)

You cannot directly define a UCL command that runs one or more IND or indirect command files. For example, the following UCL command line fails to run the XM monitor start-up command file, STRTXM.COM, because the keyboard command processor (KMON) attempts to parse the $@ construction: BEG*IN:==$@STRTXM

To run an indirect file from a UCL command, you must use a modified UCL command syntax and then edit the UCL data file. Rather than use the $@ construction, use the $$ construction: BEG*IN:==$$STRTXM

Then, edit the UCL data file to change the second dollar sign ($) to the correct at sign (@).

Use the following practice exercise to go through the complete procedure: (numbered) Create an indirect command file named TEST1.COM: (.)(EDIT TEST1.COM (RET)) (?KEX-W-File not found - Create it (Y,N)?)( Y (RET)) Enter the following command lines in TEST1.COM : SHOW MEMORY (RET) SHOW JOBS (RET) SHOW CONFIG (RET) Close TEST1.COM with the EXIT command. Enter the following UCL command line: (.)(MULE:==$$TEST1 (RET)) Edit the UCL data file to change the $$TEST1 construction to $@TEST1: (alphabetic) Open the UCL data file for editing: (.)(EDIT SY:UCL.DAT (RET)) Press the following key sequence to search for $$, replace the second $ with the correct @, and exit from the editor: ((PF1) (PF3)) (Model:)($$ (4) (3) (,) @) ((PF1) (7))(Command:)( EXIT (Enter)) (.) You have now edited the UCL data file so that the command MULE runs the indirect command file TEST1.COM: (.)(MULE (RET))

Assuming the utility RESORC.SAV resides on your system (SY) device, the command MULE runs TEST1.COM.

You can run an IND control file from a UCL command. The KMON SET conditional IND (SET KMON IND) must be in effect before that UCL command is parsed, but that conditional can be set from within UCL too. Instead of the $$ prefix before the IND control file, use the $ prefix in the UCL command definition, and then, edit the UCL data file to change the $ prefix to @. For example, the following example command sets the KMON conditional to IND and then runs (after UCL.DAT is edited) the IND control file WOOPS.COM: .MUNGA:==SET KMON IND\$WOOPS\\ (RET)

You can run a string of indirect files with a single UCL command. Separate each indirect file by using the command separator (): .WOOGA:==$$LOOPS\$$SPOOL\\ (RET)

Then, edit the UCL data file to change the second dollar sign ($) prefix at each indirect command file to an at sign (@).

You can run indirect command files and an IND control file from the same UCL command so long as the IND control file is the last file specified in the UCL command definition. (Changing the Size and the Name of the UCL Data File\defcom_ucl_siz_sec)

As distributed, the UCL data file created by the UCL utility can contain up to 31(10) commands. The maximum number of UCL commands can be increased or decreased to a value you specify. You can also change the name of the UCL data file and the default device on which the file resides.

See the (ins_book) for information on changing the size and name of the UCL data file. (Optimizing UCL\defcom_ucl_opt_sec)

You can increase the speed with which UCL processes commands by combining the save image (.SAV) program and the data (.DAT) file. If you intend to increase or decrease the size of the UCL data file, you should do that before you optimize UCL.

Preserve the distributed UCL file: (.)(COPY SY:UCL.SAV UCL.DIS (RET))

To optimize UCL, issue the following command: (.)(UNPROTECT SY:UCL.SAV (RET)) (.)(COPY SY:UCL.(SAV+DAT) SY:UCL.SAV (RET))

If you determine you must change the size of the UCL data file after you have optimized UCL, perform the following procedure: (numbered) Create a file of the contents of the UCL data file by issuing the following command. In the command, (filespec) represents the name of the file, and must be of type .COM: (.)(SHOW COMMANDS/OUTPUT:filespec (RET))

Verify that the file created by that command contains the information you expect by displaying its contents on your terminal screen: (.)(TYPE filespec (RET)) Delete the optimized UCL.SAV file. Copy the UCL.DIS file from your default data (DK) device (or UCL.SAV from your software distribution kit) to your working system (SY) volume. Perform the customization patch described in (defcom_ucl_siz_sec) to change the size of the UCL data file that you create in the next step. Issue the following command that runs the file you created in Step 1 as an indirect command file. This command creates a new UCL data file and enters the commands in that file you previously defined: (.)($@filespec (RET)) Optimize the UCL save image program you previously copied from your software distribution kit: (.)(UNPROTECT SY:UCL.SAV (RET)) (.)(COPY SY:UCL.(SAV+DAT) SY:UCL.SAV (RET)) Issue SHOW COMMANDS to verify that the new optimized UCL utility contains the commands you expect. (Redefining DCL Commands with SYSGEN and UCL\defcom_syg_sec)

If your software configuration (system and/or application software) requires RT--11 to execute a DCL command in a nonstandard manner, you can remove support for the DCL command by using the system generation (SYSGEN) procedure. You can then define the command as a new command by using the UCL command processor. You do not need to create and enable UCF command processing. This method can be preferable to using UCF if you need to change only the way a few DCL commands execute. Also, this method applies only to DCL commands; you cannot change the way CCL commands execute.

Redefining DCL commands, using this method, involves the following steps: (numbered) Examine the list of individual keyboard monitor (DCL) command SYSGEN conditionals in the (syg_book). Edit the answer (.ANS) file for your RT--11 monitor. Perform a system generation using the edited answer file. Exchange monitors. Define as UCL commands the command or commands for which you removed support.

The following sections describe those steps in detail. The EXECUTE DCL command is used to illustrate the process of removing support for a DCL command and then defining it as a UCL command. (SYSGEN Command Conditionals)

The (syg_book) contains a listing of the individual keyboard monitor command (DCL) conditionals. DCL commands for RT--11 are divided into three subsets, as shown in the list. To remove support for individual DCL commands, you set each individual command conditional to zero.

For example, the EXECUTE command is located in the LANGUAGE subset of DCL commands. As distributed, RT--11 monitors support the entire LANGUAGE subset of commands (L$ANG=1). Therefore, individual command conditionals are not specified. The conditional for the individual command EXECUTE is EXEC$$=n. To remove monitor support for only EXECUTE, you set the EXECUTE command conditional to zero (L$ANG=1 and EXEC$$=0). That combination of conditionals causes monitor support for all LANGUAGE subset commands except EXECUTE. (Edit the SYSGEN Answer (.ANS) File for Your Monitor)

An answer file is included in the RT--11 software distribution kit for each distributed RT--11 monitor. Each answer file can be used to build a corresponding distributed monitor. If your monitor is not a distributed monitor, if it was built using the SYSGEN procedure, that procedure can create an answer file. In other words, each answer file is produced by building a monitor and each can be used to reproduce that monitor.

To remove support for one or more DCL commands, you edit the answer file for the monitor you are using to change only command support. Use the following procedure: (numbered) Determine which answer file built your monitor. If you are using a distributed unmapped monitor, that file is SbFB.ANS. If you are using a distributed mapped monitor, that file is can be XB.ANS, XM.ANS, ZB.ANS, or ZM.ANS. If you are using a monitor built by SYSGEN, that file will be of type .ANS and have a name assigned it during the SYSGEN procedure. Preserve a copy of the answer file for your monitor by copying it to a file of the same name with file type .DIS. Remove the file protection from the answer (.ANS) file and open that file for editing. Do a search in the answer file for the appropriate language subset conditional. In the distributed answer files, all language subset conditionals are set to 1; all DCL commands are supported. Also, in distributed answer files, no individual DCL command conditionals are listed because all DCL commands are supported. For this example, because we are removing support for the EXECUTE command, the appropriate language subset conditional is L$ANG=1. Edit the answer file to place EXEC$$=0 after L$ANG=1: L$ANG=1 EXEC$$=0 Close the answer file. (Build a New Monitor)

Do a SYSGEN and specify the answer file you just edited to build a new monitor. For the purpose of this procedure, the symbol (monitr) represents the monitor name, and (monitr).ANS represents the answer file. Do the following: (numbered) Close any files you have open and stop and unload any jobs you have running. The SYSGEN procedure requires most of your computer's memory. Turn to the beginning of the SYSGEN dialog, Studying the Sysgen Dialog, in Chapter 1 of the (syg_book). Issue the following command to start the SYSGEN procedure: (.)(RUN IND.SAV SYSGEN.COM (RET))

The SYSGEN procedure starts and displays prompts on your terminal screen. Respond to the prompts in the following manner: (Do you want an introduction to system generation? (N)?)( N (RET)) (Do you want to use a previously created answer file? (N)?)( Y (RET)) (What answer file do you want to use (SYSGEN.ANS)?)( monitr.ANS (RET)) (Do you want to create an answer file (N)?)( N (RET))

SYSGEN then checks for the presence of various protected files. Refer now to the last part of the SYSGEN dialog in Chapter 1 of (syg_book), DEVICE ASSIGNMENTS AND SYSGEN CLEANUP.

SYSGEN requests the names of the input and output devices. SYSGEN then displays the file names it has created and the commands you use to build a monitor, supported devices, or both. Finally, SYSGEN exits and you receive the monitor prompt. You are only interested in building a monitor. Therefore, issue the command to run the indirect command file of type .MON: (.)($@monitr.MON (RET))

The indirect command file runs and displays command lines on your terminal screen. The result is a monitor of the appropriate name with the file type .SYG or (monitr).SYG. (Exchange Monitors)

Replace the monitor you are currently running with the monitor you have just built: (numbered) Preserve your current monitor by copying it to a file of the same name with file type .DIS: (.)(COPY SY:monitr.SYS DK:monitr.DIS (RET)) Use the RENAME command and /NOREPLACE option to change the monitor you just built from file type .SYG to .SYS: (.)(RENAME/NOREPLACE SY:monitr.SYG SY:NEWMON.SYS (RET)) Boot your new monitor: (.)(BOOT SY:NEWMON.SYS (RET)) The monitor you are now running (NEWMON.SYS) does not support the EXECUTE command. Therefore, you can define EXECUTE as a UCL command. If NEWMON.SYS functions correctly, use the following command to make it the default bootable monitor for the device: (.)(COPY/BOOT SY:NEWMON.SYS SY: (RET)) (Define the UCL Command)

If you are already using the UCL command processor, you can add the EXECUTE command to the UCL data file. If you are not using the UCL command processor: (numbered) Make sure UCL.SAV resides on your system device: (.)(DIR SY:UCL.SAV (RET))

If UCL.SAV does not reside on your system device, copy it to there. Issue the command: (.)(EXECUTE:==how_you_want_EXECUTE_to_now_work) (Changing Commands --- Creating and Implementing UCF\defcom_ucf_sec)

You should read (defcom_ucl_sec) before you decide to create and implement a UCF facility. Because you create UCF from the distributed UCL, they appear functionally similar. However, you should note the following two major differences: (unnumbered) Unlike the UCL command processor, UCF imposes a noticeable increase in the processing time for other command processors. Therefore, unless you need to, you should not create and implement UCF.

If you want to use UCF to change only the definition of one or more DCL commands, you should read (defcom_syg_sec) before creating UCF. You may be able to use UCL, and, if possible, you should. The following DCL commands do not function when UCF is enabled: (simple) B CLOSE D E GET REENTER SAVE START

Also, to use UCF to define the Single-Line Command Editor's RECALL command, you must first SET SL NORECALL.

If you decide that you need UCF command processing, use the following procedure to create and implement UCF. You should proceed through the following sections in order. (Prepare UCL Before Creating UCF)

You create the UCF.SAV utility by using the distributed UCL utility, UCL.SAV. You also create the UCF data file from a data file you create by using the distributed UCL. Therefore, the procedure you use to create the UCF utility and data file is determined by what, if anything, you have previously done with UCL. (If You Have Not Previously Used UCL)

Issue the following command to determine if the file UCL.SAV is on your system (SY) device: (.)(DIR SY:UCL.SAV (RET))

If that command displays the file UCL.SAV on your system device, preserve a copy of the distributed UCL by using the following command, and then proceed to (defcom_ucfucl_sec). (.)(COPY SY:UCL.SAV UCL.DIS (RET))

If that command does not display UCL.SAV on your system device, copy it to there by using the following command. In the command, the symbol (ddn) represents the device on which UCL.SAV resides: (.)(COPY ddn:UCL.SAV SY:UCL.SAV (RET))

Preserve a copy of the distributed UCL by using the following command and then proceed to (defcom_ucfucl_sec). (.)(COPY SY:UCL.SAV UCL.DIS (RET)) (If You Have Previously Used But Not Optimized UCL)

You must rename (but preserve) the UCL data file, UCL.DAT. If you have been using UCL, the UCL utility and data file reside on your system (SY) device. Issue the following command to rename the UCL data file: (.)(RENAME SY:UCL.DAT SY:UCLDAT.DIS (RET))

Issue the following command to verify that the files UCL.SAV and UCLDAT.DIS reside on your system (SY) device: (.)(DIR SY:UCL*.* (RET))

Preserve the distributed UCL, using the following command, and then proceed to (defcom_ucfucl_sec). (.)(RENAME SY:UCL.SAV SY:UCL.DIS (RET)) (If You Have Used and Optimized UCL)

You create the UCF utility from the distributed UCL utility, UCL.SAV. If you previously enabled and optimized UCL by issuing the following command, the UCL.SAV file on your system (SY) device is no longer as distributed: COPY SY:UCL.(SAV+DAT) UCL.SAV

Use the information under the first following subheading if you followed the instructions in (defcom_ucl_opt_sec), and preserved the distributed UCL.SAV file as UCL.DIS before optimizing UCL. Use the information under the second following subheading if you did not preserve the distributed UCL.SAV as UCL.DIS. (If You Preserved the Distributed UCL.SAV)

Rename (but preserve) the UCL file, UCL.SAV. If you have been using UCL, UCL.SAV resides on your system (SY) device. Then, copy the file UCL.DIS from the device on which it resides ((ddn)) to your system device: (.)(RENAME SY:UCL.SAV SY:UCLSAV.DIS (RET)) (.)(COPY ddn:UCL.DIS SY:UCL.SAV (RET))

You should also perform a directory operation on both your system (SY) and default data (DK) device to determine if the file UCL.DAT exists on your system. If it does, issue the following command, where (ddn) represents that device on which UCL.DAT resides, to rename (but preserve) that file: (.)(RENAME ddn:UCL.DAT ddn:UCLDAT.DIS (RET))

You should now have the distributed file UCL.SAV on your system (SY) device, and any previous UCL data file should be renamed to type .DIS. (If You Did Not Preserve the Distributed UCL.SAV)

Rename (but preserve) the UCL file, UCL.SAV. If you have been using UCL, UCL.SAV resides on your system (SY) device. Then, copy the distributed file UCL.SAV from your RT--11 software distribution kit (on device (ddn)) to your system device: (.)(RENAME SY:UCL.SAV SY:UCLSAV.DIS (RET)) (.)(COPY ddn:UCL.SAV SY:UCL.SAV (RET))

You should also perform a directory operation on both your system (SY) and default data (DK) device to determine if the file UCL.DAT exists on your system. If it does, issue the following command where (ddn) represents that device on which UCL.DAT resides, to rename (but preserve) that file: (.)(RENAME ddn:UCL.DAT ddn:UCLDAT.DIS (RET))

You should now have the distributed file UCL.SAV on your system (SY) device, and any previous UCL data file should be renamed to type .DIS. (Create the Data File for UCF\ucf_data_sec)

Create a data file for UCF on your system device before proceding further. Create the data file by defining at least one command, such as: (.)(FOO:==DIR DK: (RET))

You will remove support for that command further in the procedure. (Create UCF.SAV from UCL.SAV\defcom_ucfucl_sec)

Issue the following command to create the file UCF.SAV from UCL.SAV: (.)(RENAME SY:UCL.SAV SY:UCF.SAV) (Enable UCF Command Processing)

You must enable UCF command processing before you enter UCF commands and command definitions in the UCF data file. The only reason to enable UCF command processing is to change the definition of commands supported by distributed command processors. Therefore, if you attempt to redefine supported commands for the UCF data file before enabling UCF command processing, the distributed command processors parse those commands and return errors.

Use the SET CLI command, described in the (SUG_BOOK) to enable UCF. Include that command in your start-up command file near the end of the file. Place it near the end so that if, for some reason, you do not want to turn on UCF processing, you can stop the execution of the commnd file before reaching the SET CLI command by pressing CTRL/C twice. Use the customization patch in Section 2.7.63 of the (ins_book) to enable UCF. Be very careful to use the value 177417 for the symbol (nnnnnn) in the customization. If the monitor you are customizing is protected, you must unprotect the monitor, using the UNPROTECT command, before performing the customization. (How Many Commands to Support?\ucl_siz_sec)

You are going to store the UCF commands in a new UCL data file and then optimize UCF by combining the UCF utility with the UCL data file. You cannot easily change the size of the data file once you have combined it with the UCF utility. Therefore, you should first determine how many commands UCF supports. Make a list of the commands you require. By default, you can include up to 31(10) UCF commands in the data file. If the number of commands you need is significantly more or less than 31, you should customize the data file for the size you need.

In the customization, replace the symbol ..CMDS with the value for that symbol located at Section 2.6.57 in the file CUSTOM.TXT. Replace the value (nnnnn) with the octal number of commands you will include in the UCF data file. (You may want to add support for a few more commands than you now expect to include.) (.)(RUN SIPP (RET)) (*)(SY:UCF.SAV/A (RET)) (Base?)( 0 (RET)) (Offset?)( ..CMDS (RET)) ( ) (Base Offset Old New?) ( 000000 ..CMDS 37)( nnnnn (RET)) ( 000000 ..CMDS+2 ???????)( (CTRL/Y) (RET)) (*)((CTRL/C)) (.) (Boot Your System Device)

Once you have enabled UCF command processing and created the files UCF.SAV and UCL.DAT on your system device, boot your system device to load into memory the RT--11 monitor you have modified to support UCF. Close any files you have open and issue the following command: (.)(BOOT SY: (RET))

Your system boots and your RT--11 monitor now first checks all commands for valid UCF command syntax. (Define the UCF Commands in the Data File)

First, delete the UCF command you defined in (ucf_data_sec): (.)(FOO:== (RET))

Then, using the rules described in (defcom_ucl_syn_sec), enter the UCF commands and command definitions. You can use the list of UCL commands as syntax examples. You use the following commands to display commands and definitions after you enter them: (.)(UCF (RET)) (*)(TT:= (RET))

The header displayed by those commands reads User Command Linkage (UCL), although this is the UCF data file. You use a UCL data file as the UCF data file, which is not a problem because you will combine the UCF utility with this data file in the next section.

You do, however, want any error messages generated by the UCF facility to display the UCF name (?UCF-) rather than the default UCL name. Therefore, after you have entered the UCF commands and definitions into the data file, you should perform the following customization to change the name displayed by UCF data file error messages.

In the customization, replace the symbol ..ERR with the value for that symbol located at Section 2.6.55 in the file CUSTOM.TXT. (.)(RUN SIPP (RET)) (*)(SY:UCF.SAV/A (RET)) (Base?)( 0 (RET)) (Offset?)( ..ERR (RET)) ( ) (Base Offset Old New?) ( 000000 ..ERR ??????)( ;A (RET)) ( 000000 ..ERR )( (RET)) ( 000000 ..ERR+1 ())( (RET)) ( 000000 ..ERR+2 (<)C>)( (RET)) ( 000000 ..ERR+3 (<)L>)( ;AF (RET)) ( 000000 ..ERR+4 (<)->)( (CTRL/Y) (RET)) (*)((CTRL/C)) (.) (Optimize the UCF Command Processor)

Once you have created the UCF data file, you should optimize the UCF command processor by combining the UCF utility with the UCF data file. Issue the following command to optimize UCF: (.)(COPY SY:(UCF.SAV+UCL.DAT) SY:UCF.SAV (RET)) (.)(DELETE SY:UCL.DAT (RET)) (Restore the UCL Command Processor)

The monitor can support both UCL and UCF command processors. You can, if you wish, restore the UCL command processor and use UCL with UCF. The procedure to create UCF required that you rename UCL. How you restore UCL is determined by how you used UCL before creating UCF: (unnumbered) If you have not previously used UCL, you can restore UCL by issuing the following command and then read (defcom_ucl_sec) for information on using UCL. In the command, (ddn) represents the device on which UCL.DIS resides. (.)(RENAME ddn:UCL.DIS SY:UCL.SAV (RET)) If you had previously used UCL by not optimized it, you restore UCL by issuing the following command: (.)(RENAME SY:UCL.DIS SY:UCL.SAV (RET)) (.)(RENAME SY:UCLDAT.DIS SY:UCL.DAT (RET)) If you had previously used and optimized UCL, you restore UCL by issuing the following command: (.)(RENAME SY:UCLSAV.DIS SY:UCL.SAV (RET)) (Optimize Your Configuration for UCF)

Because you have created and enabled a UCF command processor, the RT--11 monitor must now read the file UCF.SAV from your system (SY) device each time you enter a command. Therefore, the faster the monitor can read files from the system device, the faster commands get processed.

The fastest system device available is the virtual memory VM device. Because you are using a UCF command processor, you notice an obvious increase in command processing speed if you configure a VM device. See (int_vm_chap) for information on configuring a VM device for your computer.

Whatever type of system device you use, the UCF command processor should reside on that device near the directory (near the beginning of the device). (Changing the Size of the UCF Data File)

You can use the following procedure to change the size of the UCF data file if you determine you need more UCF commands. The procedure lets you use some UCL functionality to make changing the size of the UCF data file easier. (numbered) If you are using UCL, use the RENAME command to preserve UCL files as type .DIS files of the same name. Use the RENAME command to change UCF to UCL as follows: (.)(RENAME SY:UCF.SAV SY:UCL.SAV (RET)) Your UCF command processor is now named UCL. Therefore, you can take advantage of UCL functionality that lets you write commands and definitions to a file. Using this functionality means you do not need to retype all your UCF commands into the new data file. Issue the following command to create the file of commands: (.)(SHOW COMMANDS/OUTPUT:UCF.COM (RET))

That command creates an indirect command file, UCF.COM, that contains all the commands and command definitions residing in UCF data file. Unprotect, if protected, and delete the file UCL.SAV that resides on your system device, as follows: (.)(UNPROTECT SY:UCL.SAV (RET)) (.)(DELETE SY:UCL.SAV (RET)) From your RT--11 software distribution kit, copy the distributed file UCL.SAV to your system device. If one of the UCL files you renamed to type .DIS as part of Step 1 is the distributed UCL.SAV, you can copy that UCL.DIS to UCL.SAV. Use the RENAME command to change the distributed UCL.SAV on your system device to UCF.SAV, as follows: (.)(RENAME SY:UCL.SAV SY:UCF.SAV (RET)) Perform the customization patch described in (ucl_siz_sec) to change the size of the UCF data file to the value you want. Issue the following command to run the indirect command file you created in Step 3: (.)($@UCF (RET))

That command creates a new UCF data file (UCL.DAT) which contains the commands and definitions from your previous UCF data file. Define the other UCF commands you want to add to your UCF command processor. Optimize the UCF command processor by combining the UCF utility with the UCF data file, as follows: (.)(COPY SY:(UCF.SAV+UCL.DAT) SY:UCF.SAV (RET)) (.)(DELETE SY:UCL.DAT (RET)) If you are using UCL, restore it by renaming the type .DIS file or files you created in Step 1 to their correct file type.