(Work Session Example\session_ax)

(Work sessionexample) (Examples, work session) (Edit sessionSee Work session) This appendix demonstrates some of the most common KED functions, thus giving you an example of KED in action. This appendix also: (unnumbered) Gives you a good introduction to the keypad keys Shows you what your terminal screen looks like while you are editing Illustrates some of the ways that KED changes your terminal screen Lets you see what the KED cursor and end-of-file symbol look like on your system Proves that the names of the KED functions explain most of what the functions do (Requirements)

To work through the example in this appendix, you need: (simple) A copy of the keypad diagram The file DEMOKD.TXT

You will find the keypad diagram in (work_chap) and on the front of the (kedc_book).

DEMOKD.TXT is on one of your distribution volumes, and it may be on your system volume or on one of your working volumes.

If DEMOKD.TXT is on your system volume, you can leave it there or copy it to one of your working volumes, depending on the size of your system volume. You will need approximately 18 blocks of contiguous free space (4 blocks for DEMOKD.TXT, 14 blocks for your output file) to complete the example.

If DEMOKD.TXT is not on your system volume or on one of your working volumes: (iasrsx) (unnumbered) RT--11, RSX--11M or RSX--11M--PLUS: (numbered) Install the distribution volume containing DEMOKD.TXT in an available drive. Copy DEMOKD.TXT to your system volume or to one of your working volumes. (iasrsx) IAS:

Ask your system manager to copy DEMOKD.TXT from the Objects Distribution Media to UFD [1,1] on the system disk.

In any event, unprotect DEMOKD.TXT. (Example)

The first time you work with this example, follow the instructions carefully because each step depends on the preceding step. Do not experiment while working with the example for the first time.

For each step in the example: (simple) Read the instruction. Look at your terminal screen while typing. Watch how KED performs the operation you specified. Read the short description that follows the instruction.

Your terminal may use the block cursor. Displays in this example use the underline cursor. (numbered) Begin your work session, specifying DEMOKD.TXT as the file you want to edit. (iasrsx) Use one of the following procedures.

RT--11: (alphabetic) Refer to (rt_ax) and use the appropriate SET TT command for your system.

Type the following command, where (dev) is your default data volume (DK) or one of your working volumes. (.)(EDIT [dev:]DEMOKD.TXT (RET)) (iasrsx)

RSX--11M or RSX--11M--PLUS: (alphabetic) Start the MCR.

The prompt (MCR>) appears on your screen. Type the following command. (KED DEMOKD.TXT (RET))

IAS---PDS: (alphabetic) Start DCL.

The prompt (PDS>) appears on your screen. Type the following command. (EDIT/KED DEMOKD.TXT (RET))

IAS---MCR: (alphabetic) Start the MCR.

The prompt (MCR>) appears on your screen. Type the following command. (KED DEMOKD.TXT (RET))

KED displays the first 24 lines in DEMOKD.TXT. Sample Keypad Editing Session - //DATE// This file has been designed especially for the sample editing session that is described in the PDP-11 Keypad Editor User's Guide. After you have completed the sample session, you may use this file to practice other keypad editor functions and commands, if you like. ABOUT THE SAMPLE SESSION Your general task for the sample session is to insert the date you begin working with the keypad editor into your own copy of this file. The date is //DATE// . Sample Keypad Editing Session, "section" 2 lakdjhfuierbhnv a678237yfg^90(4#!! The PDP-11 Keypad Editor is for use with VT100 compatible terminals that have keypads.

You will see the remaining lines in DEMOKD.TXT as you progress through this work session. Type your name. Use the keyboard keys exactly as if you were using an electric typewriter. To correct your typing mistakes, press the (delete) key as many times as necessary and then type the correct characters.

KED displays each character (letter or space) as you type it. Use the end-of-line (EOL) function. Press the 2 key on your keypad.

KED moves the cursor to the end of the first line. Use the delete-left-word (line feed) function. Press the LF key on your keyboard (CTRL/J on some keyboards).

KED deletes the word at the cursor's left. (KED also stores that word, in case you want to recover it. A later step shows you how to recover a deletion.) Type the current date. Use the number and letter keys on your keyboard. To correct your typing mistakes, press the key as many times as necessary and then type the correct characters.

KED displays each character (number, letter, or space) as you type it. Use the end-of-section (SECTION) function. Press the 8 key on your keypad.

