(edited 19-Jun) (RT--11 Operating System Procedures\rt_ax)

(RT--11 operating system procedures) (Operating system procedures, RT--11) (System procedures, RT--11) (Procedures, RT--11 operating system) (SystemSee RT--11) (iasrsx) (SystemSee IAS, RSX--11 or RT--11) This appendix describes procedures that are specific to the RT--11 operating system and features that are only available with RT--11. You should also read at least the first three chapters of the (int_book) to learn about RT--11 before using KED.

RT--11 distributes two versions of the keypad editor, KED and KEX. KED and KEX are essentially the same and all references in this manual to KED apply also to KEX unless indicated otherwise.

KED is the default editor for the SJ and FB monitors, and is run under those monitors when you issue the EDIT command. Also, you can run KED directly as the background or the foreground job, as described in this appendix.

KEX is the default editor for the XM monitor and can run only under that monitor. KEX is a virtual KED program. Its functions and commands are the same and provide the same operations as the KED functions and commands. Under the XM monitor, KEX is run when you issue the EDIT command. Also, you can run KEX directly as the background, the foreground, or as a system job, as described in this appendix. RT--11 supports KED as described in this manual's chapters. All commands, features, and functions are supported as described. (Installing KED)

The PDP--11 keypad editor is installed on your system when you install RT--11.

KED requires the file KED.SAV, which is installed on your system device as part of the RT--11 automatic installation procedure.

If you are running the XM monitor, RT--11 automatically uses KEX, the virtual version of KED. KEX requires the file KEX.SAV, which is also installed on your system device as part of the RT--11 automatic installation procedure.

If you installed RT--11 manually, be sure the appropriate version of KED (KED or KEX) resides on your system (SY) device. (System Requirements\sysreq_sec)

KED is supported on only VT100 series compatible terminals (VT100 series, VT200 series, and VT300 series). You cannot use KED with a hardcopy terminal or a terminal that is not compatible with the VT100 series, but you can use EDIT.SAV, the nonkeypad (line) editor described in the (sug_book).

KED works as documented under all distributed RT--11 monitors.

If you have performed a system generation procedure (SYSGEN) and built support for a multiterminal monitor and you are running KED on a terminal other than 0, issue the following commands or include them in your startup command file: (.)(SET TT CONSOL=n (RET)) (.)(SET TT NOCRLF (RET))

where (n) is the logical unit number of your terminal. (Running KED)

You can run KED in three ways: (numbered) By using the DCL command EDIT, as described in the chapters of this manual By using the CCL commands KED or KEX

Although supported, CCL command syntax is not particularly useful when running KED, and is not specifically described in this manual. DCL command syntax is recommended instead of CCL. By using the CSI commands R, RUN, FRUN, or SRUN, and specifying the KED or KEX utility

CSI command syntax is only required if you are running KED or KEX as the foreground (FRUN) or as a system (SRUN) job. Running KEX as a system job is described, with examples, in the (int_book). CSI command syntax for KED is described in this appendix. Using CSI command syntax in general is described in the (sum_book).

The principal differences between running KED from the DCL, CCL, or CSI command syntax are: (unnumbered) The simplicity (or complexity) of the command syntax. In general, DCL is the simplest command syntax, and is therefore recommended. DCL syntax (the EDIT command) is used throughout this manual, except (ked_csi_sec) in this appendix. The only time you cannot use DCL syntax is when you run KED/KEX as the foreground or as a system job; then, you must use CSI syntax as described in (ked_csi_sec). How options are specified. Options for the KED DCL command syntax are as described in the chapters. Options for CCL and CSI command syntax are described in (ked_csi_sec). How you return to the RT--11 prompt and whether special settings you made are preserved when you end your work session.

If you use the KED DCL or CCL command syntax, KED returns you to the RT--11 prompt when you end your work session. Any special settings you made and anything you stored in KED's buffers are lost.

