(edited 9-Jun) ((author::user:[rtindex]largetable.tex)) (Beginning and Ending Your Work Sessions\work_chap)

This chapter shows you how to: (UNNUMBERED) Begin a work session and specify the required files ((start_sec)). Use the KED function keys and issue KED commands to set up your terminal (Sections (keys_sec\value) and (usingcommands_sec\value)). Write and edit some text ((typ_sec)). End a work session ((end_sec)).

If you make a mistake that KED can detect, KED: (simple) Displays an appropriate message on your terminal. or Sounds a beeper on your terminal. If you press (PF2) (the help key) on your keypad, KED then displays an appropriate message.

If that message does not give you enough information to correct your mistake, you can look the message up in (mes_ax). There you will find an explanation of the message and instructions for correcting your mistake. (Beginning a Work Session\START_SEC)

(Beginning work session) (Work sessionbeginning) A complete command line for beginning a work session has the general format: EDIT[/option] filespec[/option] (2\16) (Output files) (Filesoutput) (Input files) (Filesinput) (filespec\should be a standard file specification for input and output files in the form ([dev:]filnam.typ). An input file contains text that you want to edit or inspect. An output file will contain the results of your work---the text you typed in or edited.) (/option\specifies the kind of work you want to do or the kind of work you want KED to do. (opt_ax) describes all the command line options you can use in a work session.)

The exact format of the command line you enter is determined by the kind of work you want to do. The following subsections show you how to begin the work you can do with KED. (Creating a New Text File\CREATE_SEC)

(Creatingnew text file) (New text file, creating) A command line for creating a new text file has the general format: EDIT/CREATE output-filespec (/CREATE file specification option) (File specification optionsCREATE) (OptionsSee also Command options or File specification options)

(2\16) (/CREATE\can be abbreviated to /CREA.) (output-filespec\is the specification for a new file.

If (output-filespec) exists, KED asks if you want to replace it. If that file exists and is protected, KED gives you the opportunity to inspect it.)

For example, type: (EDIT/CREATE WEEK.TXT (RET))

KED creates output file WEEK.TXT, clears your terminal screen, and places its cursor in the upper left corner of your screen. Your terminal may use a block cursor. This document uses an underline cursor to show your location in a file.

(ps\MLO-003499.ps\33)

You are now ready to type in text as described in (writing_sec). (Editing an Existing Text File\EDIT_SEC)

(Editing existing text file) (Existing text fileediting) (Text fileediting existing) A command line for editing an existing text file has the general format: EDIT input-filespec

(2\16) (input-filespec\is the specification for the file that contains the text you want to edit. The default input file type is MAC.

If KED cannot find the file you specify, it asks for permission to create that file. If that file exists but is protected, KED gives you the opportunity to inspect it.)

For example, to edit whatever you might have stored in file WEEK.TXT, type: (EDIT WEEK.TXT (RET))

KED displays your text and places its cursor in the upper left corner of the screen, which, in this case, is on the first character of the first word in WEEK.TXT.

In some cases, you may want to specify a new file to contain the output of your work session and keep the original text in the input file. A command line to do that has the general format: (/OUTPUT command option) (Command options/OUTPUT) (Command line optionsSee also Command options and File specification options) EDIT/OUTPUT:output-filespec input-filespec

(2\16) (/OUTPUT\can be abbreviated to /OUTP.) (output-filespec\is the specification for the file that will contain the revised text.) (input-filespec\is the specification for the file that contains the text you want to edit. At the end of your work session, that file is not altered.)

For example, type: (EDIT/OUTPUT:WEEK1.TXT WEEK.TXT (RET))

KED displays WEEK.TXT. At the end of your work session, WEEK1.TXT will contain the revised text and WEEK.TXT is not altered.

(ps\MLO-003500.ps\33)

You are now ready to edit your text as described in (editing_sec). (Specifying a Maximum Output File Size\editsize_sec)

(Specifyingmaximum output file size) (Maximum output file size, specifying) (Output filesspecifying maximum size) (Filesoutputspecifying maximum size) You should specify a maximum output file size when: (unnumbered) You want to create an output file of a certain maximum size. You want to override the limit that KED places on the size of your output file in relation to the amount of free space available on your output volume, as described in Appendix (rt_ax\value). (iasrsx) , (rsx_ax\value) or (ias_ax\value).

A command line for specifying a maximum output file size has the general format: EDIT/CREATE filespec/ALLOCATE:size

or EDIT filespec/ALLOCATE:size (/ALLOCATE file specification option) (File specification optionsALLOCATE)