KED moves the cursor 16 lines forward. (KED's default definition of a section is 16 text lines.) Use the beginning-of-word (WORD) function three times. Press the 1 key on your keypad three times.

For each WORD function, KED moves the cursor to the beginning of a word. Use the delete-right-line (DELLINE) function. Press the PF4 key on your keypad.

KED deletes the cursor's character, the characters to the right of the cursor, and the line terminator. Then it restores your screen to show the effect of the deletion. (KED also stores all the deleted characters and the line terminator, in case you want to recover them. The next step shows you how to recover a line deletion.) The preceding step deleted too much. Therefore, use the undelete-line (UNDELLINE) function to recover the entire deletion. Press the PF1 key and then the PF4 key on your keypad.

KED restores all the characters you deleted, including the line terminator.

Most of the keys on your keypad specify two KED functions: a standard function and an alternate function. The functions shown on the top of the keys in the keypad diagram are standard functions. The functions shown on the bottom of the keys are alternate functions. You specify a standard function by pressing the appropriate key. You specify its alternate function by first pressing the select-alternate (GOLD) PF1 key.

On the PF4 key, DELLINE is the standard function. Unless you press the PF1 key first, that is the function KED will perform when you press the PF4 key. The alternate function of the PF4 key restores the last line you deleted with DELLINE or one of KED's other line-deletion functions. To use that alternate function, you must use the select-alternate function first (press the PF1 key) and then use the UNDELLINE function (press the PF4 key). Use the beginning-of-word (WORD) function two more times. Press the 1 key on your keypad two more times.

KED moves the cursor two words forward. Use the delete-to-end-of-line (DELEOL) function. Press the GOLD (PF1) key and then the DELEOL (2) key on your keypad.

KED deletes the right-hand part of the line and stores the deletion. It does not delete the line terminator. Use the move-to-end-of-file (BOTTOM) function. Press the GOLD (PF1) key and then the BOTTOM (4) key on your keypad.

KED moves the cursor past all the characters in your file to the end-of-file marker. KED's search functions can move the cursor directly to any character string you specify. As shown below, you specify the FIND function, complete that function with a model (a search target), and then specify the direction of your search. (alphabetic) Use the specify-search-target (FIND) function. Press the GOLD (PF1) key and then the FIND (PF3) key on your keypad.

KED temporarily erases the top two screen lines and displays the prompt (Model:). Type the search string (//DATE//) (two slashes, the word DATE, and two more slashes).

KED displays each character of the model (your search target) as you type it. Use the move-backward (BACKUP) function to specify a backward search. Press the BACKUP (5) key on your keypad.

KED searches backward for the nearest occurrence of a character string that matches your model. When it finds a matching string, it places the cursor on the first character in that string. Use the delete-right-word (DELWORD) function and type the current date again. Press the DELWORD (-) key on your keypad and then type the current date (and a period).

KED deletes the next word, stores the characters you deleted, and then displays each new character as you type it. Use the continue-search (FINDNEXT) function. Press the FINDNEXT (PF3) key on your keypad.

KED uses the latest model you specified ((//DATE//)) in searching backwards for another occurrence of a matching string. KED searches backward because that is the direction you specified most recently. The cursor is now on one of the three remaining occurrences of (//DATE//). This step gives you an easier way to change the remaining occurrences of (//DATE//) to the current date. You will use the SUBSTITUTE function, but since that function uses KED's paste buffer to make substitutions, the first thing you must do is put your substitution string in the paste buffer. (alphabetic) Use the begin-selection (SELECT) function. Press the SELECT (.) key on your keypad.

The SELECT function begins one end of a string to be selected. Your screen does not show any effects of selecting until you move the cursor. Type the current date again.

As you type the characters, KED underlines them or displays them in reverse video form. Use the cut-out-selection (CUT) function. Press the CUT (6) key on your keypad.

The CUT function deletes all the characters in your selection and stores them in the paste buffer. The cursor is still on the first character of (//DATE//). Use the substitute-and-search (SUBSTITUTE) function. Press the GOLD (PF1) key and then the SUBSTITUTE (Enter) key on your keypad.

KED substitutes the current date (in its paste buffer) for your search target ((//DATE//)) and then executes the FINDNEXT function. Use the substitute-and-search (SUBSTITUTE) function again. Press the GOLD (PF1) key and then the SUBSTITUTE (Enter) key on your keypad.

Each time you use the SUBSTITUTE function, KED substitutes and then searches. In this step, KED makes the substitution but fails to find another string that matches your model. KED signals the failure by ringing a bell, sounding a beeper, or reversing the text and background on your terminal. Use the HELP function. Press the HELP (PF2) key on your keypad.

When the SUBSTITUTE function failed, KED placed an explanation of the failure in a message buffer. In this step, the HELP function temporarily erases the bottom three lines on your screen and then displays that explanation. Use the restore-screen (CTRL/W) function. Press the CTRL/W keys on your keyboard (hold the CTRL key down while you type the letter W).

KED deletes the HELP message and restores the three lines it deleted. Use the EXIT command to end your work session and save your work in a new version of DEMOKD.TXT. (alphabetic) Press the GOLD (PF1) key and then the COMMAND (7) key on your keypad.

KED temporarily erases the top two screen lines and displays the prompt (Command:). Type the word EXIT on your keyboard.

KED displays each letter of the command as you type it. Press the Enter key on your keypad.

KED moves the cursor to the lower left corner of your screen, pauses briefly, and then returns you to your operating system prompt. If KED displays its asterisk ((*)) prompt instead of returning you to your operating system prompt, press CTRL/C (iasrsx) or the Ctrl/Z key on your keyboard. (iasrsx) or Z).

(iasrsx) RT--11: CTRL/C returns you to the operating system prompt. (iasrsx)

RSX--11M: CTRL/Z returns you to the operating system prompt. CTRL/C returns you to the MCR prompt.

RSX--11M--PLUS: ???

IAS: ???

Now, the date you typed. Ed Bruce Sample Keypad Editing Session - 22 Sep 89 This file has been designed especially for the sample editing session that is described in the PDP-11 Keypad Editor User's Guide. After you have completed the sample session, you may use this file to practice other keypad editor functions and commands, if you like. ABOUT THE SAMPLE SESSION Your general task for the sample session is to insert the date you begin working with the keypad editor into your own copy of this file. The date is 22 Sep 89. Sample Keypad Editing Session, "section" The PDP-11 Keypad Editor is for use with VT100 compatible terminals that have keypads. As you work through a file with the keypad editor, the editor displays 24 lines of the file on your screen. One of the lines always shows the keypad editor cursor, the flashing symbol that is always somewhere on your screen. The cursor identifies the character that will be erased if you use one of the erasing functions. It also marks the location in your file where the editor will insert what you type on the keyboard. 22 Sep 89 is the date you started to learn to use the keypad editor. If KED is the first video-oriented editor you have used, welcome to a new world of fast, clear responses to editing functions. If you already have used a video-oriented editor, welcome to Digital's contribution for users of the RT-11 operating system. If the experience of other users is valid for you also, you will be confident about using the keypad editor within a day or two after 22 Sep 89.