If you use the KED CSI command syntax, KED returns you to the CSI level and displays the KED utility prompt ((*)). Unless you use a journal file as described in (rtjou_sec), any special settings you made and anything you stored in KED's buffers are preserved across work sessions until you abort the utility. (Command Default Values\com_default_sec) (2\13) (Item\Default) (Text editor\KED for the SJ and FB monitors or KEX for the XM monitor.) (KED volume\For the EDIT, KED, KEX, R, FRUN, and SRUN commands, the system volume, SY. For the RUN command, the default storage volume, DK.) (first) (Editing process\Unless you specify a different volume, KED backs up the file you specify on the same volume that contains your input file.) (Input volume\The default storage volume, DK) (Input file name\The default is the output file name.) (Input file type\The default is the output file type.) (last) (Output volume\The default storage volume, DK) (Output file name\The default is the input file name, if the input file name is specified.) (Output file type\MAC when editing a file or LST when inspecting a file. A customization patch in the (ins_book) lets you change those defaults.) (Maximum output file size\Depends on the number of contiguous free blocks on your output volume. KED allocates the larger of the following sizes. (simple) One-half of the largest number of contiguous free blocks All of the second largest number of contiguous free blocks ) (Using the R, RUN, FRUN, and SRUN Commands\ked_CSI_sec)

You can begin any work session with an R, RUN, FRUN, or SRUN command. Observe the following rules: (unnumbered) If KED.SAV or KEX.SAV is on your default storage volume (DK), you do not have to specify a device for the RUN command. For example, with KED.SAV on DK, the following commands are equivalent: .RUN KED (RET) .RUN DK:KED (RET)

If KED.SAV or KEX.SAV is on your system volume, you do not have to specify a device for the R, FRUN, or SRUN command. For example, with KED.SAV on SY, the following commands are equivalent. .R KED (RET) .R SY:KED (RET)

If KED.SAV or KEX.SAV is on another volume, you have to include the device specification for that volume. The following examples show two device specifications. .RUN DL0:KED (RET) .RUN DU0:KED (RET) You must specify the file type (.SAV) when you run KED or KEX with the FRUN or SRUN command, as follows: .FRUN KED.SAV (RET) .SRUN KEX.SAV (RET) .SRUN DU0:KEX.SAV (RET) (The CSI File Specification String)

After you enter an R, RUN, FRUN, or SRUN command, KED displays its utility prompt ((*)) and waits for a CSI file specification string. For example: .FRUN KED.SAV (RET) *

See the (sum_book) for a description of the command string interpreter.

DK is the default device for all CSI file specifications. The (INT_BOOK) and (sug_book) include details on permanent device names and ways you can assign the logical name DK to different physical devices. (Beginning Your Work Session\csistring_sec)

A complete CSI file specification string for beginning a work session has the general format: output-filespec[/option]=input-filespec[/option]

(2\16) (output-filespec\should be a standard file specification in the form ([dev:]filnam.typ). You must use it when: (unnumbered) Creating new files (no existing input file) Editing files and using new output file names ) (input-filespec\should also be a standard file specification in the form ([dev:]filnam.typ). You must use it when: (numbered) Editing files with automatic backup Inspecting existing files Editing files and using new output file names ) (/option\For (output-filespec), (/option) can be /A:size or /C.

For (input-filespec), (/option) can be /A:size, /I, /N, or /Y. (unnumbered) Use /A:size to specify the size of your output file, as described in (autobackup_sec) and (rtnewname_sec) Use /C to create a new file, as described in (rtcreatenew_sec) Use /I to inspect an existing file, as described in (rtinspect_sec) Use /N to prevent initialization file execution, as described in (csiinitial_sec) Use /Y to suppress KED queries, as described in (csiinitial_sec) ) (Editing Files with Automatic Backup\autobackup_sec)

The CSI file specification string for editing files with automatic backup can be of two forms: output-filespec[/A:size]=input-filespec

or input-filespec[/A:size]

where (size) is the number of blocks to be allocated for the file. The maximum is 32767.

In the first form, the specifications for the output file and input file must be the same if you want automatic backup. For example, at the end of an editing session that you begin with the following commands, KED stores the previous version of EXAMP.FOR under the name EXAMP.BAK and the new version of the file under the name EXAMP.FOR. (.)(FRUN KED.SAV (RET)) (*)(DU1:EXAMP.FOR=DU1:EXAMP.FOR (RET))

Typing only the specification for the input file that you want to edit is the shortest way to specify automatic backup. The following example has the same effect as the preceding example. (.)(FRUN KED.SAV (RET)) (*)(DU1:EXAMP.FOR (RET)) (Creating New Files\rtcreatenew_sec)

The CSI file specification string for creating a new file has the form: output-filespec/C