(2\16) (/CREATE\can be abbreviated to /CREA.) (filespec\is the specification for the output file that will contain the text you want to create or the input file that contains the text you want to edit. The default input file type is MAC.) (/ALLOCATE\can be abbreviated to /ALLO.) (size\is the maximum size (number of blocks) for the output file KED creates to contain the results of your work session. Since the largest input file size KED can accept is 32767, that number is the largest you can use.)

For example, to create a new text file and specify 196 blocks as the maximum size for that file, type: (EDIT/CREATE WEEK.TXT/ALLOCATE:196 (RET))

To edit an existing text file, type: (EDIT WEEK.TXT/ALLOCATE:196 (RET))

KED begins your work session to edit the text stored in file WEEK.TXT. The (ALLOCATE:196) option specifies 196 blocks as the maximum size for the output file that will contain the edited text.

If you want to edit an existing text file and specify a new file to contain the output of your work session, while keeping the unaltered text in your input file, you can use the /OUTPUT option with the /ALLOCATE option in the following general format: EDIT/OUTPUT:output-filespec/ALLOCATE:size input-filespec

For example, type: (EDIT/OUTPUT:WEEK1.TXT/ALLOCATE:196 WEEK.TXT (RET))

KED begins your work session to edit the text stored in file WEEK.TXT. The (ALLOCATE:196) option specifies 196 blocks as the maximum size for the new output file, WEEK1.TXT.

You cannot use the /OUTPUT option with the /CREATE option. (Inspecting an Existing Text File)

(Inspecting existing text file) (Existing text fileinspecting) (Text fileinspecting existing) A command line for inspecting an existing text file has the general format: EDIT/INSPECT input-filespec

or EDIT/READONLY input-filespec (/INSPECT file specification option) (File specification optionsINSPECT)

(2\16) (/INSPECT\can be abbreviated to /INSP.) (/READONLY\can be abbreviated to /READ.) (input-filespec\is the specification for the file containing the text you want to inspect. The default file type is LST.)

For example, type: (EDIT/INSPECT WEEK.TXT (RET))

or (EDIT/READONLY WEEK.TXT (RET))

KED disables its editing functions so you cannot accidentally change the text file you are inspecting. But you can use some of the KED function keys and commands to move around inside that file (see (curs_chap)) and to create auxiliary output files (see (copy_chap)).

(ps\mlo-003501.ps\33)

When you end your inspection as described in (end_sec), the file WEEK.TXT is not altered. (Using the Function Keys and Issuing Commands\KEYS_SEC)

(Usingfunction keys) (Usingcommands) (Issuing commandsSee also Commands) (Issuing commands) (Function keysusing) (Commandsissuing) After beginning a work session to create or edit a text file (as described in Section (create_sec\value), (edit_sec\value), or (editsize_sec\value)), you can tell KED what to do by pressing KED function keys on your keypad and keyboard and by issuing KED commands. (Keypad Function Keys)

(Keypad function keys) (Function keyskeypad) The KED function keys on your keypad are shown below.

(ps\mlo-003502.ps\20)

Most of the function keys specify two functions: a standard function and an alternate function. (simple) The standard function appears in the upper half of the key. The alternate function appears in the lower half of the key.

You select the standard function by pressing the function key. The GOLD (PF1) key in (Keypad keysGOLD) (GOLD function) (FunctionsGOLD) (KeysSee also Keyboard keys or Keypad keys) the upper left corner of the keypad lets you select the alternate function on each function key. For example: (SIMPLE) To delete a word of text, press (DELWORD). To insert that word back into the text, press (GOLD) and then press (UNDELWORD).

(Keypad keysRESET) (RESET function) (FunctionsRESET) You can cancel the effect of the GOLD key by pressing (RESET). (The HELP Keypad Key)

(Keypad keysHELP) (HELP function) (FunctionsHELP) The HELP key displays a full-screen diagram of the keypad on your terminal. When that diagram is displayed: (numbered) If you press (HELP) again, you will see a full-screen list of KED commands, their abbreviations, and their operations. If you continue to press (HELP), you will see more full-screen lists describing the rest of the KED commands and all the GOLD keyboard functions. Eventually you will return to the keypad diagram.

You can return to your file at any time in that sequence by pressing (ENTER) on your keypad or (CTRL/W) on your keyboard.

You can suppress all the full-screen HELP displays listed above by issuing the SET NOHELP command, as described in (nohelp_sec).