If another file with the same specification exists, KED responds with a warning message. At that time, you can cancel your work session or you can continue the session, deleting the existing file, and creating a new file with the old name.

The following example creates a new file, EXAMP.BAS, on default device DK. (.)(FRUN KED.SAV (RET)) (*)(EXAMP.BAS/C (RET))

KED shows an empty screen with the cursor at the upper left corner.

The next example creates a new file, ARLO.FOR, on diskette drive DX0. KED warns that another file with the same name exists. It is preserved because you respond N (for no) to the warning. (.)(FRUN KED.SAV (RET)) (*)(DX0:ARLO.FOR/C (RET)) (?KED-W-Output file exists - Continue (Y,N)? )(N (RET)) (*)

If you had responded Y (for yes), the existing version of ARLO.FOR would have been deleted and KED would have shown an empty screen with the cursor at the upper left corner. (Inspecting Existing Files\rtinspect_sec)

The CSI file specification string for inspecting an existing file has the form: input-filespec/I

The following example begins the inspection of a file, RPT296.TXT, on default device DK. (.)(FRUN KED.SAV (RET)) (*)(RPT296.TXT/I (RET))

KED displays the top 24 screen lines of DK:RPT296.TXT. (Editing Files and Using New Output File Names\rtnewname_sec)

The CSI file specification string for editing files and using new output file names has the form: output-filespec[/A:size]=input-filespec

where (size) is the number of blocks to be allocated for the output file. The maximum is 32767.

The specifications for the output file and input file must be different if you want KED to store the edited version of the file under a new name.

For example, at the end of a work session that you begin with the following commands, KED stores the edited version of TEMP.DAT under the name EXPT44.DAT. (.)(FRUN KED.SAV (RET)) (*)(EXPT44.DAT=TEMP.DAT (RET)) (Using Journal Files to Protect Your Work Session\rtjou_sec)

You can create a journal file for your work session by using a second output file specification in your CSI file specification string. Then, if you experience a power-down or other system malfunction, you can recover the work you performed by using a second input file specification in your CSI file specification string. You can also journal any additional work you might perform by using a second output file specification, as well as a second input file specification, in your CSI file specification string.

The recovery operation begins and ends before an initialization file ((csiinitial_sec)), or your new editing commands can be processed by KED. (The CSI File Specification String for Journal Files)

A complete CSI file specification string for using journal files has the general format: output-filespec,journal-filespec=input-filespec,journal-filespec[/option]

(2\16) (output-filespec\is the output file specification described in Sections (com_default_sec\value) and (csistring_sec\value).) (input-filespec\is the input file specification described in Sections (com_default_sec\value) and (csistring_sec\value).) (journal-filespec\On the output side, (journal-filespec) is the specification of a journal file that will contain commands for a subsequent recovery operation. The default device is DK. The default file name is the name of your input file. The default file type is JOU.

On the input side, (journal-filespec) is the specification of another journal file that is used to recover the work you performed in a previous work session. The default device is DK. You must specify the file name. The default file type is JOU.) (/option\can be one or more of the file specification options listed in (csistring_sec).) (Beginning Your Work Session)

The CSI file specification string for creating a journal file has the form: output-filespec,journal-filespec=input-filespec

(2\16) (output-filespec\is the output file specification described in Sections (com_default_sec\value) and (csistring_sec\value). If not specified, its place must be marked by including the comma.) (journal-filespec\Must be specified.) (input-filespec\is required.)

The following example invokes KED to edit MYFILE.RNO and specifies SAVEIT.JOU as a journal file to reside on DL1. (.)(FRUN KED.SAV (RET)) (*)(,DL1:SAVEIT=MYFILE.RNO (RET))

Whenever you begin a work session that creates a journal file, any special settings you made and anything you stored in KED's buffers are lost after you end that work session, even if you did not press (CTRL/C).

See the (ins_book) for a customization patch that always creates a journal file whenever you begin a work session. (Recovering the Work You Performed and Journaling Any Additional Work\csirecover_sec)

Once you create a journal file, you can use it to recover the work you performed in a previous work session. And, at the same time, you can create a second journal file to preserve your additional work (and that of the recovery operation) in your current work session.

The recovery operation starts at the beginning of your work session, before KED can execute an initialization file ((csiinitial_sec)) and before you can perform any additional work.

The CSI file specification string for using a journal file to recover the work you performed and for creating a second journal file has the form: output-filespec,journal-filespec=input-filespec,journal-filespec