Even with SET NOHELP in effect, the HELP key can display an explanation of a KED error signal, as described in (mes_ax).

You can use HELP anytime, except when KED is displaying one of its prompts. (Keyboard Function Keys)

(Keyboard function keys) (Function keyskeyboard) Other KED function keys on your keyboard are shown below.

(ps\mlo-003503.ps\12)

You will find out how to use those keys as you progress through this document. (simple) Some keys are used together (for example, (CTRL) and (C)). Some keys are used individually (for example, (RETURN) or (TAB)). Some keys are used with the GOLD keypad key (for example, (GOLD) and a number). (Commands) (Commands) (Keypad keysCOMMAND) (COMMAND function) (FunctionsCOMMAND) (Keypad keysENTER) (ENTER function) (FunctionsENTER)

To issue a KED command: (NUMBERED) Press (GOLD) and (COMMAND) (first press (GOLD), then press (COMMAND) ).

KED displays its command prompt. (Command: ) Type your command in response to that prompt. (Command: )(your-command)

You can use uppercase or lowercase letters in your command. Examples in this document use uppercase letters to indicate the parts you must type as shown and lowercase letters to indicate the parts you must supply (the variables). Press (ENTER) or (RETURN).

KED responds to your command by performing the operation you specified. (unnumbered) If you press (ENTER), KED erases your command and its command prompt. If you press (RETURN), KED erases your command but continues to display its command prompt so you can issue another command by repeating steps 2 and 3.

In other words: (simple) (GOLD) (COMMAND) (your-command) (ENTER) or (GOLD) (COMMAND) (your-command) (RET)

If you obtain the command prompt and then decide you do not want to issue a command: (simple) Press (ENTER). or Type (CHANGE) and press (ENTER).

KED will respond by erasing its command prompt.

If you obtain the command prompt, enter anything in response to the prompt, and then decide you do not want to issue a command, press (CTRL/C). (Keyboard keysCTRL/C) (CTRL/C function) (FunctionsCTRL/C) KED will respond by erasing its command prompt.

If you type a complete command and then decide you want to issue a different command, press (CTRL/U). KED will respond by deleting the command you typed. (Commands and Functions You Can Use After Beginning Your Work Session\usingcommands_sec)

(Commands and functionsafter beginning work session) (Beginning work sessioncommands and functions to use) (Functions and commandsafter beginning work session) This section tells you how to: (simple) Set your terminal screen to display longer text lines ((displaylong_sec)). Set the screen background to light or dark ((screenbackground_sec)). Set the terminal error signal ((termwarn_sec)). Suppress the HELP display ((nohelp_sec)). Restore the screen display after an interruption ((restoredisplay_sec)). Stop an operation in progress ((stopoperation_sec)).

The commands described in this section can also be placed in a work-session initialization file as described in Sections (kedcomfile_sec\value) and (initialize_sec\value), to prepare your work session environment (to give you the characteristics and operations you desire).

(func_ax) describes all the functions and commands you can use in a work session. For a complete description of the function and commands you can use to move the cursor and change your text, see Chapter (curs_chap\VALUE) and Chapter (edit_chap\value). (Setting Your Terminal to Display Longer Text Lines\displaylong_sec)

(Settingterminal to display longer text lines) (Terminalsetting to display longer text lines) (Longer text lines, setting terminal to display) (Text lines, setting terminal) (LinesSee Text lines) (CodeSee Text lines) (ScreenSee Terminal) (DisplaySee Terminal) (SET SCREEN command) (CommandsSET SCREEN) (FunctionsSee also Keyboard keys or Keypad keys) By default (unless you change something), KED displays up to 78 characters in a single line. If the text you want to create, edit, or inspect contains lines that are more than 78 characters long, you can set KED to display up to 130 characters in a single line if you set your terminal for 132 characters.

To change the terminal display from 80 characters to 130 characters: (NUMBERED) Press (GOLD) and (COMMAND). In response to the command prompt, type: (SET [SCREEN] 132)

You do not have to type (SCREEN). Press (ENTER).

KED erases the screen and restores it with enough space for the display of 130 characters on a line.

In other words: (simple) (GOLD) (COMMAND) (SET 132) (ENTER)

To return to the default (80 character) setting: (simple) (GOLD) (COMMAND) (SET 80) (ENTER) (Setting the Terminal Screen Background to Light or Dark\screenbackground_sec)