(2\16) (output-filespec\is optional. If you use it, you must type the equal sign.) (input-filespec\is required.) (journal-filespec\On the output side, (journal-filespec) is the specification of a new journal file that will be created for your work session. Its use is optional. If you use it, you must type the comma and the equal sign.

On the input side, (journal-filespec) is the specification of the existing journal file that is used to recover the work you performed in a previous work session.)

The following example invokes KED to edit MYFILE.RNO and specifies that SAVEIT.JOU on DL1 will be executed first in the work session. The result, when the work session is ended, will be a new MYFILE.RNO containing all the work performed, a backup file named MYFILE.BAK, and the original SAVEIT.JOU on DL1. (.)(FRUN KED.SAV (RET)) (*)(MYFILE.RNO,DL1:SAVEIT.JOU (RET))

The next example invokes KED to edit MYFILE.RNO and execute MYFILE.JOU on DK. After the work session is ended, a new MYFILE.JOU will be on DK. (.)(FRUN KED.SAV (RET)) (*)(,MYFILE=MYFILE.RNO,MYFILE (RET)) (Using Initialization Files\csiinitial_sec)

After performing a recovery operation (if any was specified) and before letting you begin your work, KED looks for initialization file DK:KEDINI.KED. If that file does not exist, KED looks for SY:KEDINI.KED. If one of those files exists, KED executes it. If those files do not exist, KED does not signal an error.

You can prevent initialization file execution by using the /N option in your CSI file specification string: output-filespec=input-filespec/N

For example: (.)(FRUN KED.SAV (RET)) (*)(MYFILE.RNO,MYFILE/N (RET))

You can also specify another initialization file (not KEDINI.KED) by using a third input file specification in your CSI file specification string. The second comma on the input side marks the position for a journal file that is not being specified. If the comma is not included, KED incorrectly assumes the initialization file is a journal file. output-filespec=input-filespec,,init-filespec[/option]

(2\16) (output-filespec\is the output file specification described in Sections (com_default_sec\value) and (csistring_sec\value).) (input-filespec\is the input file specification described in Sections (com_default_sec\value) and (csistring_sec\value).) (init-filespec\is the specification for your initialization file. You must type the two commas and a file name. The default device is DK. The default file type is KED.) (/option\can be one or more of the file specification options listed in (csistring_sec).)

For example, the following command line calls the initialization file, MYINIT.KED, before opening MYFILE.RNO for editing: (.)(FRUN KED.SAV (RET)) (*)(MYFILE.RNO,,MYINIT.KED (RET))

If your initialization file does not exist, KED displays: ?KED-W-Command file not found - Continue (Y,N)?

Type Y and press (RETURN) to begin your work session without executing any initialization file. Type N and press (RETURN) to return to the KED utility prompt.

If you want to suppress that query and any others KED could generate (for example, (?KED-W-Output file exists - Continue (Y,N)?)), use the /Y option in your CSI file specification string: output-filespec=input-filespec,,init-filespec/Y

or output-filespec=input-filespec/Y

For example: (.)(FRUN KED.SAV (RET)) (*)(MYFILE.RNO/Y (RET)) (Specific RT--11 KED Information)

This section describes information for running KED that is specific to the RT--11 operating system. (Wildcard Characters)

You cannot use wildcard characters ( * or % ) in file specifications. (Running KED from Indirect Files)

When you set the ERROR condition to WARNING (SET ERROR WARNING) and then run KED from an indirect command file, ending the work session with the QUIT command causes RT--11 to abort the indirect command file. (Overwriting Existing Files)

Except when editing with automatic backup, KED displays the following message if you specify an output file that already exists on your output volume: ?KED-W-Output file exists - Continue (Y,N)?

When that message appears, you can end your work session and preserve the existing file by responding with N (for no). Responding to that message with Y (for yes) continues the work session. Subsequently ending the work session by issuing the EXIT command deletes the existing file and creates a new file with the old name. Subsequently ending the work session by issuing the QUIT command preserves the existing file, but loses any edits made during that work session.

In the following example, KED warns that diskette DX1 contains a file named MAYQUE.BAS. Assume you respond to the warning prompt with Y: (.)(EDIT/OUTPUT:DX1:MAYQUE.BAS DX0:PG451.BAS (RET)) (?KED-W-Output file exists - Continue (Y,N)? )(Y (RET))