(Settingterminal screen background to light or dark) (Terminalsetting screen background to light or dark) (SET SCREEN command) (CommandsSET SCREEN) You can set KED to display dark text on a light background or light text on a dark background. (NUMBERED) Press (GOLD) and (COMMAND). In response to the command prompt, type: (SET [SCREEN] background)

You do not have to type (SCREEN).

(background) can be (LIGHT) or (DARK). Press (ENTER).

KED sets the text and background to dark/light or light/dark.

In other words: (simple) (GOLD) (COMMAND) (SET LIGHT) (ENTER) or (GOLD) (COMMAND) (SET DARK) (ENTER) (Setting the Terminal Error Signal\termwarn_sec)

(Settingterminal error signal) (Terminal error signal, setting) (Error signal, setting terminal) (Signal, setting terminal error) (SET QUIET command) (CommandsSET QUIET) By default, KED sounds the terminal beeper whenever a KED function or command fails. If you work in a quiet area, you can set KED to signal you silently by reversing the text and background. (NUMBERED) Press (GOLD) and (COMMAND). In response to the command prompt, type: (SET QUIET) Press (ENTER).

The next time a KED function or command fails, KED signals you by reversing the text and background.

In other words: (simple) (GOLD) (COMMAND) (SET QUIET) (ENTER)

You can see an explanation of the signal by pressing (HELP). To continue your work session, press (ENTER) or any other valid function key.

To reset KED to sound the beeper: (simple) (GOLD) (COMMAND) (SET NOQUIET) (ENTER) (Suppressing the HELP Displays\nohelp_sec)

(Suppressing HELP displays) (HELP displays, suppressing) When you press (HELP), by default, KED displays a full-screen diagram of the keypad, thus interrupting your work session. Once you become familiar with KED, you may not need that diagram and the other full-screen HELP displays, so KED gives you a way to suppress them. (NUMBERED) (SET NOHELP command) (CommandsSET NOHELP) Press (GOLD) and (COMMAND). In response to the command prompt, type: (SET NOHELP) Press (ENTER).

Then, when you press (HELP), KED does not display a diagram of the keypad. Instead, it sounds the beeper on your terminal. If you again press (HELP), KED tells you how to restore the full-screen HELP displays. In other words, the HELP function is disabled, except for the display of one-line error messages (KED's explanations of its error signals).

In other words: (simple) (GOLD) (COMMAND) (SET NOHELP) (ENTER)

To reset KED to its default: (simple) (SET HELP command) (CommandsSET HELP) (GOLD) (COMMAND) (SET HELP) (ENTER) (Restoring the Screen Display After an Interruption\restoredisplay_sec)

(Restoringscreen display after interruption) (Interruption, restoring screen display from) (Keyboard keysCTRL/W) (CTRL/W function) (FunctionsCTRL/W) (Keyboard keysCTRL/R) (CTRL/R function) (FunctionsCTRL/R) If the text that KED is displaying disappears or becomes corrupted in some way, press (CTRL/R) or (CTRL/W).

If possible, KED restores your screen with a fresh image.

CTRL/R or CTRL/W can be useful when: (UNNUMBERED) You accidentally reset your terminal. KED displays a message or the keypad diagram after you press the HELP key. KED reverses the text and background to signal an error. Your operating system displays a message. In most cases, such messages cover part of the line that contains the KED cursor. Electronic interference generates extraneous characters on your screen while you are using a modem. The keypad keys display numbers and punctuation marks instead of performing KED functions.

You can use CTRL/R or CTRL/W anytime, except when KED is displaying one of its prompts. (If the keypad keys are displaying numbers and punctuation marks instead of performing KED functions, you can use CTRL/R or CTRL/W to restore the KED functions while KED is displaying a prompt, but the screen display will not be restored.) (Stopping an Operation in Progress\stopoperation_sec)

(Stopping operation in progress) (Operation in progressstopping it) (Keyboard keysCTRL/C CTRL/C) (CTRL/C CTRL/C function) (FunctionsCTRL/C CTRL/C) To stop an operation that KED is performing, press (CTRL/C) twice.

KED stops the operation, displays the part of your file that contains the cursor, and signals you by sounding a beeper or reversing the text and background on your terminal.

You can see an explanation of the signal by pressing (HELP). To continue your work session, press (ENTER) or any other valid function key.

CTRL/C or two CTRL/Cs will not end your work session or destroy any files you are using. (Writing and Editing Text\TYP_SEC) (Writing and editing text) (Textwriting and editing) (Writing\writing_sec)

After beginning a work session as described in (create_sec), you continue the creation of WEEK.TXT by typing on the blank screen.

For example, type: (Monday was cold and rainy. (RET)) (On Tuesday, it snowed. (RET)) (Wednesday was sunny and warm. (RET))

KED displays the sentences as you type them, moving its cursor to the right of each character as it appears on your screen.

When you finish, you can end your work session and store WEEK.TXT as described in (end_sec). (Editing\editing_sec)

(Editing text) (Textediting) After beginning a work session as described in Section (edit_sec\value) or (editsize_sec\value), you can edit WEEK.TXT.

For example, after typing the text described in (writing_sec), you decide to add another line of text at the end of your file. (numbered) Press (GOLD) and then press (BOTTOM) on your keypad.

KED moves the cursor to an end-of-file marker that appears after the last line of text. (Monday was cold and rainy.) (On Tuesday, it snowed.) (Wednesday was sunny and warm.) (( )) Type: (On Thursday, the lilacs bloomed. (RET))

KED displays the sentence as you type it. The cursor is now located at the end of your file. (Monday was cold and rainy.) (On Tuesday, it snowed.) (Wednesday was sunny and warm.) (On Thursday, the lilacs bloomed.) (( ))

Next, you decide to change the word (warm) to (hot). (numbered) Press (BACKUP) and then twice press (EOL) on your keypad.

KED moves the cursor to the end of the previous line. Press (CTRL/J). (Keyboard keysCTRL/J) (CTRL/J function) (FunctionsCTRL/J) (Line-feed functionSee LF function) (Keyboard keysLF) (LF function) (FunctionsLF) On VT100 compatible terminals, you can press (LF) (the line-feed key) instead of (CTRL/J).

KED deletes the previous word ((warm)) and the period following it. Type: (hot.)

That gives you: (Monday was cold and rainy.) (On Tuesday, it snowed.) (Wednesday was sunny and hot.( )) (On Thursday, the lilacs bloomed.)

If you have made all the changes you wish to make, you are now ready to end your work session and store WEEK.TXT, as described in (end_sec). (Ending a Work Session\END_SEC)

(Ending work session) (Work sessionending) You can end a work session while any part of a file is on your screen. You do not have to move the cursor to a special location.

At the end of a writing or editing session, you can save or discard your work. (Saving Your Work)

(Savingwork) (Work sessionsaving work) (EXIT command) (CommandsEXIT) To end your work session and save the text you created or edited: (NUMBERED) Press (GOLD) and (COMMAND) on your keypad. In response to the command prompt, type: (EXIT) Press (ENTER) on your keypad.

KED ends your work session, and your operating system displays its prompt.

In other words: (simple) (GOLD) (COMMAND) (EXIT) (ENTER)

If you created a new text file, KED produces an output file that contains your (Output files) (Filesoutput) work and stores that file in a default volume (disk or diskette) or in the volume you specified when you began your work session. That file has the same file name and file type as the output file you specified when you began your work session (for example, WEEK.TXT).

If you edited an existing text file, KED renames your input file, produces an output file, and stores both files in a default volume or in the volume you specified when you began your work session. (unNUMBERED) The output file contains the revised version of your text. If you did not specify a different file in beginning your work session, that file has the same file name and file type as your input file (for example, WEEK.TXT). (Backup file) (Filesbackup) (Renamed file) (Filesrenamed) The renamed input file contains the unaltered version of your text. If you did not specify a different file when beginning your work session, that file has the same file name as your input file, but KED changes the file type to BAK to indicate it is a backup file (for example, WEEK.BAK).

If you inspected an existing text file, KED merely saves your input file (it does not produce any output files). (Discarding Your Work)

(Discarding work) (Work sessiondiscarding work) (QUIT command) (CommandsQUIT) To end your work session and discard whatever you created or edited: (NUMBERED) Press (GOLD) and (COMMAND) on your keypad. In response to the command prompt, type: (QUIT) Press (ENTER) on your keypad.

KED ends your work session, and your operating system displays its prompt.

In other words: (simple) (GOLD) (COMMAND) (QUIT) (ENTER)

If you created a new text file, KED deletes that file and does not produce any output files.

If you edited an existing text file, KED saves the unaltered version of that file and does not produce any output files.

If you inspected an existing text file, KED does not discard anything (it merely saves that file). (What Next?)

In addition to letting you use your terminal as an electric typewriter to create or edit text and store it in a file, KED lets you perform other text-entry operations that are described in (writ_chap). That chapter shows you how to: (simple) Use your keyboard to insert text. Insert nonprinting characters. Use some special line terminators. Set the right margin of your text.