If you then end the work session with the EXIT command, MAYQUE.BAS is deleted. But, if you stop KED with the QUIT command, MAYQUE.BAS is not deleted. (Output File Size Messages)

KED searches your output volume for contiguous free space in which to store the file you are creating. Then, KED allocates from that space for your work session.

In the following cases, KED displays messages about the space it has allocated. ((mes_ax) tells you what to do when the messages appear.) (unnumbered) When your output volume does not contain any contiguous free space that is as large as your input file, KED displays the following message and returns to the RT--11 prompt or the KED utility prompt. ?KED-F-Output file shorter than input file When the largest amount of contiguous free space on your output volume is less than 10 blocks larger than your input file, KED displays the following message. ?KED-W-Only MMMMMM blocks available for insertions - Continue (Y,N)?

KED also displays that message when you create a new file and your output volume contains less than 10 blocks of contiguous free space. When you are adding text to a file and the file becomes as large as the space allocated for it, KED refuses to accept more text and signals you by sounding a beeper or reversing the text and background on your terminal. If you then use the HELP function, KED displays: Insert finds file full (Using the Wrong Kind of Terminals)

KED supports only video terminals that are compatible with the VT100 series. You can use the following recovery procedures if you attempt to run KED on a noncompatible terminal. (Hardcopy Terminals)

If you accidentally run KED from a hardcopy terminal, use the following procedure to recover control of your system. (numbered) Press (CTRL/C) several times if the EDIT command prompt ((File?)) or the CSI prompt ((*)) was displayed. Reboot your system if you: (simple) Used the EDIT command and included a complete file specification Responded to the CSI prompt with a file specification

Continue working normally when the RT--11 prompt appears. (VT50 Series Video Terminals)

If you accidentally run KED from a VT52 or VT55 terminal, repeat the following procedure until you recover control of your system. (numbered) Press (CTRL/C) several times. Turn your terminal off, then on. Press (RETURN).

Continue working normally when the RT--11 prompt appears. (Special Operations for KED and KEX)

You can use more than one KEX editor at the same time and you can print your text directly from KED or KEX without ending your work session. (Using Multiple KEX Editors\kexeditors_sec)

You can use more than one editor at the same time by creating multiple copies of KEX, opening the files you want to edit, and then moving from one file to another. Using auxiliary files, you can easily move file contents from a file opened on one editor to a file opened on another.

The number of KEX editors you can use is limited only by available memory or the 8-job limit of RT--11.

The KEX copies are independent. For example, the cursor position in one file does not change because of any editing you do in another file.

Since you are running the KEX copies as system jobs, while editing a file, you can get the monitor prompt (or another job) by pressing (CTRL/B).

If your system has multiterminal support, you can run multiple copies of KEX, each from its own terminal, by using the SRUN and FRUN commands.

See Chapter 7 in the (int_book) for information and examples of using multiple KEX editors. (Printing Text Directly from KED or KEX Without Ending Your Work Session\kexprinting_sec)

You can use KED or KEX to print one or more sections of text without ending your work session.

If you run KEX as a system job, you must load the printer handler (LP or LS). (numbered) Make sure your printer is turned on. Open an output channel to the printer handler (and your printer). (alphabetic) Press (GOLD) and (COMMAND) Type (OPEN OUTPUT printer-handler:)

(printer-handler) is LP or LS. Press (ENTER) Select the section of text you want to print. Copy that section to the printer handler (and your printer). (alphabetic) Press (GOLD) and (COMMAND) Type (WRITE SELECT) Press (ENTER)

Your printer prints some or all of the text you selected, depending on the size of the printer buffer and the amount of text you selected. If you want to print additional sections of text, repeat steps 3 and 4. Otherwise, continue with the next step. Close the output channel to the printer handler. (alphabetic) Press (GOLD) and (COMMAND) Type (CLOSE) Press (ENTER)

Your printer prints the rest of the text you selected (if any), and it may execute a form feed.

In other words: (simple) Make sure your printer is turned on. (GOLD) (COMMAND) (OPEN OUTPUT printer-handler:) (ENTER) Select the section of text you want to print. (GOLD) (COMMAND) (WRITE SELECT) (ENTER) If necessary, repeat the two preceding steps. ((GOLD) (COMMAND) CLOSE (ENTER))