Information Management Technology Library EDIT User’s Guide and Reference Manual Abstract Part Number This manual describes how to use the line editor (EDIT) and screen-mode editor (EDIT VS) provided with the EDIT program. It provides descriptions of the commands and their ranges and information on creating and using files. It also addresses error handling and page-mode editing.
Document History Note Edition Part Number Product Version OS Version First Edition Second Edition 84082 058061 EDIT B30 EDIT B30 Date GUARDIAN 90 C00 November 1987 GUARDIAN 90 C00 July 1991 The second edition of this manual was reformatted in July 1991; no changes affecting product functionality were made to the manual content at that time. New editions incorporate any updates issued since the previous edition. Copyright All rights reserved.
Contents Welcome to EDIT xv Notation Conventions Section 1 xvii Introduction to EDIT The EDIT Program 1-1 Writing and Editing With EDIT 1-1 Capabilities of the EDIT Program 1-2 Creating an EDIT File 1-3 Using the Line Editor 1-5 The EDIT Prompt 1-5 The RETURN Key 1-5 Line Numbers 1-7 Typing Commands 1-8 Correcting Mistyped Editor Commands Ranges 1-11 Printable Characters 1-11 Conversation With EDIT 1-12 The EXIT Command: Leaving Your File Section 2 1-9 1-16 Adding and Displaying Text The ADD Comm
Contents Section 3 Revising Text in Your File Editing and Moving Your Text 3-1 The DELETE Command: Deleting Lines 3-2 The REPLACE Command: Replacing Lines of Text 3-5 The FIX Command: Modifying Text Lines 3-7 Features of the FIX Command 3-7 How to Edit With the FIX Command 3-8 Using the Three FIX Subcommands 3-8 Typing Several Subcommands on an Editing Line Terminating the FIX Command 3-10 3-10 The CHANGE Command: Modifying Text Lines 3-11 Using Keywords With the CHANGE Command 3-12 The JOIN Comma
Contents Section 4 EDIT Command Summary Running the EDIT Program 4-1 Running the EDIT Program Interactively 4-1 Typing Several Commands on One Line 4-4 Running the EDIT Program Noninteractively 4-4 The Keyword QUIET 4-9 Introduction to Ranges 4-11 Editor Command Summary 4-13 ADD Command 4-15 What to Enter 4-15 How to Use ADD 4-16 Examples 4-Adding Text to an Existing File ADD BLOCK Command 4-17 4-23 BREAK Command 4-24 What to Enter 4-24 How to Use BREAK 4-25 Examples 4-26 CHANGE Command 4-30 What t
Contents EXIT Command 4-44 What to Enter 4-44 How to Use EXIT 4-44 Examples 4-44 FIX Command 4-45 What to Enter 4-45 How to Use FIX 4-45 Examples: Fixing a Text Line 4-48 Fixing an Editor Command 4-56 GET Command 4-58 What to Enter 4-58 Examples 4-61 Tip 4-67 IMAGE Command 4-68 What to Enter 4-68 How to Use IMAGE 4-70 Examples 4-70 JOIN Command 4-72 What to Enter 4-72 How to Use JOIN 4-73 Example 4-73 Tips 4-74 LIST Command 4-75 What to Enter 4-75 How to Use LIST 4-76 Examples 4-77 Tip 4-79 vi 058061 Tan
Contents MOVE Command 4-80 What to Enter 4-80 Examples 4-81 NUMBER Command 4-83 What to Enter 4-83 How to Use NUMBER Examples 4-85 4-84 OBEY Command 4-87 What to Enter 4-87 How to Use OBEY 4-87 Examples 4-89 PUT Command 4-92 What to Enter 4-92 How to Use PUT 4-93 Examples 4-94 QUERY Command 4-97 What to Enter 4-97 How to Use QUERY Examples 4-98 4-97 REPLACE Command 4-100 What to Enter 4-100 How to Use REPLACE 4-101 Examples: Using the REPLACE Command Explicitly 4-102 Examples: Using the REPLACE Command
Contents TEDIT Command 4-115 What to Enter 4-115 How to Use TEDIT 4-116 Examples 4-117 Tips 4-117 XEQ Command 4-118 ENV Command 4-119 What to Enter 4-119 Example 4-119 FILES Command 4-120 What to Enter 4-120 Examples 4-121 ?SYSTEM Command 4-122 What to Enter 4-122 ?VOLUME Command 4-123 What to Enter 4-123 Example 4-123 Section 5 Range Summary Introduction to Ranges 5-1 Line-Range Parameter 5-9 Syntax of the Line-Range Parameter Examples 5-10 5-9 Line-Range-List Parameter 5-14 Syntax of the Line-Ran
Contents String-Range Parameter 5-18 Syntax of the String-Range Parameter 5-18 How to Use the String-Range Parameter 5-20 Examples 5-22 String-Range-List Parameter 5-25 Syntax of the String-Range-List Parameter 5-25 Column-Range Parameter 5-27 Syntax of the Column-Range Parameter 5-27 How to Use the Column-Range Parameter 5-28 Column-Range-List Parameter 5-30 Syntax of the Column-Range-List Parameter Ordinal-Range Parameter 5-32 Syntax of the Ordinal-Range Parameter Examples 5-34 5-30 5-32 Ordinal-Ran
Contents Section 6 Handling Your EDIT Files Creating a Backup Copy of Your EDIT File 6-2 EDIT Files 6-3 How EDIT Files Are Named 6-3 Line Numbers in EDIT Files 6-4 Text Lines and Printable Characters 6-6 Continuation Lines in the EDIT Program Compressing Space in an EDIT File Appendix A EDIT Error Messages EDIT Error Messages Appendix B A-1 EDIT Error Recovery Procedure Error Recovery B-1 Recovery Procedure x 058061 Tandem Computers Incorporated B-2 6-8 6-7
Contents Appendix C Page Mode Editing Introduction to EDIT VS C-1 What Is Screen Editing? C-1 Relationship Between the Line Editor and the Screen Editor EDIT VS and Your Terminal C-6 Starting EDIT VS C-8 Using the Cursor Control and Editing Keys Moving the Cursor C-9 Adding Text to a New File C-10 Correcting Typing Errors C-10 Exiting EDIT VS C-9 C-13 Entering EDIT VS to Edit an Existing File Editing With the Numbered Function Keys EDIT VS Template C-5 C-14 C-15 C-17 EDIT VS Function Key Summary
Contents F14 (NO CHANGE) C-25 F15 (END OF LINE) C-25 F16 (TAB) C-25 SF1 (FIRST PAGE) C-25 SF2 (LAST PAGE) C-25 SF3 (BACK ONE LINE) C-25 SF4 (FORWARD ONE LINE) C-25 SF5 (INSERT BLOCK) C-26 SF6 (DELETE AND SAVE BLOCK) C-26 SF7 (RETRIEVE BLOCK) C-26 SF8 (COPY AND SAVE BLOCK) C-27 SF9 (DEFINE BLOCK) C-27 SF10 (GOTO MARKED PAGE 1) C-28 SF11 (GOTO MARKED PAGE 2) C-28 SF12 (INSERT COLUMN) C-28 SF13 (COLUMN DELETE) C-28 SF14 (RECOVER) C-28 SF15 (SET SUPER SHIFT) C-28 SF16 (EXIT) C-29 EDIT Commands Requiring Full-S
Contents XEQ Command C-42 What to Enter C-42 How to Use XEQ C-42 Appendix D EDIT VS Error Messages Appendix E EDIT VS Error Recovery Procedures EDIT VS Recovery File E-2 Recovery Procedures E-4 Recovery Procedure A Recovery Procedure B Recovery Procedure C Recovery Procedure D Recovery Procedure E Recovery Procedure F Recovery Procedure G Index E-4 E-8 E-9 E-10 E-10 E-12 E-14 Index–1 058061 Tandem Computers Incorporated xiii
Contents Figures Figure 1-1. Line Editing With the EDIT Program Figure 4-1. Running the EDIT Program Figure 5-1. Concept of Ranges (Lines and Columns) Figure 6-1. Continuation Lines in EDIT Figure C-1. Screen Editing Figure C-2. Relationship Between the Line Editor and the Screen Editor C-5 Figure C-3. The 6530 Terminal Keyboard Figure C-4. Operations of the EDIT VS Numbered Function Keys Tables Table 4-1. xiv 4-2 5-3 6-7 C-3 Common Ranges C-7 4-12 Table 4-2.
Welcome to EDIT What This Manual The EDIT program provides two editors—EDIT, a line editor, and EDIT VS, Is About a screen editor. The emphasis of this manual is on EDIT. The manual introduces you to the features and capabilities of EDIT, describes the many EDIT commands and their ranges, and provides information on creating and using EDIT files. For those users who wish to use EDIT VS, a description of page mode editing follows the EDIT material.
Welcome to EDIT How to Use This Manual Section 3, “Revising Text in Your File,” describes how to use eight of the more commonly used EDIT commands for editing and formatting the text in your file. Section 4, “EDIT Command Summary,” describes each of the EDIT commands, providing the syntax description, a discussion of how the command is used, examples, and tips.
Welcome to EDIT Notation Conventions Notation Conventions You must enter commands in a certain form so that EDIT understands them. This form is called syntax—it explains how to enter a command. These conventions have been established for representing syntax to save space and to avoid having to repeat a lot of information. Uppercase and lowercase letters may have specific meanings, and certain other symbols are also used to explain how to enter the command.
Welcome to EDIT Notation Conventions Notation Meaning UPPERCASE LETTERS Uppercase letters represent keywords and reserved words: you can enter these items in any combination of uppercase or lowercase letters. You can also abbreviate a keyword to its first letter. Lowercase italic letters represent variable items that you supply. lowercase italic letters Brackets [ ] Braces { } Vertical line | Ellipsis ... Spaces “string” Punctuation xviii Brackets enclose optional syntax items.
Welcome to EDIT What’s New in This Manual What’s New in This Manual This manual is an update of the previous EDIT Manual and includes information contained in the PS MAIL Extended-Editor User’s Guide for TTY Terminals. New or changed information includes: TEDIT, the new EDIT command that starts the TEDIT editing program. A new presentation of the range parameter material. The ranges have been reorganized into nine parameters, which are described in detail in Section 5.
Welcome to EDIT Where to Go for More Information Where to Go for The following manuals, also referenced in the text where appropriate, More Information provide supplementary information: The GUARDIAN 90 Operating System Utilities Reference Manual describes the system software underlying the EDIT program. The PS TEXT EDIT and PS TEXT FORMAT User’s Guide and the PS TEXT EDIT Reference Manual describe the features and commands of the TEDIT editing program, which you can start from EDIT.
1 Introduction to EDIT The EDIT Program EDIT is a text editing program. A text editor is a tool that lets you use a terminal to write documents and store them on the computer. Depending on your needs, the documents that you write might be business correspondence, a letter, or an entire manual; more advanced uses of EDIT might be creating an OBEY file or the source text of a computer program.
Introduction to EDIT Capabilities of the EDIT Program Then, at a later time, you can use EDIT to change these lines to: The codfish lays ten thousand eggs. The homely hen lays one. The codfish never cackles To tell you what she's done. And so we scorn the codfish, While the humble hen we prize, Which only goes to show you That it pays to advertise.
Introduction to EDIT Creating an EDIT File Creating an EDIT File To begin writing a document, you must create an EDIT file to contain the text of that document. You can do that in two steps: start the EDIT program, then create and name your EDIT file. 1. Start the EDIT program at the command interpreter prompt. This prompt is the prompt displayed by the program that communicates between your terminal and your computer system.
Introduction to EDIT Creating an EDIT File in answer to the question “SHALL I CREATE IT?”. EDIT prints: CURRENT FILE IS $WORK.FICTION.POEMS * You have started the EDIT program and created an EDIT file named POEMS, which will contain your document. You are now ready to type commands at the prompt for the EDIT program, which is an asterisk (*). If you don’t provide a name of a file, EDIT either prompts you for the file name as you begin editing or warns you that the file is undefined.
Introduction to EDIT The RETURN Key Using the Line Editor You can think of line editing as interactive—or conversational—editing. You and EDIT have a conversation about the lines of text in your file. You communicate with EDIT by typing commands and text, then pressing RETURN . EDIT responds by doing what you tell it to and by displaying prompts at your terminal. Figure 1 illustrates the concept of line editing with the EDIT program.
Introduction to EDIT The RETURN Key Figure 1-1. Line Editing With the EDIT Program EDIT User The Line Editor prompts the user that it is ready to edit a file and prompts for a command. The User enters a command: The Line Editor goes back to the file, finds the contents of line number 3, and displays it. "What's on line number 3?" Line 3 says: "And can't find them." The Line Editor then prompts for a command.
Introduction to EDIT Line Numbers When you simply press RETURN at the asterisk prompt (instead of entering an editor command or text), EDIT responds by listing the next line of text in the EDIT file. For example, if your EDIT file contains the lines: 7 8 9 10 11 12 13 I am only one, But still I am one. I cannot do everything, But Still I can do something And Because I cannot do everything I will not refuse to do the something that I can do.
Introduction to EDIT Typing Commands A line number can have from one to five digits, followed by a decimal point and from one to three digits. Thus, your file can have line numbers anywhere from 0 to 99999.999. Some examples of line numbers used by EDIT are: The same as 3 The same as 104.1 10.2 85447 0.21 0003.00 104.10 As you use EDIT, you see the line numbers on your screen along with the text they contain.
Introduction to EDIT Correcting Mistyped Editor Commands You can likewise abbreviate any command name and keyword to its first letter. The following commands, for example, are all equivalent: *L A *La *l a *LIST ALL You can also combine more than one command on a single command line. See Section 4, “Typing Several Commands on One Command Line,” for more information. Correcting Mistyped Editor Commands Oops. You notice a misspelling before pressing RETURN .
Introduction to EDIT Ranges For example, assume you have a file in your default subvolume called MYPOEM. You type the command: *GET MPOEM 1/10 TO 40;LIST ALL and EDIT returns the error message: ??:011 FILE $SYSTEM.USER.MPOEM CANNOT BE OPENED because you don’t have a file named MPOEM. Type FC to tell EDIT to display the most recent command line for editing: *FC (COMMAND) GET MPOEM 1/10 TO 40;LIST ALL ..........
Introduction to EDIT A Conversation With EDIT Ranges For many editor commands, EDIT operates on one or more lines of text in your file. So, when you type many of the commands, you are actually specifying both a command name and a range of text to be operated on. A range is the one or more lines of text on which you want the command to operate. You specify ranges in a variety of ways.
Introduction to EDIT A Conversation With EDIT Conversation With EDIT In the following sequence, you can step through a conversation with EDIT. Notice how the terminal displays your conversation. When you want to see lines of text, you must tell EDIT to list them on the screen. EDIT lists the line number and the text. Then, you use commands to tell EDIT to operate on specific lines of text. EDIT operates on the text, then prompts you for another command. 1.
Introduction to EDIT A Conversation With EDIT 3. You type an editor command to fix the text on line number 1. EDIT displays the line to be fixed on the screen. When you have finished fixing line 1, press RETURN at the FC prompt dots and EDIT prompts you for another editor command. *LIST ALL 1 The world's a stage, where God's 2 omnipotence His justice, knowledge,love, 3 and providence Do act the parts. *FIX 1 1 The world's a stage, where God's ..........
Introduction to EDIT A Conversation With EDIT 5. You type an editor command to add text beginning at line number 2. EDIT prompts you with the number 2. You type a line of text. EDIT prompts you with the number 2.1. You type the next line of text. EDIT prompts you with the number 2.2. You type two right slants (//) to tell EDIT that you’re finished adding text now. Then EDIT prompts you for another editor command.
Introduction to EDIT A Conversation With EDIT 7. You type an editor command to list all the text lines in your EDIT file. EDIT reads your EDIT file and lists all its text lines, in numerical order, on the screen. Then EDIT prompts you for another editor command. *CHANGE "Do act the"And one man in his time plays many" 3 3 And one man in his time plays many parts. *LIST ALL 1 All the world's a stage, 2 And all the men and women merely players, 2.
Introduction to EDIT The EXIT Command: Leaving Your File The EXIT Command: To exit from the EDIT program, simply type: Leaving Your File *EXIT The EXIT command closes your current EDIT file, terminates the editing session, and returns you to the command interpreter or the program that was running at your terminal before you called EDIT. If you need more information, see the discussion of the EXIT command in Section 4.
2 Adding and Displaying Text The ADD Command: Once you have created an EDIT file, you are ready to use EDIT to write a Adding Text to document in your file. Or, you might already have a file that you want to Your File continue working on. To add text to a file, use the ADD command. EDIT provides you with several ways to add text. You can: Add text to the end of your file Add text between existing lines by using decimal line numbers from .
Adding and Displaying Text The ADD Command: Adding Text to Your File To insert text into an existing file, you can ask EDIT to start adding text at a particular line number. For example, assume you want to insert lines into your file and your current file is: 1 2 3 4 Peter, Peter Pumpkin eater Put her in a pumpkin shell And there he kept her very well. The command: *ADD 2 2.1 2.2 2.3 * Had a wife But couldn't keep her // causes EDIT to begin inserting text after line 2.
Adding and Displaying Text The ADD Command: Adding Text to Your File The numbering of the previous ADD command uses whole numbers, and the last line of new text is line number 45. Therefore, the command: Line number 85 is both the last line of new text and the current line. *ADD 55 65 75 85 95 * Stole a pig And away he run. Tom, Tom, And far away." // starts adding text at line 55. You can use a decimal line number to add lines between existing lines of text. The command: *ADD 75.1 75.
Adding and Displaying Text The ADD Command: Adding Text to Your File If you type another ADD without requesting a whole or fractional line number, EDIT begins adding text at the next available line number, using the previously established numbering method: *ADD 75.13 75.14 75.15 * But all the tunes That he could play // The current file is now: 35 45 55 65 75 75.1 75.11 75.12 75.13 75.14 75.2 85 Tom, Tom, The piper's son Stole a pig And away he run.
Adding and Displaying Text The LIST Command: Listing Lines in Your File The LIST Command: To list the lines in your file, use the LIST command. The LIST command Listing Lines in allows you to: Your File List a single line List a range of lines List lines containing a specific character string List all lines in a file Suppose that your file contains these lines: 1 1.1 1.2 2 2.1 3 4 5 6 Jack be nimble Jack be quick Jack jump over the candlestick. Jack and Jill Went up a hill To fetch a pail of water.
Adding and Displaying Text Specifying Ranges You can list a range of lines by line number. For example: *LIST 1/3 1 1.1 1.2 2 2.1 3 * Jack be nimble Jack be quick Jack jump over the candlestick. Jack and Jill Went up a hill To fetch a pail of water. You can list lines that contain a specific character string. For example: *LIST "Jack" 1 Jack 1.1 Jack 1.2 Jack 2 Jack 4 Jack * be nimble be quick jump over the candlestick. and Jill fell down You can list all the lines in the file.
Adding and Displaying Text Specifying Ranges Specifying Ranges When you specify a range of lines with a command, you must always give the range as lower/higher. EDIT searches the line numbers sequentially from the lowest line number to the highest; it isn't able to move randomly in the file. For example: *LIST 17/13 -- ERROR -ALL RANGES MUST BE GIVEN AS LOWER/HIGHER Simply retype the command, listing the range of lines in the correct order.
3 Revising Text in Your File Editing and Moving You can use the commands described in this section to help you accomplish Your Text the following editing and formatting tasks: Deleting lines from your file Replacing lines in your file Fixing characters in one or more lines Changing characters in one or more lines Lengthening or shortening lines Breaking lines Moving one or more lines within your file Renumbering lines in your file Copying text from another file into your file or copying your files into a ne
Revising Text in Your File The DELETE Command: Deleting Lines The DELETE You can use the DELETE command to: Command: Deleting Delete a single line Lines Delete consecutive lines Delete several lines Delete all lines Suppose your file contains the following lines: 1 1.1 1.2 2 2.1 3 4 5 6 Jack be nimble Jack be quick Jack jump over the candlestick. Jack and Jill Went up a hill To fetch a pail of water. Jack fell down And broke his crown And Jill came tumbling after.
Revising Text in Your File The DELETE Command: Deleting Lines Lines 2 through 5 are removed from the file. You can review the remaining lines in the file by listing them: *LIST ALL 1 1.1 1.2 6 * Jack be nimble Jack be quick Jack jump over the candlestick. And Jill came tumbling after. You can delete several separate lines by listing them after the DELETE command. Separate them with a single space: *DELETE 1 1.1 1.2 1 Jack be nimble 1.1 Jack be quick 1.2 Jack jump over the candlestick.
Revising Text in Your File The DELETE Command: Deleting Lines If you have 10 lines or less in your file, as in the previous example, EDIT will simply list the deleted lines. However, if there are over 10 lines, EDIT responds with a prompt, asking you permission to delete the lines. Suppose you have 25 lines in your file, and you want to delete 12 lines: *DELETE 1/12 RANGE 1/12 CONTAINS 12 LINES.
Revising Text in Your File The REPLACE Command: Replacing Lines of Text The REPLACE The REPLACE command allows you to replace the text in a specified Command: Replacing location of your file. You can: Lines of Text Replace a single line Replace consecutive lines Suppose your current file contains these lines: 1 2 3 4 5 6 7 8 9 Simple Simon She made some tarts All on a summer's day; Says Simple Simon to the pieman: "Pray let me taste your ware." Said the pieman to Simple Simon: "Show me first your penny.
Revising Text in Your File The REPLACE Command: Replacing Lines of Text If you type a double slant (//) in response to the line number prompt, EDIT asks the following question: SHALL I DELETE THE REMAINING LINES? If you type YES (or simply Y), EDIT deletes the current line and any remaining lines in the range. Any other response leaves the current and remaining lines unchanged. In either case, the REPLACE command terminates.
Revising Text in Your File How to Edit With the FIX Command The FIX Command: Modifying Text Lines As you add text, you may also add typing errors. You can correct mistyped text with or without using a command, depending on when you notice the error. When you notice a mistyped word of text before you press RETURN , you can press BACKSPACE to back up to the mistake. Then, retype the line from there. For example: You press BACKSPACE to move backward to the mistake. You notice a mistake on this line.
Revising Text in Your File How to Edit With the FIX Command How to Edit With the FIX Command When you give the FIX command with a line or a range of lines, EDIT displays the single line or the first line of text in the range. EDIT then prompts you with the FIX prompt (10 periods) and waits for you to edit. You do your editing after the prompt on the editing line—the line below the text line. Then, after you type your correction, press RETURN .
Revising Text in Your File Typing Several Subcommands on an Editing Line R (for replace), followed by a replacement string, replaces characters in the text line on a one-for-one basis with the characters in the replacement string on the editing line. Replacement begins with the character above the R subcommand. To replace a word, type: *FIX 3 3 He yelled for his pipe, and he called for his bowl, .......... rcalled 3 He called for his pipe, and he called for his bowl, ..........
Revising Text in Your File Typing Several Subcommands on an Editing Line Typing Several Subcommands on an Editing Line If you have more than one correction to make to a text line, you can put more than one subcommand on an editing line. EDIT considers the first nonblank character on the editing line to be the beginning of a subcommand (if the character is an R, I, or D) or the beginning of a replacement string.
Revising Text in Your File The CHANGE Command: Modifying Text Lines The CHANGE Command: Modifying Text Lines The CHANGE command is an editing command that allows you to make changes to specified character strings in your file.
Revising Text in Your File Using Keywords With the CHANGE Command You can use the CHANGE command to modify text in one line or a range of lines. For example, to change the first occurrence of be to be agile and in line numbers 1 and 1.1: *CHANGE "be"be agile and" 1 1.1 1 Jack be agile and nimble 1.1 Jack be agile and quick * To change Jack to Peter in every line in the file, use ALL as your range of lines with the CHANGE command line: *CHANGE "Jack"Peter" ALL 1 Peter be agile and nimble 1.
Revising Text in Your File Using Keywords With the CHANGE Command Your file contains these lines: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Tom, Tom The piper's son Stole a pig And away he run. The pig was eat And Tom was beat, And Tom went crying Down the street. Tom, Tom The piper's son He learned to play When he was young; But all the tunes That he could play Was "Over the hills And far away.
Revising Text in Your File Using Keywords With the CHANGE Command If the current file is: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 tom, TOM The piper's son Stole a pig And away he run. The pig was eat And tom was beat And tom went crying Down the street. tom, TOM The piper's son He learned to play When he was young; But all the tunes That he could play Was "Over the hills And far away.
Revising Text in Your File Using Keywords With the CHANGE Command If you omit WORD, EDIT changes all occurrences of a character string to a new string. WORD is useful when the string to be changed might also be imbedded in other words— for example, and appears inside candlestick and command. If the current file is: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Thomas, Tom The piper's son Stole a pig And away he run. The pig was eat And Tomwas beat, And Tomwent crying Down the street.
Revising Text in Your File The JOIN Command: Lengthening and Shortening Lines The JOIN Command: EDIT enables you to lengthen or shorten lines of text in your file. The JOIN Lengthening and command lengthens lines to a certain line width by adding one or more Shortening Lines words from the next line to your current line. To shorten lines to a certain line width, JOIN breaks off one or more words and adds them to the next line. You can instruct EDIT to join your text to your exact specifications.
Revising Text in Your File The JOIN Command: Lengthening and Shortening Lines To lengthen the first three lines to a maximum width of 55, use the following command line (note the keyword WIDTH): *JOIN 1/1.2 WIDTH 55 1 Old King Cole was a merry old soul And a merry old soul 1.1 was he; He called for his pipe, and he called for his 1.2 bowl, * To shorten lines 2 through 6 to a maximum line width of 25, type: *JOIN 2/6 2 2.1 3 3.1 4 5 5.1 6 7 * WIDTH 25 And he called for his fiddlers three.
Revising Text in Your File The BREAK Command: Breaking Lines The BREAK When you need to break a line of text in a particular place, use the BREAK Command: Breaking command.
Revising Text in Your File The BREAK Command: Breaking Lines You can use any nonblank character to mark breaks. Place the character under each letter where you want to start a new line. For example, notice how typing a “z” in three places in this line causes the line to break into three lines: Old King Cole was a merry old soul And a merry old soul z z z 1 Old King Cole 1.01 was a merry old soul 1.
Revising Text in Your File The BREAK Command: Breaking Lines You can specify the column numbers in any order: *BREAK 1.1 AT 34 10 1.1 was he; 1.11 He called for his pipe, 1.12 and he called for his * Use the LIST command to view the new shape of your file: *LIST ALL 1 1.01 1.02 1.1 1.11 1.12 1.2 2 2.01 2.02 2.1 3 3.1 4 5 5.1 6 7 * 3–20 Old King Cole was a merry old soul And a merry old soul was he; He called for his pipe, and he called for his bowl, And he called for his fiddlers three.
Revising Text in Your File The MOVE Command: Moving Lines of Text in Your File The MOVE Command: The MOVE command allows you to rearrange the text in your file.
Revising Text in Your File The MOVE Command: Moving Lines of Text in Your File You can then move lines 7 and 8 to the end of the file. You can use the particular line number (in this case, line 11) or, if you don’t know what it is, you can use the range LAST: *MOVE 7/8 TO LAST 11 And Jill came 12 tumbling after. * Lines 5 and 6 belong in a different poem.
Revising Text in Your File The MOVE Command: Moving Lines of Text in Your File You can also copy several consecutive lines with the MOVE COPY command: *MOVE COPY 1.1/3 to 16 16 went up a hill 17 To fetch a pail 18 of water. * Use the LIST command to review the file: *LIST ALL 1 1.1 2 3 9 10 11 12 15 16 17 18 20 25 30 50 51 * Jack and Jill went up a hill To fetch a pail of water. Jack fell down and broke his crown and Jill came tumbling after. Jack and Jill went up a hill To fetch a pail of water.
Revising Text in Your File The NUMBER Command: Renumbering Lines The NUMBER EDIT does not automatically renumber lines as you work in your EDIT file. Command: EDIT silently assigns sequential line numbers to the lines in your file as you Renumbering Lines edit, using decimal line numbers when whole numbers are not available.
Revising Text in Your File The NUMBER Command: Renumbering Lines The NUMBER command renumbers the lines of your file, then returns the asterisk prompt. It does not automatically list the renumbered text each time you give a NUMBER command. If you want to list the text, you must use the LIST command: *LIST ALL 1 Jack and Jill 2 went up a hill 3 To fetch a pail 4 of water. 5 Jack fell down and 6 broke his crown 7 And Jill came 8 tumbling after.
Revising Text in Your File Renumbering to Add More Lines When you are adding a block of text into an existing file, you might need to create a gap in the numbering sequence to accommodate adding the new text. To renumber lines 8 through 17 and start the new line numbers at line number 50, type: *NUMBER 8/17 TO 50 *LIST ALL 1 Jack and Jill 2 went up a hill 3 To fetch a pail 4 of water. 5 Jack fell down and 6 broke his crown 7 And Jill came 50 tumbling after.
Revising Text in Your File Renumbering to Add More Lines If you want to add text between line numbers 24.006 and 24.007, you cannot do it because you’ve exhausted EDIT’s decimal numbering capability. There are no line numbers between 24.006 and 24.007. You simply renumber the file to solve this problem. You can renumber the entire file, or you can start renumbering from line number 24.007. If you renumber this file from 24.007 and start the new line numbers at 50 (the command is NUMBER 24.007/24.
Revising Text in Your File The GET Command: Copying Another File to Your File The GET Command: When you use the GET command, you have access to EDIT files other than Copying Another File the one you are in currently.
Revising Text in Your File Copying All of a File Into Your File List your current file from line number 12 to the end to see the results of your GET command: *LIST 12/LAST 12 Old King Cole 13 The Queen of Hearts 14 Old Mother Hubbard 20 Little Miss Muffett 21 Simple Simon * Copying All of a File Into Your File You can also copy the entire file of CLIENTS into your current file. To copy all six lines of CLIENTS into your current file at line 4, type: *GET CLIENTS TO 4 LAST NEW LINE IS 4.
Revising Text in Your File Copying Text to the Beginning or End of Your File If you do forget the keyword TO and find yourself in a different file, simply use the GET command with the name of the file you were editing to make that file the current one again. For example, suppose you are in the file named BIZMEMO, and you give the following command, which omits the TO keyword: *GET CLIENTS CURRENT FILE IS $WORK.TUTOR.
Revising Text in Your File Renumbering to Accommodate Added Lines EDIT renumbers lines in MOBY, making the first line in the file line number 1, then copies lines 55 through 66 of ISHMAEL into MOBY, starting at line number .001. You can use the keyword LAST to copy lines to the end of your file. Suppose you want to add lines from CLIENTS to the end of your current file, but you don’t know the last line number.
Revising Text in Your File Renumbering to Accommodate Added Lines and the file named COLE contains the lines: 21 22 23 24 25 26 27 28 Old King Cole was a merry old soul, And a merry old soul was he; He called for his pipe, and he called for his bowl, And he called for his fiddlers three. Every fiddler, he had a fine fiddle, And a very fine fiddle had he; Oh, there's none so rare as can compare With King Cole and his fiddlers three.
Revising Text in Your File Listing Your Files: The ?FILES Command means EDIT tried to put the text from line number 27 of COLE on line number 11 of MARKET but found that line number 11 already had text on it. To fix this problem and complete the copy of COLE into MARKET, simply renumber MARKET from line number 11 to the end of the file. Then issue another GET command to copy lines 27 through the end of COLE into MARKET. For example: Use LIST to see the results.
Revising Text in Your File Listing Your Files: The ?FILES Command Listing Your Files: The ?FILES Command When using file names and GET commands, you might need to check the spelling of a file name, for example, or search for a particular file. Without leaving the EDIT program, you can use the ?FILES command to display all the files on your current subvolume (or another if specified). (You can also use the FILES command at the command interpreter prompt to do the same thing.
Revising Text in Your File Copying All of Your File The PUT Command: You can use the PUT command to copy part or all of your current file into Copying Your File Into another, new file. The PUT command creates the new file with a name you a New File specify. The name of a file can be from one to eight alphanumeric characters, the first of which must be alphabetic, and the file name can be partially or fully qualified. (For more information on file names, refer to Section 6.
Revising Text in Your File Copying All of Your File If you are using the PUT command to copy your current file into an already existing EDIT file, EDIT displays an error message: Trying to put the current file into SAVEMEMO again *PUT SAVEMEMO ^ -- ERROR -THE NAMED FILE ALREADY EXISTS * You can either specify a different file name or add an exclamation point to your command line.
4 EDIT Command Summary Running the EDIT To run the EDIT program, you type EDIT at the command interpreter Program prompt character. You can run the EDIT program in either interactive or noninteractive mode. Interactive mode requires you to respond at the EDIT prompt after EDIT executes each command. Noninteractive mode means that EDIT executes commands from a command file while allowing you to use the terminal in the meanwhile.
EDIT Command Summary Running the EDIT Program Interactively Figure 4-1.
EDIT Command Summary Typing Several Commands on One Line Example Suppose an EDIT file named BEN contains the following lines: 1 2 3 4 5 6 7 8 A little neglect may breed mischief: for want of a nail the shoe was lost; for want of a shoe the horse was lost; for want of a horse the rider was lost.
EDIT Command Summary Typing Several Commands on One Line Typing Several Commands on One Line As you become familiar with the individual commands of the EDIT program, you can learn to edit more efficiently by typing several commands in the same command line. You supply the commands all at once, and EDIT completes them in sequential order. When you do this, you must separate the individual commands with semicolons.
EDIT Command Summary Typing Several Commands on One Line To run the EDIT program noninteractively, use the following EDIT command syntax: EDIT / [IN filename1] [, OUT filename2] [, NOWAIT] / IN reads editor commands. filename1 If you do not specify filename1, the EDIT program reads from the command file of the command interpreter (usually the home terminal). OUT specifies the file to which the EDIT program writes its output. filename2 is the name of a nondisk device, process, or existing disk file.
EDIT Command Summary Typing Several Commands on One Line When you run the EDIT program noninteractively: The IN and OUT keywords accept a full file name or a partial file name. (See “How EDIT Files Are Named” in Section 6 for information on file names.) The EDIT program reads 132-byte records from the command file until the end-of-file is encountered. You can give multiple commands per record by separating the commands with a semicolon (;).
EDIT Command Summary Typing Several Commands on One Line You can use the EDIT program to create a command file as follows: Starts EDIT and creates INDEX Starts adding text at line number 1 This is an editor command. It does NOT begin with * This is a comment line. It MUST begin with * 6> EDIT INDEX TEXT EDITOR - T9601B30 - (08MAR87) $WORK.TASK.INDEX DOES NOT EXIST.
EDIT Command Summary The Keyword QUIET This command starts the EDIT program at the command interpreter and provides the name of the command file (in this case, INDEX). The prompt then reappears, at which you can type another command.
EDIT Command Summary The Keyword QUIET The Keyword QUIET The keyword QUIET combines with many of the commands available in EDIT and tells EDIT not to prompt you or list lines (as the case may be) as a command is executed. The following summary illustrates the effect of QUIET on commonly used EDIT commands. ADD QUIET allows you to type new text lines without a line number prompt from EDIT. Remember, EDIT displays a line number prompt for each new line of text.
EDIT Command Summary The Keyword QUIET MOVE QUIET tells EDIT not to list lines as they are moved. MOVE and MOVE COPY commands with QUIET might be: *MOVE QUIET 2/4 TO LAST *MOVE QUIET COPY 2 TO 5, 10, 15 REPLACE QUIET tells EDIT not to list the existing line of text prior to deleting it.
EDIT Command Summary Introduction to Ranges Introduction to Ranges When you type a command, you ask EDIT to “operate” on one or more lines of text in your file. So, typing a command actually involves typing both a command name and a range of text. A range is the line or lines of text on which you want the command to operate. One of the most powerful features of EDIT is the variety of ways in which it allows you to specify ranges of lines or columns in your text.
EDIT Command Summary Introduction to Ranges Table 4-1. Common Ranges Range How You Specify the Range Command Example A single line The first line The last line The current line Several separate lines Line number Keyword FIRST (F) Keyword LAST (L) * Line numbers separated by spaces Beginning line and ending line Keyword FIRST and a line number Keyword LAST and a line number * and a line number Character string LIST 10 DELETE F FIX L LIST * REPLACE 1 5 10 15 LIST 12.
EDIT Command Summary Editor Command Summary Editor Command The EDIT program recognizes 25 editor commands. These editor Summary commands are summarized in Table 4-2. Table 4-2.
EDIT Command Summary Editor Command Summary Table 4-2.
EDIT Command Summary ADD Command ADD Command The ADD command allows you to enter text from a terminal or from an OBEY file into a new or existing EDIT file. (See the OBEY editor command later in this section.) What to Enter ADD [ QUIET ] [ line [ BY incr ] ] QUIET allows you to type new text lines without a line number prompt from the EDIT program. By default, the EDIT program displays a line number prompt for each new line of text. line is all the characters that have the same line number.
EDIT Command Summary ADD Command How to Use ADD When you issue an ADD command with no line number and no increment parameter and there is no previous ADD command (see Example 1, “Adding Text to an Existing File,” and Examples 1 and 2, “Adding Text to a New EDIT File”), by default EDIT: Starts adding text at a line number following the last line number in the EDIT file. Numbers each new line of text by an increment of 1.
EDIT Command Summary ADD Command When you type an ADD command with a line number and no increment, EDIT chooses an increment (for example, 1, .1, .01, or .001) in order to insert text into your file. The increment is either of the following: The same number of digits as the fraction portion of the line number you specified for a range parameter Less than the difference between the line number to be added and the next existing line number in the file.
EDIT Command Summary ADD Command 2. The numbering increment is 1 by default; typing BY 1 here is optional. Suppose you have a file named TOM. The command: *ADD 35 BY 1 35 Tom, Tom, 36 The piper's son 37 Stole a pig 38 // * starts adding text at line number 35. Line number 37 is the last line of new text as well as the current line. 3. The increment parameter of the previous ADD command is 1, and the last line of new text is line number 37. Therefore, the command: *ADD 38 39 40 * And away he run.
EDIT Command Summary ADD Command The current file named TOM now looks like this: 35 36 37 38 39 40.01 40.02 40.03 Tom, Tom, The piper's son Stole a pig And away he run. Tom, Tom, The piper's son He learned to play When he was young; The command: *ADD 38 38 38.1 38.2 38.3 * And away he run. The pig was eat And Tom was beat, // lists line number 38. Since line number 39 already exists, the EDIT program starts adding new text at line number 38.1 and uses a numbering increment of .1. Line number 38.
EDIT Command Summary ADD Command The command: *ADD * 41 42 43 44 45 46 * When he was young; But all the tunes That he could play Was “Over the hills And far away." // starts adding text after the current line (40.03). 6. The command: *ADD QUIET 38.2 38.2 And Tom was beat 38.3 And Tom went crying 38.4 Down the street. 38.5 // *LIST FIRST/40 35 Tom,Tom 36 The piper's son 37 Stole a pig 38 And away he run. 38.1 The pig was eat 38.2 And Tom was beat, 38.3 And Tom went crying 38.4 Down the street.
EDIT Command Summary ADD Command Adding Text to a New EDIT File 1. Starts the EDIT program To create and add text to a new EDIT file named POEMS, type: 12> EDIT POEMS TEXT EDITOR - T9601B30 - (08MAR87) $WORK.FICTION.POEMS DOES NOT EXIST. SHALL I CREATE IT? y CURRENT FILE IS $WORK.FICTION.POEMS *ADD 1 Hey diddle diddle 2 The cat and the fiddle 3 The cow jumped 4 Over the moon. 5 // * Begins adding text at line number 1 and numbers subsequent lines by an increment of 1 2.
EDIT Command Summary ADD Command If you invoke the EDIT program without an EDIT file name, issue an ADD command, and then do not name an EDIT file when the EDIT program prompts you for one, EDIT creates a temporary EDIT file, adds text to this temporary file starting at line 1, and numbers each new line by an increment of 1: 14 EDIT TEXT EDITOR - T9601B30 - (08MAR87) *ADD 1 To market, to market NAME THE NEW FILE: *ADD ^ - WARNING THE CURRENT FILE IS TEMPORARY 2 to buy a fat pig, 3 // * Note 4–22 The GUA
EDIT Command Summary ADD BLOCK Command ADD BLOCK The ADD BLOCK command allows you to mimic page mode editing from Command the EDIT program, which is designed primarily as a line editor. This command is useful only if you have a terminal with full-screen capabilities; see Appendix C, “Page Mode Editing.
EDIT Command Summary BREAK Command BREAK Command What to Enter The BREAK command separates a text line into two or more text lines. BREAK line [ AT { column-num ... } ] [ { [ WORD ] } ] [ { [ BOTH ] "string" } ] line is all the characters that have the same line number. AT specifies the columns or strings where you want to split the line. column-num is one or more numbers from 1 to 239.
EDIT Command Summary BREAK Command string is one or more character strings enclosed in quotes. You can also enclose string within a pair of right slants (/) or single apostrophes (’). How to Use BREAK When you issue the BREAK command with no AT keyword, the EDIT program lists the line you specify in the range parameter then waits for you to mark where you want to break the line. To mark a break, type any nonblank character at the position where you want the break to occur.
EDIT Command Summary BREAK Command Examples For the following examples, lines 45 and 46 of the current EDIT file are: 45 46 Jack be nimble, Jack be quick, Jack jump over the candlestick. Jack and Jill went up the hill to fetch a pail of water, BREAK Command With No AT Parameter 1. The command: *BREAK 45 lists line number 45: Jack be nimble, Jack be quick, Jack jump over the candlestick. and waits for you to mark the breaks.
EDIT Command Summary BREAK Command 2. Another example of the BREAK command with no AT parameter is: *BREAK 46 Jack and Jill went up the hill to fetch a pail of water, k k k 46 Jack and Jill 46.1 went up the hill 46.2 to fetch a pail of water, * The AT Keyword and Column Numbers 1. The commands: *LIST COL 45 ....+....1....+....2....+....3....+....4....+....5....+....6.. 45 Jack be nimble, Jack be quick, Jack jump over the candlestick. *BREAK 45 AT 17 32 45 Jack be nimble, 45.1 Jack be quick, 45.
EDIT Command Summary BREAK Command The AT Keyword and Character Strings 1. The command: *BREAK 45 45 45.1 45.2 * AT "Jack" "Jack" "Jack" Jack be nimble, Jack be quick, Jack jump over the candlestick. breaks line 45 into 3 lines. 2. Breaks line 46 into 3 lines Another example of the BREAK command with the AT keyword and character strings is: *BREAK 46 46 46.1 46.2 * AT "to" "went" Jack and Jill went up the hill to fetch a pail of water, The BOTH or WORD Keywords and Character Strings 1.
EDIT Command Summary BREAK Command 2. The command: *BREAK 46 AT WORD "ill" 46 Jack and Jill went up the hill to fetch a pail of water, * asks EDIT to break the line at the string “ill” only if “ill” is a word. Line 46 contains “ill” twice, but the string only occurs inside other words. EDIT, therefore, can’t find a string that matches exactly the string on the command line, so it returns line 46 unbroken.
EDIT Command Summary CHANGE Command CHANGE Command The CHANGE command has both of these capabilities: Change occurrences of an existing character string to a new character string in a specified range of lines Change designated columns to a character string in a specified range of lines.
EDIT Command Summary CHANGE Command BOTH tells the EDIT program to change both uppercase and lowercase occurrences of oldstring to newstring. If you omit BOTH, the EDIT program changes only the occurrences of oldstring that exactly match what you type. (See Examples 3, 5, and 6, following.) ALL tells the EDIT program to change all occurrences of oldstring to newstring in a given line. If you omit ALL, the EDIT program changes only the first occurrence of oldstring in a line.
EDIT Command Summary CHANGE Command The quotes (“) surrounding oldstring and newstring are stringfield separators. EDIT also accepts an apostrophe (’) and a slash (/) as a string-field separator. You must, however, use the same separator character throughout a CHANGE command.
EDIT Command Summary CHANGE Command then: Line-range element of the range-specifier parameter *CHANGE ALL "Tom"TOM" ALL 11 TOM, TOM 16 And TOM was beat 17 And TOM went crying 19 TOM, TOM * EDIT searches all lines and changes all occurrences of Tom that it finds on a line to TOM. 2. If line number 19 is the current line and the current file is: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 TOM, TOM The piper's son Stole a pig And away he run.
EDIT Command Summary CHANGE Command 3. If line number 19 is the current line and the current file is: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 tom, TOM The piper's son Stole a pig And away he run. The pig was eat And tom was beat And tom went crying Down the street. tom, TOM The piper's son He learned to play When he was young; But all the tunes That he could play Was "Over the hills And far away.
EDIT Command Summary CHANGE Command 4. If line number 19 is the current line and the current file is: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Thomas, Thomas The piper's son Stole a pig And away he run. The pig was eat And Thomas was beat And Thomas went crying Down the street. Thomas, Thomas The piper's son He learned to play When he was young; But all the tunes That he could play Was "Over the hills And far away.
EDIT Command Summary CHANGE Command 5. If 19 is the current line number and the current file is: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Thomas, Tom The piper's son Stole a pig And away he run. The pig was eat And Tomwas beat, And Tomwent crying Down the street. Thomas, Tom The piper's son He learned to play When he was young; But all the tunes That he could play Was "Over the hills And far away.
EDIT Command Summary CHANGE Command 6. If 19 is the current line and the current file is: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Thomas, TOM The piper's son Stole a pig And away he run. The pig was eat And Tomwas beat, And Tomwent crying Down the street. Thomas, TOM The piper's son He learned to play When he was young; But all the tunes That he could play Was "Over the hills And far away.
EDIT Command Summary CHANGE Command Changing Columns to a String 1. If 19 is the current line number and current file is: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Thomas, TOM The piper's son Stole a pig And away he run. The pig was eat And TOMMY was beat, And TOMMY went crying Down the street. Thomas, TOM The piper's son He learned to play When he was young; But all the tunes That he could play Was "Over the hills And far away.
EDIT Command Summary CHANGE Command 2. If 19 is the current line number and the current file is: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Tom, Tom The piper's son Stole a pig And away he run. The pig was eat And TOMMY was beat, And TOMMY went crying Down the street. Tom, Tom The piper's son He learned to play When he was young; But all the tunes That he could play Was "Over the hills And far away.
EDIT Command Summary DELETE Command DELETE Command The DELETE command removes a range of text lines from the current EDIT file. What to Enter DELETE [ QUIET ] { range-specifier } [ ! ] QUIET tells the EDIT program not to list lines as they are deleted. ! tells the EDIT program not to prompt you for permission to delete more than 10 lines. If you omit the !, for each block of more than 10 lines, the EDIT program prompts you for permission to delete the lines.
EDIT Command Summary DELETE Command Examples 1. If the current file is: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Tom, Tom The piper's son Stole a pig And away he run. The pig was eat And Tom was beat, And Tom went crying Down the street. Tom, Tom The piper's son He learned to play When he was young; But all the tunes That he could play Was "Over the hills And far away." and you issue the command: Line-range *DELETE 15/LAST *DELETE 15/LAST EDIT responds with: RANGE 15/26 CONTAINS 12 LINES.
EDIT Command Summary DELETE Command 2. If the current EDIT file contains 2000 lines numbered from 1 to 2000 and you issue the command: Line-range *DELETE ! 50/700 EDIT deletes lines 50 through 700 without asking you if it’s okay to do so, prints these lines as it deletes them, and makes line number 701 the current line. 3. If the current file is: 1.5 1.8 2.1 2.4 2.7 4 4.3 4.6 Mary had a little lamb Whose fleece was white as snow And everywhere that Mary went The lamb was sure to go.
EDIT Command Summary DELETE Command 4. If the current EDIT file has 2000 lines numbered from 1 to 2000 and if 101 is the current line number, then the command: Line-range-list *DELETE QUIET 5/21 23/27 */1463 prompts: RANGE 5/21 CONTAINS 17 LINES. SHALL I DELETE THEM? If you type Y or y or YES or yes, EDIT deletes lines 5 through 21. (Line number 101 is the current line.) EDIT takes any other reply to mean NO and does not delete lines 5 through 21. (Line number 101 is the current line.
EDIT Command Summary EXIT Command EXIT Command What to Enter How to Use EXIT Examples The EXIT command terminates an editing session. Entering the EXIT command closes the current file (if any), deletes the process associated with the editing session, and returns control to the command interpreter. EXIT Besides using the EXIT command, you can exit from the EDIT program by typing CTRL-Y (press (CTRL) and (Y) at the same time) at the asterisk prompt. 1.
EDIT Command Summary FIX Command FIX Command The FIX command allows you to modify text lines interactively. The FIX command with the COMMAND keyword allows you to modify editor command lines interactively. What to Enter FIX [ range-specifier ] [ COMMAND ] range-specifier indicates combinations of line-range and string-range parameters. Turn to “Range-Specifier Parameter” in Section 5 for a full explanation of this range. COMMAND tells EDIT you want to modify the last editor command line.
EDIT Command Summary FIX Command EDIT prints the new text line and again waits for you to edit it: Jack be nimble, Jack be quite ck EDIT continues to print the new text line until you press on a line: RETURN alone Jack be nimble, Jack be quick RETURN Then EDIT prints the next text line in the range. The FIX command has three subcommands that you can use when editing a text line. They are: D or d (for delete) deletes the character in the text line that is above the D subcommand on the editing line.
EDIT Command Summary FIX Command EDIT treats the first nonblank character in the editing line as the beginning of a subcommand (if the character is an R, I, or D) or the beginning of a replacement string. EDIT also treats the first nonblank character that follows the // character sequence as the beginning of a subcommand.
EDIT Command Summary FIX Command Examples: Fixing a Text Line 1. Deleting Characters The D subcommand deletes any character above it. If line 5.3 of the current file is: Little Jack Horner sat in the corner and you want to change that line to: Jack sat in the corner then use the command: *FIX 5.3 5.3 Little Jack Horner sat in the corner ..........ddddddd ddddddd 5.3 Jack sat in the corner ..........(RETURN) * The D subcommand can be followed by another subcommand. See Example 5, following. 2.
EDIT Command Summary FIX Command you can change them to: 3 4 Mary Mary quite contrary How does your garden grow? with the command: *FIX 3/4 3 Mary Mary contrary .......... i quite 3 Mary Mary quite contrary .......... RETURN 4 How do you grow? .......... ies 4 How does you grow? .......... ir garden 4 How does your garden grow? .......... RETURN * 3. Replacing Characters To use the R subcommand, you type the letter R on the editing line underneath the first character in the text line to be replaced.
EDIT Command Summary FIX Command with the command: *FIX 3 3 Singing at the window, crying through the lock, ..........RRapping 3 Rapping at the window, crying through the lock, .......... RETURN * 4. Replacing Characters If a string on the editing line does not begin with the R, I, or D subcommand, EDIT treats the string as a replacement string. The characters in the replacement string replace the characters in the text line on a one-for-one basis.
EDIT Command Summary FIX Command However, to change the line: 3 Singing at the window, crying through the lock, to: 3 Rapping at the window, crying through the lock, you must use the R subcommand since the replacement string Rapping begins with an R. If you do not precede this replacement string with the R subcommand, the result is: *FIX 3 3 Singing at the window, crying through the lock, ..........Rapping 3 appingg at the window, crying through the lock, ..........
EDIT Command Summary FIX Command you must use the R subcommand since the replacement string down begins with a d. If you do not precede this replacement string with the R subcommand, the result is: *FIX 5 5 Who sat here beside her, .......... down 5 Who sat own beside her, .......... RETURN * 5. Typing Two or More Subcommands on an Editing Line When you want to give another subcommand on the same editing line as the I or R subcommand, use the character sequence // to terminate the R or I subcommand.
EDIT Command Summary FIX Command use the command: *FIX 1 1 Georgie pudding and pastry pie, .......... iPorgie, // ddddddd 1 Georgie Porgie, pudding and pie, .......... RETURN * When you want to give another subcommand on the same editing line as a replacement string, use the character sequence // to terminate the replacement string. Then give the next subcommand.
EDIT Command Summary FIX Command When you want to give another subcommand on the same editing line as the D subcommand, you do not need to use the character sequence // to terminate the D subcommand. For example, to change the string: 3 When the bullies came out to play, to: 3 When the boys came out to play, use the command: *FIX 3 3 When the bullies came out to play, .......... dddddddiboys 3 When the boys came out to play, .......... RETURN * 6.
EDIT Command Summary FIX Command and you issue the following command and perform the following sequence of fixes: *FIX 1/3 1 Georgie pudding and pastry pie, .......... i Porgie,// ddddddd 1 Georgie Porgie, pudding and pie, .......... RETURN 2 Tickled the girls and made them shy; ..........Pinched 2 Pinched the girls and made them shy; .......... cry 2 Pinched the girls and made them cry; ..........
EDIT Command Summary FIX Command Fixing an Editor Command You use the FIX COMMAND command to alter the last editor command line. You will find the FIX COMMAND form useful when you enter a long string of commands and one of them fails due to a typographical error. For example, the commands: 20 FILES $SYSTEM.USER MYPOEM OLDPOEM 21 EDIT OLDPOEM TEXT EDITOR - T9601B30 - (08MAR87) CURRENT FILE IS $SYSTEM.USER.OLDPOEM *GET MYPOM 1/10 TO LAST;LIST LAST-10/LAST returns the error message: ??:011 FILE $SYSTEM.
EDIT Command Summary FIX Command The R, I, and D subcommands work exactly the same when you’re editing a command line as they do when you’re editing a text line. When you’re through editing, EDIT re-executes the command line. For example: (COMMAND GET MYPOM 1/10 TO LAST;LIST LAST-10/LAST .......... ie (COMMAND) GET MYPOEM 1/10 TO LAST;LIST LAST-10/LAST .......... RETURN LAST NEW LINE IS 1457 <- 10 CURRENT FILE IS $SYSTEM.USER.
EDIT Command Summary GET Command GET Command The GET command is a versatile command that can do all of the following: Specify an EDIT file and make it the current file for editing. (See “Making an EDIT File the Current File for Editing,” following.) Select all or part of an existing EDIT file, create a new file containing the selected part, and make the new file the current file for editing. (See “Using an Existing File to Create a New Current File,” following.
EDIT Command Summary GET Command The syntax of the GET command to accomplish the second through fifth items mentioned above is: GET filename1 [ { line-range-list } ] [ { NUM ordinal-range-list } ] [ { PUT filename2 [ ! ] [ { TO { line [ BY incr [ { { SAME [ KEEP ] } ] ] } } ] } } ] filename1 is the name of an EDIT file, the name of a nondisk device, or the name of a non-EDIT-format disk file. The GET command accepts a full or a partial file name.
EDIT Command Summary GET Command NUM tells the EDIT program to add the lines specified in the ordinal-rangelist parameter from filename1 to the current file. The NUM keyword always precedes the ordinal-range-list value. ordinal-range-list references the literal position of one or more lines in your file. Turn to “Ordinal-Range-List Parameter” in Section 5 for a full explanation of this range.
EDIT Command Summary GET Command incr is a number from .001 through 10. SAME tells the EDIT program not to renumber lines from filename1 when they are added to the current file. (See “Adding All or Part of an EDIT File to the Current File,” following.) KEEP tells the EDIT program to retain the lines in the current file that have the same line numbers as those in filename1. If you omit KEEP, the EDIT program replaces lines in the current file.
EDIT Command Summary GET Command Using an Existing File to Create a New Current File 1. The command: *GET AESOP PUT FABLE CURRENT FILE IS $WORK.FICTION.FABLE * copies the entire contents of the file AESOP into the file FABLE and makes FABLE the current EDIT file. 2. The command: *GET SHAKE 10/250 PUT ROMEO CURRENT FILE IS $WORK.FICTION.ROMEO * copies lines 10 through 250 of the file SHAKE into the file ROMEO and makes ROMEO the current EDIT file. 3.
EDIT Command Summary GET Command 4. The command: *GET SHAKE 20/100 NAME THE NEW FILE: LYRIC CURRENT FILE IS $WORK.FICTION.LYRIC * omits the PUT keyword, and EDIT prompts for a file name. You name the new file LYRIC. LYRIC becomes the current file. Lines 20 through 100 are copied into LYRIC. If you do not name the new file (if you press BREAK , RETURN , or type CTRL-Y at the prompt), EDIT creates a temporary current file.
EDIT Command Summary GET Command Adding All or Part of an EDIT File to the Current File 1. If the current file is RHYME, the command: *GET JACK 10/20 TO LAST LAST NEW LINE IS 916 <- 20 CURRENT FILE IS $WORK.FICTION.RHYME * copies lines 10 through 20 of JACK to the last line of RHYME. The message: LAST NEW LINE IS 916 <- 20 tells you that: Line number 20 from JACK is the last line added to RHYME Line number 20 from JACK is now line number 916 in RHYME 2.
EDIT Command Summary GET Command tells you that: Line number 60 from JILL is the last line added to RHYME Line number 60 from JILL is now line number 1021.1 in RHYME 3. If the current file is RHYME, the command: *GET PEEP 75/85 TO SAME CURRENT FILE IS $WORK.FICTION.RHYME * copies lines 75 through 85 of PEEP into RHYME without renumbering. If a duplicate line number exists, the lines from PEEP replace the corresponding lines in RHYME. 4.
EDIT Command Summary GET Command 5. If the current file is MAX, the commands NUMBER and GET: *NUMBER ALL *GET SMITH 55/66 TO 0 LAST NEW LINE IS .92 <- 66 CURRENT FILE IS $WORK.FICTION.MAX * renumbers lines in MAX making the first line in the file line number 1, then copies lines 55 through 66 of SMITH into MAX starting at line number 0 (that is, copies SMITH to the beginning of MAX).
EDIT Command Summary GET Command 2. Omits the PUT keyword This second example illustrates using a non-EDIT-format disk file with the GET command. *SET INLEN 128 *GET TEST NAME THE NEW FILE: NEWTEST * EDIT reads 128-byte records from the disk file named TEST until the end-of-file. The data is put into the EDIT file named NEWTEST. Adding Text From a Nondisk Device or Non-EDIT-Format Disk File The commands: *SET INLEN 100 *GET $TAPE NUM 30/50 TO 995.
EDIT Command Summary IMAGE Command IMAGE Command The IMAGE command replaces a portion of a line of text (line segment) with new text. You reference the line segment that you want to replace by specifying the character strings that surround it. What to Enter [ IMAGE [ [ [ QUIET WORD BOTH ALL ] ] {"[lstring]"[newstring]"[rstring]" } ] {END "[lstring]"[newstring]" } ] [ { string-range-list } [ RANGE string-range-list ] ... ] QUIET tells the EDIT program not to list lines as they are changed.
EDIT Command Summary IMAGE Command ALL tells the EDIT program to change all occurrences of the line segment that it finds in a line. If you omit ALL, the EDIT program changes only the first occurrence of the line segment that it finds in a line. lstring is a character string immediately preceding (to the left of) the line segment that you want to replace with new text. You can also enclose lstring within a pair of right slants (/) or single apostrophes (’) as well as in quotes.
EDIT Command Summary IMAGE Command string-range-list references one or more character strings in one or more lines of an EDIT file. Turn to “String-Range-List Parameter” in Section 5 for a full explanation of this range. RANGE is a keyword that tells EDIT to look for the “string” in the indicated line-range or string-range.
EDIT Command Summary IMAGE Command 2. Any of the strings lstring, newstring, or rstring may be null. If lstring is null, newstring is inserted before rstring and begins in column 1. (All the original text that preceded rstring is replaced with newstring.) For example: *LIST 3 3 And the rain was upon the earth forty days and *IMAGE ""It rained "forty" 3 3 It rained forty days and forty * If newstring is null, the EDIT program deletes all the characters between lstring and rstring.
EDIT Command Summary JOIN Command JOIN Command What to Enter The JOIN command treats a contiguous block of nonblank lines as a paragraph. Within a paragraph, the JOIN command moves words between lines so that each line contains as many words as possible within a specified width. A word is defined as (1) any character string that is preceded and followed by a space or any character other than a number or letter or (2) any character string that occurs at the end of a line.
EDIT Command Summary JOIN Command How to Use JOIN The JOIN command is intended to be used with textual material rather than source program lines. JOIN retains any leading (that is, left-side) indentation. JOIN stops filling lines when it encounters a blank line. However, if a blank line is contained within a specified range of lines, JOIN resumes filling lines at the next nonblank line. JOIN continues to fill lines until it reaches the last line in the range.
EDIT Command Summary JOIN Command The commands in the preceding example use both the SET JOIN and the JOIN commands to illustrate how to reset the default join width, how to join lines to a specified width, and how to join lines to a new default join width (reset with the SET command). See the SET command description later in this section for more information about SET JOIN. Tips SET JOIN width changes the setting of the join width from 70 (the default join width) to the value you specify for width.
EDIT Command Summary LIST Command LIST Command The LIST command: Lists text lines in the current file on the home terminal, on a line printer, or to a process. (See Example 1, following.) Transfers text to non-Tandem systems by means of a non-disk device such as a magnetic tape unit. (See Example 2, following.) Writes fixed-length text records in non-EDIT-format disk files. (See Example 3, following.
EDIT Command Summary LIST Command listfile is $device name, $logical device number, or the name of a nonEDIT-format disk file. range-specifier indicates combinations of line-range and string-range parameters. Turn to “Range-Specifier Parameter” in Section 5 for a full explanation of this range. How to Use LIST If you omit the OUT parameter, listing occurs on the device specified in the OUT filename parameter of the command to run the EDIT program.
EDIT Command Summary LIST Command Examples Displaying Text Lines 1. The following command lists the block of text beginning at line number 35 and ending at line number 36 and puts a column number template above each line listed: *LIST COL 35/36 ....+....1....+....2....+....3....+....4....+....5.. 35 Text is added beginning at the line specified in the ....+....1....+....2....+....3....+....4.. 36 line parameter.
EDIT Command Summary LIST Command 3. The following command lists the line numbers of all lines in which the string The editor occurs in the range from line number 1000 to the end of the file: *LIST SEQ "The editor" RANGE 1000/LAST 1008 1010 1012 1025 1050 1055 1071 1072 1138 1139 1152 1164 1192 1202 * 4. 1030 1078 1166 1032 1096 1178 The following command lists the entire current file to the process named $S.
EDIT Command Summary LIST Command Listing Text Into a Non-EDIT-Format Disk File When you list text into a non-EDIT-format disk file, EDIT writes fixedlength records, padded with trailing blanks if necessary, of the length specified by the OUTLEN parameter of the SET command. The LIST command does not create a disk file. Therefore, you must use the CREATE command at the command interpreter to create the disk file before you issue the LIST command. Study the following example.
EDIT Command Summary MOVE Command MOVE Command What to Enter The MOVE command moves or copies text lines from one location to another location in the current file. MOVE [ QUIET ] { line-range TO line } [ BY line ] [, { line } [ BY line ] ] ... [ COPY ] QUIET tells the EDIT program not to list lines as they are COPY tells the EDIT program to move a copy of the original text one or more destinations. (See Example 2, following.
EDIT Command Summary MOVE Command line is all the characters that have the same line number. BY specifies the numbering increment of the line numbers assigned to the moved text. If you omit BY, EDIT chooses the increment (either 1, .1, .01, or .001). EDIT chooses the increment that has the same number of digits as the fractional part in the line variable or is less than the difference between the destination line number and the next existing line number. incr is a number from .001 through 10. Examples 1.
EDIT Command Summary MOVE Command 3. The following command moves the text on line numbers 500 through 505 to the end of the file. The numbering increment between the new line numbers is 10. The lines of text are not listed as they are moved. Line numbers 500 through 505 disappear.
EDIT Command Summary NUMBER Command NUMBER Command The NUMBER command renumbers lines in the current file. The NUMBER command does not alter the order in which the lines of text occur. What to Enter NUMBER { line-range } [ TO line-num ] [ BY incr ] line-range references one or more contiguous lines in an EDIT file. Turn to “LineRange Parameter” in Section 5 for a full explanation of this range. TO specifies the first line number to be assigned to the renumbered lines.
EDIT Command Summary NUMBER Command incr is a number from .001 through 10. If you specify an increment that requires line numbers to exceed 99999.999, EDIT ignores the increment you specify and renumbers the entire file starting at 1 by an increment of 1. How to Use NUMBER You can use the NUMBER command when you want to reassign the line numbers in your file or to create room within your file to insert text.
EDIT Command Summary NUMBER Command Examples 1. The command: *NUMBER ALL * renumbers the entire current text file. The first line is assigned line number 1 and the increment between lines is 1. 2. The command: *NUMBER 20/30 * renumbers lines 20 through 30 in place. The line-to-line numbering assigns even increments to the new line numbers even if there are more than 11 lines in the range. 3. The command: *NUMBER ALL TO 1 BY 2 * renumbers the entire current text file.
EDIT Command Summary NUMBER Command 4. If you specify TO line-num but do not specify a BY parameter, EDIT chooses an increment (that is, 1, .1, .01, or .001) that either has the same number of digits as the fractional part in the line number or is less than the difference between the TO line-num and the next existing line number. For example, entering the command: *NUMBER 100/110 TO 100.
EDIT Command Summary OBEY Command OBEY Command What to Enter The OBEY command reads editor commands and text from a file. OBEY [ filename [ QUIET ] ] filename is the name of a command file that contains editor commands and, possibly, text. The file can be an unstructured, EDIT format, or structured disk file, a nondisk device, or a process. EDIT reads records from the command file until it detects the end-of-file, it reads an OBEY command with no filename, or an error occurs.
EDIT Command Summary OBEY Command If your command file includes an ADD command, EDIT treats every line after the ADD command as text until it reads a line that contains two consecutive right slants (//) in columns 1 and 2. For example: ADD 100 This is text being added to the current file. Text is added until EDIT encounters only two consecutive right slants in columns 1 and 2 // Placing the double slant directly in your text in columns 1 and 2 can be tricky.
EDIT Command Summary OBEY Command If you include an OBEY command in an EDIT command line, EDIT executes all the other commands in the command line before executing the OBEY file. For example, the following command line: 24> EDIT EXAMPLE; OBEY TABS; SET JOIN 65; NUMBER ALL Starts EDIT on the file named EXAMPLE Sets the default join width to 65 characters Renumbers all line numbers in the file EXAMPLE starting at 1 EDIT executes these three commands first without obeying the file named TABS.
EDIT Command Summary OBEY Command 2. If the command file named INDEX contains the following lines: These lines beginning with asterisks are comment lines. Command lines Double slants indicate the end of the text.
EDIT Command Summary OBEY Command 3. If your command line includes more than one OBEY command: 1> EDIT MYFILE; OBEY AFILE; OBEY BFILE; OBEY CFILE EDIT opens MYFILE for editing, then skips to the last OBEY command on the command line and obeys the command file CFILE. EDIT ignores the other OBEY commands on the command line.
EDIT Command Summary PUT Command PUT Command You can use the PUT command for two main purposes: Making the current file more compact.
EDIT Command Summary PUT Command ! tells the EDIT program to continue with the PUT operation even though you have specified the file name of an existing file. If you omit filename or if you specify the file name of the current file, the ! character tells the EDIT program to compress the current file to make it more compact. line-range-list references one or more contiguous lines or blocks of text in an EDIT file. Turn to “Line-Range-List Parameter” in Section 5 for a full explanation of this range.
EDIT Command Summary PUT Command Examples Copying All or Part of the Current File Into a New File 1. The command: *PUT PUPPY ! * copies all of the current file into a new file named PUPPY. If a file named PUPPY already exists, the existing file is purged and a new file is created. 2. The following command copies lines containing the string JACK within the range of lines 100 through 1000 into a new file named HORNER.
EDIT Command Summary PUT Command 2. Type this command at the command interpreter (rather than at the EDIT prompt) FUP INFO filename, DETAIL to see the number of extents (physical space) allocated to an EDIT file before and after you use the PUT ! command to compress the file. For example, the FUP INFO command returns information about any specified file. You want to look at the values displayed for EXT, BUFFERSIZE, EOF, and EXTENTS ALLOCATED. Study the following example. 27> FUP INFO NEW1, DETAIL $WORK.
EDIT Command Summary PUT Command The command: 28> EDIT NEW1; PUT !; EXIT compresses NEW1. The results of one compression are: Notice that compressing a file affects seven fields. 29> FUP INFO NEW1, DETAIL $WORK.FICTION.NEW1 TYPE U CODE 101 EXT ( 7 PAGES, 7 PAGES ) MAXEXTENTS 16 BUFFERSIZE 4096 OWNER 8,13 SECURITY (RWEP): CUCU MODIF: 8/17/87 12:07 CREATION DATE: 8/17/87 12:07 LAST OPEN: 8/17/87 12:07 EOF 172 (0.
EDIT Command Summary QUERY Command QUERY Command What to Enter The QUERY command displays the name of the current file, the current settings of EDIT control options, and the size and amount of disk space in use by the current file. [ setoption [, setoption ... ] ] QUERY [ NAME ] setoption is one or more of the following keywords: BLOCK CONTROL DITTO FREQ INLEN JOIN OUTLEN QUIET SHIFT TABS Each of these keywords is an option that you can control using the SET command.
EDIT Command Summary QUERY Command Examples 1. The command: *QUERY returns information about the current file in the following format: FILE $volname.subvolname.filename, setoption, setoption, SPACE USED end-of-file / filesize SLACK percentage where: $volname.subvolname.filename is the full name of the current EDIT file. See “How EDIT Files Are Named” in Section 6 for information on EDIT file names. setoption, setoption, is information on each of the possible set options.
EDIT Command Summary QUERY Command 2. If this command: *QUERY CONTROL, TABS, INLEN returns the following information: NOCONTROL, TABS 5 7 9, INLEN 132 it means that the NOCONTROL option is in effect; that TABS are set to columns 5, 7, and 9; and that INLEN is set to 132 bytes.
EDIT Command Summary REPLACE Command REPLACE Command What to Enter The REPLACE command replaces all the text on a line with new text. There are two forms of the REPLACE command: the explicit form and the implicit form (see the examples that follow). The syntax of the explicit REPLACE command is: REPLACE [ QUIET ] { range-specifier } QUIET tells the EDIT program not to list the existing line of text prior to deleting it. range-specifier indicates combinations of line-range and string-range parameters.
EDIT Command Summary REPLACE Command replacementtext is text. If you omit replacementtext and lnum references an existing line, EDIT deletes the current text on lnum and leaves a blank line. If you omit replacementtext and lnum references a line that does not exist, EDIT adds a blank line. The quote character (”) is a string-field separator. You can also use a right slash (/) or an apostrophe (’) for a string field separator.
EDIT Command Summary REPLACE Command Examples: Using the REPLACE Command Explicitly 1. Suppose the current file contains these lines: 1 2 3 Little Jack Horner Sat in a corner Eating dumplings. With the following series of commands, you replace the text on line number 3 and then list the result: Displays the current text on line 3, then prompts for new text with that line number. 4–102 *REPLACE 3 3 Eating dumplings. 3 Eating a Christmas pie. *LIST 3 3 Eating a Christmas pie.
EDIT Command Summary REPLACE Command 2.
EDIT Command Summary REPLACE Command Examples: Using the REPLACE Command Implicitly Suppose the current file contains this text: 3 4 5 6 7 8 Persons will be persons will be persons will be attempting to find a motive in this narrative prosecuted; attempting to find a moral in it banished; attempting to find a plot in it shot.
EDIT Command Summary REPLACE BLOCK Command REPLACE BLOCK The REPLACE BLOCK command lets you edit text, a block at a time, with Command the EDIT program, which is primarily designed as a line editor. This command is useful only if you have a terminal with full-screen capabilities; see Appendix C, “Page Mode Editing.
EDIT Command Summary SET Command SET Command What to Enter The SET command sets various internal parameters that control the EDIT program and provides the user with greater flexibility when creating and working in a file. SET setoption [, setoption ...
EDIT Command Summary SET Command Note Page mode editing commands do not work with TTY terminals, which display one line at a time and do not have full-screen capabilities. Therefore, while using EDIT, which is mainly a line editing program, you might never use REPLACE BLOCK or assign a value to the BLOCK setoption of the SET command. CONTROL NOCONTROL CONTROL tells EDIT to process control characters that you type as significant characters.
EDIT Command Summary SET Command FREQ frequency You use FREQ to balance the two conflicting needs of good resource utilization and failure recovery. FREQ sets the maximum number of lines that can be altered by commands without the altered line(s) being written out to the disk file (alterations and additions to text are made in memory and buffered for later output to disk). You can set frequency from 1 to any number you feel is practical. Ten lines is the default frequency. (See Example 4, following.
EDIT Command Summary SET Command QUIET NOQUIET A number of commands (such as REPLACE and CHANGE) have a QUIET keyword that suppresses the listing of altered lines. QUIET used with the SET command suppresses the listing of altered or deleted lines as the default for all the other editor commands that accept QUIET. NOQUIET reenables the listing of altered or deleted lines in all the other editor commands that accept QUIET. NOQUIET is the default. (See Example 5, following.
EDIT Command Summary SET Command Examples 1. The command: *SET SHIFT *ADD 1 1 Lump the whole thing! 2 Say that the Creator made Italy from designs 3 by Michael Angelo! *LIST 1/3 1 LUMP THE WHOLE THING! 2 SAY THAT THE CREATOR MADE ITALY FROM DESIGNS 3 BY MICHAEL ANGELO! * sets the setoption SHIFT so that EDIT changes all alphabetical characters to uppercase, no matter how you entered them. 2.
EDIT Command Summary SET Command 3. The following command converts horizontal tab characters to single blanks: *SET TABS * The following command sets the tabs in columns 5, 10, and 20: *SET TABS 5 10 20 * With TABS set to these columns, if you type the text: A(CTRL-I)B(CTRL-I)C(CTRL-I)D the text may look incorrect on the screen but when you list the line you will see that your EDIT file is correct. For example: As soon as you type CTRL-I, the cursor jumps down to the next line. Don't worry.
EDIT Command Summary SET Command When the CONTROL and NOTABS set options are in effect, EDIT adds CTRL-I characters to your EDIT file and does NOT convert them to blanks. To change tab positions, enter a new SET TABS command with the new position(s) specified. When you specify new tab positions, EDIT clears the old tab positions. If you horizontal tab past the last tab position, EDIT converts the horizontal tab to a single blank. 4.
EDIT Command Summary SET Command 6. The following command causes a block of ten lines to appear for editing by a REPLACE BLOCK command. (Recall that terminals that can’t accommodate page mode editing ignore the BLOCK setoption and can’t use the REPLACE BLOCK command; see the previous description of the BLOCK option under “What to Enter.”) Given a 24-line screen, this command presents ten lines at a time and allows you to add up to 14 more lines of text: *SET BLOCK 10 * 7.
EDIT Command Summary SET Command enters the following into the EDIT file: 1064 Nut 1132 Bolt 34 A 34 A You can also use DITTO with the TABS feature. For example, the commands: *SET TABS *ADD 1 2 3 *LIST 1/2 1 2 * 10, DITTO & Hammer horizontal tab$24.00 Saw horizontal tab& // Hammer Saw $24.00 $24.00 tell EDIT how to set up the two-column text and what text to duplicate in column 2.
EDIT Command Summary TEDIT Command TEDIT Command The TEDIT command allows you to start the PS TEXT EDIT (TEDIT) editing program from EDIT. What to Enter TEDIT [ filename ] [ TEDIT open option ] [ ; TEDIT commands ] filename is the name of a file. If you do not specify filename, TEDIT opens the current file with the open options currently in effect. The TEDIT command accepts a full or a partial file name. (See “How EDIT Files Are Named” in Section 6 for information on file names.
EDIT Command Summary TEDIT Command ! creates filename if filename doesn’t exist, without prompting you with a confirmation message. ? starts the HELP program for TEDIT. If you do specify open option, you must also specify TEDIT commands is a list of one or more TEDIT commands. Separate multiple TEDIT commands with a semicolon. How to Use TEDIT The TEDIT command is particularly useful when you want to use TEDIT from a program that starts EDIT as the default editor.
EDIT Command Summary TEDIT Command Examples The following examples illustrate how you can use the TEDIT command. 1. The command: *TEDIT MYFILE ! tells EDIT to start TEDIT for editing the file named MYFILE. The ! character tells TEDIT to create the file without prompting you if MYFILE doesn’t already exist. 2.
EDIT Command Summary XEQ Command XEQ Command 4–118 The XEQ command starts the EDIT VS program, the screen editor. This command is useful only if you have a terminal with full-screen capabilities; see Appendix C, “Page Mode Editing.
EDIT Command Summary ENV Command ENV Command The ?ENV command lists the current system name and volume name. What to Enter ?ENV [ SYSTEM ] [ VOLUME ] SYSTEM tells EDIT to list the current system name. If you have not used the ?SYSTEM command to change the current system, the ?ENV command returns a blank field. (See Example, following.) VOLUME tells EDIT to list the current volume name and subvolume name. Example The following example illustrates the use of the ?ENV command.
EDIT Command Summary FILES Command FILES Command The ?FILES command lists the file names of all the files in a subvolume. What to Enter ?FILES [ [ \sysname. ] [ $volname. ] [ subvolname ] ] \sysname is a system name. If you omit \sysname, EDIT uses the current system name. $volname is a volume name. (See “How EDIT Files Are Named” in Section 6 for information on volume names.) If you omit $volname, EDIT uses the current volume name. subvolname is a subvolume name.
EDIT Command Summary FILES Command Examples 1. The following command lists the files on the current subvolume: *?FILES LETTER * 2. TMSHT TMST1 The following command lists the files in the subvolume FICTION on the volume $WORK: *?FILES $WORK.
EDIT Command Summary ?SYSTEM Command ?SYSTEM Command The ?SYSTEM command sets the current system. What to Enter ?SYSTEM [ \sysname ] \sysname is a system name. If you do not give a system name, EDIT sets the current system to the system that was current when you started the EDIT program.
EDIT Command Summary ?VOLUME Command ?VOLUME Command What to Enter The ?VOLUME command sets the current volume and subvolume. ?VOLUME [ [ $volume.] [ subvolume ] ] $volname is a volume name. (See “How EDIT Files Are Named” in Section 6 for information on volume names.) If you omit $volname, EDIT sets the current subvolume on the current volume. subvolname is a subvolume name. (See “How EDIT Files Are Named” in Section 6 for information on subvolume names.
EDIT Command Summary ?VOLUME Command This series of commands does these five things: 4–124 1. The EDIT command starts the EDIT program. 2. The ?VOLUME command makes $FUN.GAMES the current subvolume. 3. The ?FILES command lists the files in the current subvolume ($FUN.GAMES). 4. The ?VOLUME command moves you back to the volume and subvolume that was current when you started the EDIT program ($WORK.FICTION) 5. The GET and PUT commands places the contents of $FUN.GAMES.
5 Range Summary Introduction to Ranges Most of EDIT commands require you to specify a range parameter. A range parameter tells the command which line or lines of text, column or columns, or specific string or strings to operate on. Assume you have an EDIT file named AESOP that contains the lines: 12 13 14 15 16 17 18 19 20 21 22 The boy called out "Wolf, Wolf!" and the villagers came out to help him. A few days afterward he tried the same trick, and again they came to his help.
Range Summary Introduction to Ranges When referring to columns, recall that an EDIT file generally appears as numbered from column 1 at the leftmost edge to column 80 at the rightmost edge of your screen; an EDIT file has a maximum width of 255 columns. A column is all the blank and nonblank characters that have the same column number in your file. For example, these highlighted characters: The boy called out "Wolf, Wolf!" and the villagers came out to help him.
Range Summary Introduction to Ranges Figure 5-1 illustrates the concept of line and column ranges. Figure 5-1. Concept of Ranges (Lines and Columns) Column range For this exercise in ACCOUNTING 1A, you will use just part of the tax table on the W-4 form for employees withholding allowances. Table 1-B contains the information that we will be using this week. Do not lose this copy; you will need it for subsequent exercises.
Range Summary Introduction to Ranges and this command line contains a line-range-list (multiple line-range) parameter: *LIST 10/20 35 44/LAST A range-list parameter appears in any editor command syntax that accepts optional repetitions of the simpler range. Each range-list parameter is described in context with its appropriate range. All range parameters are summarized in Table 3. You can also turn to the RANGE tabs later in this section for detailed descriptions of each of the range parameters.
Range Summary Introduction to Ranges Consequently, some valid JOIN commands are: Joins text at line number 12.01 through the last line in the file to the default join width Joins text of the first line of file to the default join width Joins the current line to the default join width *JOIN FIRST *JOIN 12.01/LAST Joins all lines in the file to a width of 45 characters *JOIN ALL WIDTH 45 *JOIN * An asterisk (*) in a range parameter references the current line.
Range Summary Introduction to Ranges Table 5-1.
Range Summary Introduction to Ranges Table 5-1.
Range Summary Introduction to Ranges Table 5-1.
Range Summary Line-Range Parameter Line-Range Parameter The line-range parameter references one or more contiguous lines in an EDIT file by specifying a line number or a keyword, optionally followed by a signed number (see offset, following). Syntax of the Line-Range Parameter line-range: one of ALL line [ / line ] ALL is all lines in your file. line [ / line ] is one or more lines you indicate either by a number, keyword, or a symbol.
Range Summary Line-Range Parameter LAST is the last line in your file. * is the current line. offset is a whole number that EDIT uses to compute how many lines to add to or subtract from line to arrive at the desired line. Examples 1. When you specify a single line number as the range in an editor command, the command affects just that line. If the current file is: 1.1 1.2 1.3 1.4 1.5 1.6 I'd be tender. I'd be gentle. And awfully sentimental Regarding love and art.
Range Summary Line-Range Parameter 2. If the current EDIT file is: 23 24 25 26 27 Mary had a little lamb, Little lamb, Little lamb. Mary had a little lamb, Whose fleece was white as snow. then: Lists line 23 *LIST FIRST 23 Mary had a little lamb, *LIST LAST 27 Whose fleece was white as snow. * Lists line 27 3. If the current EDIT file is: .01 .02 .03 .04 .05 .06 .07 .08 Humpty Dumpty Sat on a wall. Humpty Dumpty Had a great fall.
Range Summary Line-Range Parameter 4. If the current EDIT file is: 3 4 5 6 6.1 6.2 7 8 The itsy bitsy spider Went up the water spout. Down came the rain And washed the spider out. Out came the sun And dried up all the rain. Then the itsy bitsy spider Went up the spout again. then the commands in the following example cause EDIT to respond in this sequence: The first command lists the block of text bound by line number 6 and line number 7, which is the current line.
Range Summary Line-Range Parameter *LIST 6/7 6 6.1 6.2 7 *LIST 7/3 And washed the spider out. Out came the sun And dried up all the rain. Then the itsy bitsy spider |Lo -- ERROR -ALL RANGES MUST BE GIVEN AS LOWER/HIGHER *LIST FIRST/*-3 3 The itsy bitsy spider 4 Went up the water spout. 5 Down came the rain 6 And washed the spider out. *LIST */LAST 6 And washed the spider out. 6.1 Out came the sun 6.2 And dried up all the rain. 7 Then the itsy bitsy spider 8 Went up the spout again. *LIST 6.1/6.1 6.
Range Summary Line-Range-List Parameter Line-Range-List The line-range-list parameter is based on the line-range parameter. It allows Parameter an optional repetition of the line-range parameter when an editor command will accept it. Because the repetition of the line-range is optional, an editor command offers more flexibility when the syntax specifies a line-range- list. A line-range-list parameter can represent a single line of text as well as something as complex as separate groups of text in a file.
Range Summary Line-Range-List Parameter Examples 1. If the current EDIT file is: 1.1 1.2 1.3 1.4 2.1 2.2 2.3 2.4 2.5 2.6 2.7 2.8 There was a maid on Scrabble Hill, And if not dead, she lives there still; She grew so tall, she reached the sky, And on the moon, hung clothes to dry. Wee Willie Winkie Runs through the town, Upstairs and downstairs, In his nightgown; Rapping at the window, Crying through the lock, "Are the children in their beds? Now it's eight o'clock." then: *LIST 1.1 1.1 2.1 2.4 2.5 2.
Range Summary Line-Range-List Parameter 2. If the current file is: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 Tom, Tom The piper's son Stole a pig And away he run The pig was eat And Tom was beat, And Tom went crying Down the street. Tom, Tom The piper's son He learned to play When he was young; But all the tunes That he could play Was "Over the hills And far away.
Range Summary Line-Range-List Parameter If you change the command and specify: *LIST *-10 *-5/*-4 *-13 16 And Tom was beat, 21 He learned to play 22 When he was young; 13 Stole a pig * then EDIT lists lines 16, 21, 22, and 13. Notice that line number 26 remains the current line until EDIT executes the command, then line number 13 becomes the current line. 4. If the current file is: 1 2 3 4 Mary had a little lamb Whose fleece was white as snow And everywhere that Mary went The lamb was sure to go.
Range Summary String-Range Parameter String-Range The string-range parameter is a character string, accompanied by optional Parameter keywords, that references one or more lines in an EDIT file.
Range Summary String-Range Parameter BOTH tells EDIT command to find the lines in the EDIT file that contain both uppercase and lowercase occurrences of the character string string If you omit BOTH, EDIT only finds the occurrences of string that exactly match what you type. WORD tells EDIT command to find the lines in the EDIT file in which the character string string is a word.
Range Summary String-Range Parameter NUM ordinal-range-list is the keyword NUM followed by an ordinal-range-list, indicating that EDIT should search for the occurrences of string at one or more ordinal positions (first, third, seventh, and so on) of lines in the file. (See the following Ordinal-Range-List description.
Range Summary String-Range Parameter A word is defined as (1) any character string that is preceded and followed by a space or any character other than a number or letter or (2) a character string that occurs at the end of a line. For example, if your file contains the lines: Old King Cole was a merry old soul, And a merry old soul was he; He called for his pipe, and he called for his bowl, And he called for his fiddlers three.
Range Summary String-Range Parameter Examples The current EDIT file for the following examples is: 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 1. Tom, Tom The piper's son Stole a pig And away he run. The pig was eat And Tom was beat, And Tom went crying Down the street. Tom, Tom The piper's son He learned to play When he was young; But all the tunes That he could play Was "Over the hills And far away." The command: *LIST BOTH "he" 12 The piper's son 14 And away he run.
Range Summary String-Range Parameter 2. The command: *LIST BOTH WORD "he" 14 And away he run. 21 He learned to play 23 When he was young; 24 That he could play * lists every line in the file that contains the word he, HE, He, or hE. 3. The command: *LIST NOT BOTH "tom" 12 The piper's son 13 Stole a pig 14 And away he run. 15 The pig was eat 18 Down the street. 20 The piper's son 21 He learned to play 22 When he was young; 23 But all the tunes 24 That he could play 25 Was "Over the hills 26 And far away.
Range Summary String-Range Parameter 5. The command: *LIST "he" COL 3:10 18 Down the street. 22 When he was young; 24 That he could play * lists the lines that contain the character string he between columns 3 and 10. 6. The command: *LIST WORD "as" * lists no lines because any occurrences of as do not meet the word criteria explained previously in “How to Use the String-Range Parameter.” (Compare with the next example.) 7.
Range Summary String-Range-List Parameter String-Range-List The string-range-list parameter is based on the string-range parameter. It Parameter allows an optional repetition of the string-range parameter when an editor command will accept it. Because the repetition of the string-range is optional, an editor command offers more flexibility when the syntax specifies a string-range- list. A string-range-list parameter can represent one or many character strings.
Range Summary String-Range-List Parameter 1. The command: Separate the two string-range parameters with a comma. *LIST BOTH "you", "yes" 18 Have you any wool? 26 Have you any wool? 19 Yes sir, yes sir 27 Yes sir, yes sir * Lists all lines containing the first string, then all lines containing the second string lists all the lines containing either of the strings you or yes. 2.
Range Summary Column-Range Parameter Column-Range The column-range parameter describes one or more columns that you Parameter indicate with numbers or a keyword. Syntax of the ColumnRange Parameter column-range: is column [ : column ] column is one of the following. You use a colon (:) to separate the beginning and ending points of the range; for example, F:20 or 12:200. The column on the left of the colon must be less than or equal to the column on the right.
Range Summary Column-Range Parameter You can use the column-range independently and also as an option within the string-range-list parameter. When you give a left column number and a right column number, the right column number must be equal to or greater than the left column number (for example, 5:5 is valid, FIRST:LAST is valid, 15:7 is not valid).
Range Summary Column-Range Parameter 2. The command: *LIST "seven" COL 15:22 7 I met a man with seven wives 8 Each wife had seven sacks 9 Each sack had seven cats * lists all lines that contain the string seven between columns 18 and 22. 3. The command: Note that EDIT accepts a longer string here. *CHANGE 15:19 "thirteen" 8/9 8 Each wife had thirteen sacks 9 Each sack had thirteen cats * changes the characters in columns 15 through 19 of lines 8 and 9 to the string thirteen.
Range Summary Column-Range-List Parameter Column-Range-List The column-range-list parameter is based on the column-range parameter. Parameter It allows an optional repetition of the column-range parameter when an editor command will accept it. Because the repetition of the column-range is optional, an editor command offers more flexibility when the syntax specifies a column- range-list.
Range Summary Column-Range-List Parameter 2. The command: *LIST "r" COL FIRST 3:6 9 * returns a prompt because EDIT could not find the string r in any of the columns listed in the command line. But if you change line 23 to: 23 7, 8, lay them straighter and add LAST to the column-range-list in the command line: The column-range LAST is relative within a specified line-range.
Range Summary Ordinal-Range Parameter Ordinal-Range The ordinal-range parameter describes the ordinal position of a line in an Parameter EDIT file. The ordinal position of a line in an EDIT file refers strictly to the order of that line in the file. For example, if you specify 5 as the line number, EDIT will locate the fifth line of your file, regardless of the actual numbering sequence currently in effect in your file.
Range Summary Ordinal-Range Parameter FIRST is the first position of a string or line in the file. LAST is the last position of a string or line in the file. Note The GET command syntax is the exception to the rule that the ordinal-range parameter is always used as an option of the string-range parameter. In the GET command syntax, you use the ordinal-range parameter to reference one or more lines in a file instead of one or more locations of a string.
Range Summary Ordinal-Range Parameter Examples Suppose the current EDIT file named BIRD contains these lines: 1 2 3 3.1 3.2 4 4.1 5 1. The king was in his counting-house Counting all his money. The queen was in the parlor Eating bread and honey. The maid was in the garden Hanging up the clothes. Along came a blackbird And snipped off her nose! The command: *LIST "the" NUM FIRST 3 The queen was in the parlor * lists the first line that contains the string the, which is line 3.
Range Summary Ordinal-Range Parameter 3. As the GET command can be used to move lines into your current file from other files, the GET command accepts the ordinal-range parameter to reference the ordinal positions of lines in a file rather than strings. Suppose for the following example that the EDIT file named PIE contains these lines: 12 13.1 13.2 13.3 14 15 16 16.1 Sing a song of sixpence A pocket full of rye. Four-and-twenty blackbirds Baked in a pie. When the pie was opened, The birds began to sing.
Range Summary Ordinal-Range Parameter This tells you that EDIT added line 14 from PIE to BIRD and that line 14 of PIE is now line 2.1 of BIRD. Remember, though, that line 14 (in ordinal position) is the fifth line of PIE and is the line specified by the NUM 5 parameter of this GET command. Now, when you list BIRD: *LIST ALL 1 2 2.1 3 3.1 3.2 4 4.1 5 * The king was in his counting-house Counting all his money. When the pie was opened, The queen was in the parlor Eating bread and honey.
Range Summary Ordinal-Range-List Parameter Ordinal-Range-List The ordinal-range-list parameter is based on the ordinal-range parameter. It Parameter allows an optional repetition of the ordinal-range parameter when an editor command will accept it. Because the repetition of the ordinal-range is optional, an editor command offers more flexibility when the syntax specifies an ordinal- range-list. An ordinal-range-list parameter can represent one or more lines in your file.
Range Summary Ordinal-Range-List Parameter 1. Separate the ordinal-ranges with spaces. The command: *LIST "k" 13.1 13.3 24 * NUM F 3 6 A pocket full of rye. Baked in a pie. Along came a blackbird lists the first, third, and sixth lines that contain the string k in the text. EDIT ignores the line numbers when interpreting an ordinal-range or ordinal-range-list parameter. 2. Separates the lower and higher line numbers defining an ordinal-range.
Range Summary Ordinal-Range-List Parameter The command: *GET TART NUM F/2 6 TO 21 replies with the message: LAST NEW LINE IS 21.3 <- 38 CURRENT FILE IS $WORK.POEMS.SIXPENCE This tells you that EDIT added the first, second, and sixth line (in ordinal position) of TART to SIXPENCE and that line 38 of TART (the last line added from TART) is now line 21.3 of SIXPENCE. Remember, though, that when EDIT locates lines of a specified ordinal-range parameter, it ignores the literal line numbering.
Range Summary Ordinal-Range-List Parameter Now, when you list SIXPENCE: *LIST ALL 12 13.1 13.2 13.3 14 15 16 16.1 16.2 17 18 20 21 21.1 21.2 21.3 22 23 24 25 * Sing a song of sixpence A pocket full of rye. Four-and-twenty blackbirds Baked in a pie. When the pie was opened, The birds began to sing. Wasn't that a dainty dish To set before the king! The king was in his counting-house Counting all his money. The queen was in the parlor Eating bread and honey.
Range Summary Range-Specifier Parameter Range-Specifier The range-specifier parameter allows you to indicate combinations of lineParameter range and string-range parameters. Syntax of the RangeSpecifier Parameter range-specifier { line-range-list [ , string-range-list ] | string-range [ line-range-list ] } [ RANGE { line-range-list | string-range [ line-range-list ] } [ , ... ] ] line-range-list: line-range [ line-range] ... string-range-list: string-range [ string-range] ...
Range Summary Range-Specifier Parameter How to Use the RangeSpecifier Parameter Because the range-specifier parameter allows you to use the line-range-list and string-range-list parameters, the following tips highlight specific information you need to keep in mind when using any of the range-list parameters. Separate each line-range in a line-range-list with a space.
Range Summary Range-Specifier Parameter You can use the column-range-list independently and also as an option within the string-range-list parameter. When you use a column-range by specifying a left column number and a right column number, the right column number must be equal to or greater than the left column number (for example, 5:5 is valid, FIRST:LAST is valid, 15:7 is not valid).
Range Summary Range-Specifier Parameter 1. The command: String-range qualified by line-range-list String-range String-range *LIST "Tom", "And", "as" FIRST/18 25 11 Tom, Tom 16 And Tom was beat, 17 And Tom went crying 19 Tom, Tom 14 And away he run. 16 And Tom was beat, 17 And Tom went crying 26 And far away.
Range Summary Range-Specifier Parameter 2. The command: String-range Range-specifier keyword String-range *LIST WORD "Tom" RANGE WORD "And" 16 And Tom was beat 17 And Tom went crying * lists the lines that contain both the words Tom and And. The RANGE keyword and the string-range “And” work together to specify the range criteria for this LIST command. 3.
Range Summary Range-Specifier Parameter 4. The command: Range-specifier keyword Two separate string-ranges String-range The keyword COL signifies a column-range within the string-range here.
Range Summary Range-Specifier Parameter 5. The command: Range-specifier keyword String-range Line-range-list The keyword NUM signifies a ordinal-range within the string-range here. Line-range-list *LIST F 10/12 25/L, "Tom" NUM 1/3 RANGE F/17 20 11 Tom, Tom 11 Tom, Tom 12 The piper's son 25 Was "Over the hills 26 And far away.
6 Handling Your EDIT Files When you are using the EDIT program, you are modifying an existing EDIT file or are creating a new file to add text to it. As you work with your EDIT files, you should keep several points in mind: When you use EDIT to modify an existing EDIT file, changes are made to the actual source file, not to a copy of the file. You use the EDIT program to create EDIT files. The file code for EDIT files is 101. EDIT file line numbers range from 0 to 99999.999.
Handling Your EDIT Files Creating a Backup Copy of Your EDIT File Creating a Backup When you use EDIT to modify an existing EDIT file, your additions and Copy of Your EDIT File changes are made to the actual source file, not a copy of the file. Therefore, for your own protection, you should use the PUT command to make a backup copy of an EDIT file when you plan to make extensive additions or changes to it.
Handling Your EDIT Files EDIT Files EDIT Files How EDIT Files Are Named An EDIT file is a specially formatted disk file. When you use the EDIT program to create a disk file, it always creates an EDIT file and assigns the file a file code of 101. EDIT files have names. You enter the full name of an EDIT file in this format: $volname.subvolname.filename Partial names of an EDIT file are: subvolname.filename and filename Volname is the name of a disk pack mounted on a disk drive.
Handling Your EDIT Files EDIT Files The command that starts EDIT (the EDIT command) accepts a full or a partial filename as a parameter. When you give a partial filename as a parameter to the EDIT command, it uses the names of your current default volume and subvolume to expand the partial filename into a full filename. If you need more information about volumes, subvolumes, and files, see the GUARDIAN 90 Operating System Utilities Reference Manual. Line Numbers in EDIT Files Is equivalent to 1975.
Handling Your EDIT Files EDIT Files See Section 5, "Range Summary," for an introduction to ranges. You can run out of line numbers. For example, if your text is numbered: 23.101 23.102 23.103 23.104 When widows exclaim loudly against second marriages, I would always lay a wager that the man, if not the wedding day, is absolutely fixed on. and you want to add text between line number 23.102 and 23.103, you cannot do it because there is no line number available.
Handling Your EDIT Files Text Lines and Printable Characters Text Lines and Each text line in an EDIT file contains from zero characters to a maximum Printable Characters of 239 to 255 printable characters. (Because of the way in which EDIT stores characters internally, the maximum number of characters that fit on a text line depends on the number and distribution of the blank spaces in the line.) A line with zero characters is blank.
Handling Your EDIT Files Text Lines and Printable Characters Continuation Lines in the EDIT Program In EDIT, you create a continuation line (a line longer than 80 characters) by typing to the end of the screen and then allowing the cursor to wrap to the next screen line. Figure 6-1 shows two continuation lines: line number 9 continues onto two screen lines, and line number 11 continues onto three screen lines. Figure 6-1. Continuation Lines in EDIT 8 He that goes a borrowing goes a sorrowing.
Handling Your EDIT Files Compressing Space in an EDIT File Compressing Space in EDIT makes EDIT files recoverable from process failures. To do this an EDIT File recovery, EDIT copies the modified lines of text into a new area in the disk file as you make modifications to an EDIT file. EDIT can reuse portions of the disk file that have been obsoleted as a result of editing. However, portions of the file that are obsolete often remain on disk, taking up space.
Appendix A EDIT Error Messages EDIT Error Messages This appendix lists the EDIT error messages in alphabetical order. A brief explanation of the message and a reference to helpful information accompanies each error message. Most of the EDIT program error messages you will receive tell you that you incorrectly entered an editor command. You will find that some of these error messages are clear and concise about what you did wrong, while others are not.
EDIT Error Messages EDIT Error Messages This command creates a new EDIT file, puts the text from file1 into it, and makes the new EDIT file the current file. Then type: *GET file2 This command makes file2 the current EDIT file. Now try inserting text from newfile1 into file2. A CHARACTER STRING IN QUOTES IS EXPECTED HERE You incorrectly entered one of several editor commands that require you to specify a character string.
EDIT Error Messages EDIT Error Messages AN I/O ERROR TERMINATED THE 'PUT' OPERATION An I/O error terminated the PUT command. Try the command again. AN I/O ERROR PREVENTS PURGING THE OLD COPY An I/O error terminated the command. Try the command again. AN INCREMENT SMALLER THAN .001 WOULD BE NEEDED You tried to add a line of text to an EDIT file but there is no line number available for you to do so. Renumber lines, then try again.
EDIT Error Messages EDIT Error Messages COMMUNICATION FAILURE (FILE ERROR = errornum) You were using the TEDIT command to start the TEDIT editing program when either EDIT had a communication problem with the startup message to TEDIT or EDIT had a problem with the TEDIT process once it was started. This is an internal error that you cannot correct. Try the command again, or tell your system operator. CPU FAILURE: xx Your file should be undamaged after a processor failure. Just start editing again.
EDIT Error Messages EDIT Error Messages LINE line IS IN THE WAY Renumber lines, then try again. See “Renumbering to Accommodate Added Lines” in Section 3 for details. LINE line WOULD EXCEED 255 CHARACTERS Text lines are limited to 255 characters. EDIT prints this message whenever an editor command results in a text line that exceeds 255 characters. EDIT truncates the text line to 255 characters.
EDIT Error Messages EDIT Error Messages $devname PAPER OUT The device named $devname is out of paper. To continue, enter a carriage return after loading paper. To abort the command, type: 1 STOP PROCESS CREATION FAILURE (NEWPROCESS ERROR = errornum) You were using the TEDIT command to start the TEDIT editing program when EDIT had a problem creating the process that would start TEDIT. This is an internal error that you cannot correct. Try the command again, or tell your system operator.
EDIT Error Messages EDIT Error Messages THE 'BOTH' & 'WORD' OPTIONS ARE INVALID HERE You used a CHANGE command incorrectly. See the CHANGE command description in Section 4 for help. THE CURRENT TEXT FILE IS TEMPORARY You did not name the current EDIT file. (The GUARDIAN 90 operating system purges temporary EDIT files when the temporary file is no longer the current file or when you exit from EDIT.) See the ADD command description in Section 4 for help.
EDIT Error Messages EDIT Error Messages THIS COMMAND ONLY WORKS INTERACTIVELY EDIT must be running in an interactive mode (rather than noninteractively or completing an OBEY command) to be able to start TEDIT. This means that the IN and OUT parameters of the command that initially starts EDIT must name the same device, which must be a terminal. By default, both parameters name your terminal when you type EDIT at your command interpreter.
EDIT Error Messages EDIT Error Messages THIS FILE'S FILECODE IS NOT SOURCE TYPE You attempted to retrieve text from a file that is not an EDIT file (a file with a 101 file code). You can retrieve text from non-EDIT format files but only by using the PUT keyword with the GET command. See the GET command description in Section 4 for help.
EDIT Error Messages EDIT Error Messages TRY EDIT /MEM 32/ Your EDIT process used all its available data space. This rarely happens. When it does happen, exit from EDIT. Then type: 1> EDIT filename /MEM 32/ where filename is the name of the file you were editing when the error occurred. This command tells the command interpreter or TACL process to allocate more data space for your EDIT process. TRY EDIT /MEM 64/ Your EDIT process used all its available data space. This rarely happens.
Appendix B EDIT Error Recovery Procedure Error Recovery EDIT is programmed to keep your EDIT file correct and to remember all your editing, whenever possible. Annoyances that you will encounter when editing include: Mistyping editor commands. When you misspell an editor command or type an incorrect command syntax, EDIT displays an error message that tells you what you did wrong. Simply retype the command. (Appendix A lists the EDIT error messages.) Mistyping text when using the EDIT program.
EDIT Error Recovery Procedure Recovery Procedure Recovery Procedure You can perform one recovery procedure from the EDIT program. When you receive an error message, look up the message in Appendix A, “EDIT Error Messages.” If you receive the following error message: THIS FILE IS INVALID. DO YOU WANT TO RECOVER? follow this error recovery procedure: 1. Respond with “no” or “n”. 2. Exit the EDIT program by typing: *EXIT 3.
Appendix C Page Mode Editing This appendix describes the following: The screen editing capabilities of the EDIT VS program Two EDIT commands, ADD BLOCK and REPLACE BLOCK, that mimic page mode editing XEQ, the EDIT command that starts the EDIT VS program. The EDIT VS program is detailed in the following paragraphs; see “EDIT Commands Requiring Full-Screen Terminals” later in this appendix for descriptions of the three EDIT commands. Introduction to EDIT VS is a program that works with EDIT.
Page Mode Editing What Is Screen Editing? As you use the various keys, notice the following: The action takes place at the cursor. You choose the 24 lines of text that appear on the screen by pressing keys. You control the lines of text on the screen by pressing keys. You change the text in your EDIT file by typing over the text on the screen. You do not see line numbers on the screen.
Page Mode Editing What Is Screen Editing? Figure C-1. Screen Editing Terminal Screen 1. Press a key to display your EDIT file. The editor goes to your EDIT file and displays the text on the terminal screen. 2. Press keys to move the cursor to the word "black". 3. Press keys to delete the word "black". 4. Press keys to tell the teminal you want to insert new text. Type "white". 5. Press a key to exit EDIT VS. The editor takes the text from the screen and changes your EDIT file.
Page Mode Editing Relationship Between the Line Editor and the Screen Editor When you press a function key that causes EDIT VS to read the screen, EDIT VS stores any changes on the screen in a “recovery” file. Should ten minutes elapse without your pressing a function key, EDIT VS reads the screen and stores changes in the recovery file. This procedure makes it possible for you to recover text if there is a failure. (See Appendix E, “EDIT VS Error Recovery Procedures.
Page Mode Editing Relationship Between the Line Editor and the Screen Editor Relationship Between the Line Editor and the Screen Editor Figure C-2 shows the relationship between the line editor and the screen editor. Notice that the screen editor is called from the line editor. You can easily switch from the line editor to the screen editor and from the screen editor to the line editor. You can take full advantage of the features of each editor by switching back and forth between editors.
Page Mode Editing EDIT VS and Your Terminal EDIT VS and Your Terminal Your terminal must be able to operate in full-screen page mode to use EDIT VS. The Tandem 6530 is such a terminal, although EDIT VS works the same way on other Tandem terminals with full-screen capabilities. Here the 6530 terminal keyboard illustrates the various keys you can use when running EDIT VS at your terminal. For more information about the Tandem 6530 terminal, refer to the 653X Multi-Page Installation and Operation Guide.
Page Mode Editing EDIT VS and Your Terminal Figure C-3. The 6530 Terminal Keyboard Numbered function keys Special purpose keys Cursor control keys Editing keys The cursor control keys and the editing keys are described in the 653X terminal manual listed previously. The numbered function keys and EDIT functions they trigger are described in numerical order in this appendix.
Page Mode Editing Starting EDIT VS Starting EDIT VS To use EDIT VS, use EDIT to read or create an EDIT file. Then invoke EDIT VS with the following EDIT command: XEQ VS [ line-range ] (See the XEQ command, described later in this appendix, for more specifics about this command.) So, for example, to start the EDIT program and create a new EDIT file named AESOP, type: 1 EDIT AESOP TEXT EDITOR - T9601B30 - (08MAR87) $WORK.FICTION.AESOP DOES NOT EXIST. SHALL I CREATE IT? yes CURRENT FILE IS $WORK.FICTION.
Page Mode Editing Moving the Cursor Using the Cursor You use the cursor control and editing keys when you position the cursor Control and Editing or add or delete characters and lines on the screen. These are the basic keys Keys you use to manipulate the cursor and the space on the screen to complement the more sophisticated functions you can perform with the numbered function keys.
Page Mode Editing Adding Text to a New File When you want to move the cursor multiple spaces, you can press any cursor key and hold it down. When you want to position the cursor in the upper-left-hand corner of the screen, you can press HOME . When you want to move the cursor from its current position to the column 1 one line down, you can press RETURN . Adding Text to a New File Your new file named AESOP is empty. Your terminal screen is blank.
Page Mode Editing Adding Text to a New File Replacing One or More Characters Use the cursor control keys to move the cursor to sit on the first (left-most) incorrect character. Notice when you use the cursor control keys that the cursor moves across the text on the screen without erasing it. Simply type over the incorrect characters to replace them. Inserting or Deleting Characters Use the cursor control keys to move the cursor to where you’d like to insert one or more characters.
Page Mode Editing Adding Text to a New File To delete a line, position the cursor on the line you want to delete. If you want to delete more than one, place the cursor on the top line of those lines. As you hold down SHIFT press DEL LINE INS . The text or blank spaces on the line where the cursor is positioned disappears, and the text moves up one line. Press it again to continue deleting lines. You can also use the SF5 (DELETE AND SAVE LINE) function key to delete one line at a time.
Page Mode Editing Exiting EDIT VS Exiting EDIT VS When you are finished using the screen editor, press SF16 (press SHIFT and hold it down while you press F16 ) to exit from the EDIT VS program and return to the EDIT program. When you press SF16 , your screen goes blank as you return to the line editor, and EDIT prompts you with the asterisk prompt in the upper-left corner of your screen.
Page Mode Editing Entering EDIT VS to Edit an Existing File Entering EDIT VS to Until you purge an EDIT file from the computer system, you can edit the Edit an Existing File file. To enter EDIT VS from the EDIT program to edit the file named AESOP, type: 1 EDIT AESOP TEXT EDITOR - T9601B30 - (08MAR87) CURRENT FILE IS $WORK.FICTION.AESOP *XEQ VS The first command, typed here at the command interpreter, starts the EDIT program on the file named AESOP.
Page Mode Editing Editing With the Numbered Function Keys Editing With There are four types of editor functions triggered by the numbered function the Numbered keys: Function Keys 1. Paging Operations. The paging functions display a new page on the screen. You can move forward or backward in the EDIT file one screen page (24 consecutive lines), 4 screen pages, 8 screen pages, or 16 screen pages at a time. You can also move to the first and last screen page of the EDIT file.
Page Mode Editing Editing With the Numbered Function Keys When you press a function key: If the cursor is in column 80 of the first screen line, EDIT VS assumes that you have NOT changed the text on the screen since you pressed the previous function key. This means EDIT VS does not save the changes if you have changed the text on the screen and if the cursor is in column 80 of the first screen line.
Page Mode Editing EDIT VS Template EDIT VS Template Tandem makes a function key template that fits your terminal and defines each numbered function key for the EDIT VS program. If you do not have a template for your terminal, see your manager and get one. The template makes it possible for you to use the screen editor without memorizing the edit function linked to each function key.
Page Mode Editing EDIT VS Template Figure C-4.
Page Mode Editing EDIT VS Function Key Summary EDIT VS Function Key The following summary, in numerical order by key, describes the function Summary performed by each numbered function key. F1 (PREVIOUS PAGE) F2 (NEXT PAGE) F3 (BACK EIGHT LINES) F4 (FORWARD EIGHT LINES) F5 (INSERT BLANK LINE) Note F6 (DELETE AND SAVE LINE) The F1 function key moves the screen page backward in the file 24 lines. The F2 function key moves the screen page forward in the file 24 lines.
Page Mode Editing EDIT VS Function Key Summary F7 (RETRIEVE LINE) F8 (COPY AND SAVE LINE) The F7 function key removes the last line from the 24-line buffer stack and places that line on the screen on the line before the current line. (EDIT VS puts the line with the cursor in the 24-line buffer stack when you press the F6 (DELETE LINE) and the F8 (COPY LINE) function keys. See the descriptions of the F6 and F8 function keys for details.
Page Mode Editing EDIT VS Function Key Summary EDIT VS does not join lines with a backslash character ( ) in column 1. F11 (MARK PAGE OR RETURN) The F11 function key has two functions: It marks a page for the SF10 and SF11 (GO TO) function keys, or it returns you to a previously displayed page. To mark a page, press F11 (MARK PAGE) then immediately press SF10 (GO TO 1) or SF11 (GO TO 2). The pressing of these two keys marks the current screen page.
Page Mode Editing EDIT VS Function Key Summary 4. Press F12 (FIND STRING). EDIT VS, starting at the current screen page, searches forward for the string and places the cursor on the first occurrence of the string that it finds. 5. The cursor moves to the next occurrence of the string each time you press F12 6. When EDIT VS reaches the end of your EDIT file, the terminal bell beeps.
Page Mode Editing EDIT VS Function Key Summary LINENO [1] <-- displays the current line number. For example, if the cursor were on line number 141 of the EDIT file when you pressed the F13 (MENU) function key, this line would be: LINENO [141] <- When you exit this menu, EDIT VS returns you to the current line number. If you do not want to return to the current line number, type a new line number to the right of the arrow.
Page Mode Editing EDIT VS Function Key Summary EDIT searches the EDIT file for both uppercase and lowercase occurrences of the string oh dear. If you enter: [W][B]"string" <- 'Oh dear, what can the matter be' EDIT searches for the string that exactly matches the string you typed. If you enter a string, it remains in the menu until you return to the menu and change the string or until you exit the EDIT program. JOIN WIDTH [70] <-- displays the current join width used by the F10 (JOIN LINE) function.
Page Mode Editing EDIT VS Function Key Summary TO 1), SF11 (GO TO 2), or F13 (MENU), no line number is displayed in the field that initially displays UNDEFINED. If you are using the VS menu and ten minutes go by without your entering text in any of the fields, EDIT VS returns you to the current screen of your EDIT file. F14 (NO CHANGE) The F14 function key followed by a paging or scrolling function key (such as F1) tells EDIT VS to ignore any changes you made to the text on the screen.
Page Mode Editing EDIT VS Function Key Summary SF5 (INSERT BLOCK) The SF5 function key inserts the default block or a defined block of blank lines in front of the current line. (Default and defined blocks are defined earlier in the “Editing With the Numbered Function Keys” discussion and explained in the SF9 (DEFINE BLOCK) function key description.) SF6 (DELETE AND SAVE BLOCK) The SF6 function key deletes the default block or a defined block from the screen and saves it in the 24-line buffer stack.
Page Mode Editing EDIT VS Function Key Summary SF8 (COPY AND SAVE BLOCK) The SF8 function key copies the default block or a defined block from the screen and saves it in the 24-line buffer stack. (Default and defined blocks are defined earlier in the “Editing With the Numbered Function Keys” discussion and explained in the SF9 function key description.) The copied block stays unchanged on the screen.
Page Mode Editing EDIT VS Function Key Summary SF10 (GOTO MARKED PAGE 1) The SF10 function key displays the marked page assigned to this key (see the F11 function key). SF11 (GOTO MARKED PAGE 2) The SF11 function key displays the marked page assigned to this key (see the F11 function key). SF12 (INSERT COLUMN) The SF12 function key inserts a blank character into each line from the current line to the bottom of the screen.
Page Mode Editing EDIT VS Function Key Summary SS F4 (FORWARD FOUR PAGES). The SS F4 function key moves forward four pages from the current page and displays that page. SS F5 (BACK SIXTEEN PAGES). The SS F5 function key moves back sixteen pages from the current page and displays that page. SS F6 (FORWARD SIXTEEN PAGES). The SS F6 function key moves forward sixteen pages from the current page and displays that page. SS F7 through SS F11 are not used. SS F12 (FIND STRING).
Page Mode Editing EDIT Commands Requiring Full-Screen Terminals EDIT Commands The three EDIT commands described here—ADD BLOCK, REPLACE Requiring Full-Screen BLOCK, and XEQ—are discussed with the EDIT VS editing functions Terminals because, like EDIT VS, these block mode EDIT commands require a terminal that has a full-screen capability (such as a Tandem 653X or emulator). They do not work with terminals that display one line at a time and can only run EDIT, a program primarily designed for line editing.
Page Mode Editing How to Use ADD BLOCK ADD BLOCK The ADD BLOCK command captures the text on the terminal screen and Command adds it to an EDIT file, allowing you to mimic page mode editing at your terminal. What to Enter ADD BLOCK [ line-range [ BY incr ] ] line-range references one or more contiguous lines in an EDIT file. Turn to “LineRange Parameter” in Section 5 for a full explanation of this range. If you omit a range parameter, EDIT begins adding text where the last ADD BLOCK command terminated.
Page Mode Editing How to Use ADD BLOCK How to Use ADD BLOCK You use the ADD BLOCK command when you have text on your terminal that you want to add to an EDIT file. For example, you might want to incorporate the results of a command interpreter command into an EDIT file or you might want to keep 20 lines of an editing session. The following example demonstrates how you can use ADD BLOCK with a command interpreter command. Example 1. You type a command interpreter command.
Page Mode Editing How to Use ADD BLOCK 2. You name the EDIT file into which you want to add the text on your screen. For example, you type: 15 EDIT ZUSERS ! and EDIT creates an EDIT file named ZUSERS. Your screen now looks like this: 14 USERS * GROUP . USER I.D. # SECURITY CLASS.JONES 009,001 NUNU CLASS.SMITH 009,002 NUNU CLASS.LINCOLN 009,003 NUNU CLASS.SHAW 009,004 NUNU CLASS.WILDE 009,005 NUNU CLASS.TOMLIN 009,006 NUNU CLASS.FRANKS 009,007 NUNU CLASS.LEWIS 009,008 NUNU CLASS.
Page Mode Editing How to Use ADD BLOCK 3. You type: *ADD BLOCK 25 BY 2 to put the terminal in page mode and tell EDIT when it adds the text on the screen to the EDIT file to start at line number 25 and number each line by an increment of 2. Your screen now looks like this: 14 USERS * GROUP . USER I.D. # SECURITY CLASS.JONES 009,001 NUNU CLASS.SMITH 009,002 NUNU CLASS.LINCOLN 009,003 NUNU CLASS.SHAW 009,004 NUNU CLASS.WILDE 009,005 NUNU CLASS.TOMLIN 009,006 NUNU CLASS.FRANKS 009,007 NUNU CLASS.
Page Mode Editing How to Use ADD BLOCK CLASS.JONES CLASS.SMITH CLASS.LINCOLN CLASS.SHAW CLASS.WILDE CLASS.TOMLIN CLASS.FRANKS CLASS.LEWIS CLASS.RUSSELL 5. 009,001 009,002 009,003 009,004 009,005 009,006 009,007 009,008 009,009 NUNU NUNU NUNU NUNU NUNU NUNU NUNU NUNU NUNU $GUEST.JONES $GUEST.SMITH $GUEST.LINCOLN $GUEST.SHAW $GUEST.WILDE $GUEST.TOMLIN $GUEST.FRANKS $GUEST.LEWIS $GUEST.RUSSELL You move the cursor to the end of the last line on the screen that you want to add to ZUSERS. CLASS.JONES CLASS.
Page Mode Editing Tips 6. To prove to yourself that the result of the USERS command is really in the ZUSERS EDIT file, type: *LIST 25/LAST 25 CLASS.JONES * 27 CLASS.SMITH 29 CLASS.LINCOLN 31 CLASS.SHAW 33 CLASS.WILDE 35 CLASS.TOMLIN 37 CLASS.FRANKS 39 CLASS.LEWIS 41 CLASS.RUSSELL * Tips 009,001 009,002 009,003 009,004 009,005 009,006 009,007 009,008 009,009 NUNU NUNU NUNU NUNU NUNU NUNU NUNU NUNU NUNU $GUEST.JONES $GUEST.SMITH $GUEST.LINCOLN $GUEST.SHAW $GUEST.WILDE $GUEST.TOMLIN $GUEST.FRANKS $GUEST.
Page Mode Editing How to Use REPLACE BLOCK REPLACE BLOCK The REPLACE BLOCK command lets you edit text a block at a time. Command What to Enter REPLACE BLOCK { line-range } line-range references one or more contiguous lines in an EDIT file. Turn to “LineRange Parameter” in Section 5 for a full explanation of this range.
Page Mode Editing How to Use REPLACE BLOCK How to Use REPLACE BLOCK Study the following pages to see an example of using the REPLACE BLOCK command. 1.
Page Mode Editing How to Use REPLACE BLOCK following, for details.) Because you haven’t set the block size, EDIT prints the first 16 lines in the file on the screen.
Page Mode Editing How to Use REPLACE BLOCK 3. You move the cursor to the end of the last line on the screen.
Page Mode Editing How to Use REPLACE BLOCK Your screen now looks like this: I'm very good at integral and differential calculus, I know the scientific names of beings animalculous; In short, in matters vegetable, animal, and mineral, I am the very model of a modern Major-General. I know our mythic history, King Arthur's and Sir Caradoc's, I answer hard acrostics, I've a pretty taste for paradox, I quote in elegiacs all the crimes of Heliogabalus In conics I can floor peculiarities parabolous. 4.
Page Mode Editing XEQ Command XEQ Command What to Enter The XEQ (EXECUTE) command invokes another program from within the EDIT program. Currently, the only program that can be invoked with the XEQ command is EDIT VS. XEQ VS [ line-range ] VS is the partial file name of the screen editor program. See “How to Use XEQ.” line-range references one or more contiguous lines in an EDIT file. Turn to “LineRange Parameter” in Section 5 for a full explanation of this range.
Page Mode Editing XEQ Command Examples For the following examples, the EDIT file named SHAW contains the lines: 1 2 3 4 5 1. People are always blaming their circumstances for what they are. I don't believe in circumstances. The people who get on in this world are the people who get up and look for the circumstances they want, and, if they can't find them, make them. The command: 1> EDIT SHAW TEXT EDITOR - T9601B30 - (08MAR87) CURRENT FILE IS $WORK.NONFICT.
Appendix D EDIT VS Error Messages The EDIT VS errors listed here require you to follow specific recovery procedures in order to save your editing. The EDIT VS recovery procedures are described in Appendix E. I MALFUNCTIONED. PLEASE REPORT TO TANDEM COMPUTERS: An internal consistency check within EDIT failed. See Procedure F in Appendix E for instructions.
EDIT VS Error Messages STACK DUMP ... See Procedure F in Appendix E for information on how to recover from this error. TRAP ... See Procedure A in Appendix E for information on how to recover from this error. The terminal disconnects from phone See Procedure A in Appendix E for information on how to recover from this error. The text on your screen disappears and all you see is a command interpreter. See Procedure B in Appendix E for information on how to recover from this error.
EDIT VS Error Messages The text on your screen disappears and the diagnostic test pattern flashes on the screen. See Procedure E in Appendix E for information on how to recover from this error. VS ABORTED BECAUSE OF I/O ERROR - $devname ** LINES 149.11 TO 210 FOR EDIT-FILE $volname.subvolname.filename SAVED IN VS RECOVERY FILE $volname.subvolname.filename. DO "X VS : $volname.subvolname.filename:" TO RECOVER DATA See Procedure A in Appendix E for information on how to recover from this error.
Appendix E EDIT VS Error Recovery Procedures EDIT is programmed to keep your EDIT file correct and to remember all your editing, whenever possible. Annoyances that you will encounter when editing with the screen editor include: Pressing an invalid numbered function key while in EDIT VS. When you press an invalid function key, the terminal beeps and EDIT does not perform the operation triggered by that key. Mistyping text while in EDIT VS.
EDIT VS Error Recovery Procedures EDIT VS Recovery File EDIT VS Recovery File When EDIT VS is running, it keeps a special file named: $volname.subvolname.ZZVSnnn in your current subvolume. This recovery file supports the SF14 (RECOVER) function key and is also used for some of the recovery procedures outlined in the following paragraphs. When EDIT exits normally, it deletes this recovery file.
EDIT VS Error Recovery Procedures EDIT VS Recovery File The FUP INFO * command, typed at the command interpreter. For example: 4 FUP INFO * The ?FILES command. For example: *?FILES If you find only one file named ZZVSnnn in your subvolume, use that file in the recovery procedure. If you find several files named ZZVSnnn, use the FUP INFO * command to check the dates on the files. Then use the newest file in the recovery procedure. Note Make a habit of purging any ZZVSnnn files that you don’t need.
EDIT VS Error Recovery Procedures Recovery Procedures Recovery Procedures EDIT VS has seven different recovery procedures. When you receive an error message, look up the message in Appendix D, “EDIT VS Error Messages.” Then, if indicated, see the appropriate error recovery procedure described in the following paragraphs. Recovery Procedure A 1. If the error message includes the recovery file name, write this file name on a piece of paper.
EDIT VS Error Recovery Procedures Recovery Procedures 6. Now type: *XVS : ZZVSnnn : where ZZVSnnn is the name of the recovery file. 7. The following message appears on the screen. Reply yes. DATA IN RECOVERY FILE IS FOR LINES nn TO nn OF EDIT FILE $WORK.FICTION.MYFILE --WARNING--CURRENT FILE IS $WORK.FICTION.SAVE SHALL I CONTINUE (Y?N)? yes Check this EDIT file. If this EDIT file contains the 24 lines of text that were on the screen prior to the error, then the recovery file is correct.
EDIT VS Error Recovery Procedures Recovery Procedures *NUMBER ALL * 13. At the asterisk prompt, type: *GET filename where filename is the EDIT file that you were editing when the error occurred. For example: *GET MYFILE CURRENT FILE IS $WORK.FICTION.MYFILE * If you moved to this step from Step 7, stop here. Do not perform the remainder of the steps in this recovery procedure. Instead, look through the EDIT file and fix things you find wrong. Then continue editing. 14.
EDIT VS Error Recovery Procedures Recovery Procedure B Recovery is complete—you can continue editing. 16. Renumber all the lines in the file by typing: *NUMBER ALL * 17. Search the current EDIT file to determine where the recovered text belongs.
EDIT VS Error Recovery Procedures Recovery Procedure B Recovery Procedure B If you are using a Tandem 6511 or 6512 terminal and if the command interpreter prompts you just after you press a function key, then follow Steps 1 through 5. If you are using a Tandem 6520 or 6530 terminal, follow Steps 3 and 4. 1. Press 2. Press MODE to put the terminal into conversational mode. 3. Type: RESET once to unlock the keyboard.
EDIT VS Error Recovery Procedures Recovery Procedure C Recovery Procedure C 1. If the processor in which your EDIT VS process is running fails, usually the EDIT process is also gone. You can check this by typing the STATUS *, TERM command at the command interpreter. For example: 1> STATUS *, TERM Process Pri PFR Hometerm 7,100 148 $system.system.edit 7,102 148 $system.system.vs $e252 b 10,88 150 $system.sys03.tacl $e252 11,68 150 $system.sys03.
EDIT VS Error Recovery Procedures Recovery Procedure D 4. Because the error message did not name the recovery file, you must type the FILES or FUP INFO * command at the command interpreter to find the name of the recovery file. For example: 4 FILES AESOP 5 5. PEEP SHAKE ZZVS972 Follow Steps 5, 6, 7, 8, 13, 14, and 15 of Procedure A. Recovery Procedure D If the herringbone pattern appears on your screen, press RESET three times to put the terminal into self-test mode. Then go to Procedure E.
EDIT VS Error Recovery Procedures Recovery Procedure F 3. Press BREAK . If you receive a prompt from your command interpreter, go to Procedure C. If you do not receive a prompt, both processors controlling your terminal might be down or locked up. Try one or both of the following: Wait until you get a prompt (: or 1) and then go to Procedure C. Go to another terminal and type the STATUS command (STATUS *, TERM termname) at the command interpreter to list the processes running on your terminal.
EDIT VS Error Recovery Procedures Recovery Procedure F Recovery Procedure F When you use EDIT VS, it makes internal consistency checks. If one of these checks fails or if a trap having a trap number in the range of {0:3} occurs, VS prints the message: ** PLEASE REPORT THIS FAILURE TO TANDEM COMPUTERS INC. (STACK DUMP PLACED IN FILE $dflt vol.dflt subvol.AAAAnnn) The file named in the error message contains an image of the data stack at the time of the failure. 1.
EDIT VS Error Recovery Procedures Recovery Procedure G 3. Use the FUP DUP command at the command interpreter to save the stack dump, the EDIT file, and the recovery file in a special subvolume. For example, to save the files in the subvolume named VSBUG, type: 5 FUP DUP AAAA831,VSBUG.* 6 FUP DUP ZZVS493,VSBUG.* 7 FUP DUP MYFILE,VSBUG.
Index A ADD BLOCK command C-31/36 See also EDIT VS ADD command 2-1/5 adding text to a new file 4-21/22 adding text to existing file 4-17/20 how to use 4-15/17 in a command file 4-88 what to enter 4-15 Adding text to a file ADD command 4-17/22 adding blanks at specified columns 4-39 extended example 2-1/4 ALL keyword See Keywords AT keyword See Keywords B Backup copy of EDIT file 6-2 BLOCK keyword See Keywords BOTH keyword See Keywords BREAK command 3-18/20, 4-24/29 AT keyword and character strings 4-28 AT k
Index with no AT parameter 4-26/27 WORD keyword and character strings 4-28/29 Breaking lines BREAK command 4-24/28 extended example 3-18/20 C Capturing all characters on screen C-36 CHANGE command 3-11/15 changing columns to a string 3-11/15, 4-30/39 changing existing strings to new strings 4-32/37 how to use 4-32 using keywords with CHANGE 3-12 what to enter 4-30/31 Changing text CHANGE command 4-30/39 extended example 3-11/15 Character string See String COL keyword See Keywords Column adding blank 4-39 c
Index maximum number in an EDIT file 5-1/2 moving in EDIT VS C-28 pinpointing column numbers 5-28 two separated by a colon 4-11 Column number template 3-17, 3-19/20, 4-27/28, 5-28 Column-range parameters See Range Command file closed when TEDIT is started 4-116 comment lines 4-6, 4-87/88, 4-89/90 containing more than one OBEY file 4-89 defined 4-6 examples 4-7/8, 4-89/91 how to use 4-87/91 See also OBEY command that includes a REPLACE command 4-89 that includes ADD command 4-87/88 that includes OBEY comman
Index Common line editing functions See Line editing Compressing a file examples 4-94/96, 6-8 See also PUT command syntax 4-92 Compressing an EDIT file examples 4-94/96, 6-8 See also PUT command syntax 4-92 Continuation lines 6-7 Control keys enabling or disabling 4-111/112 CONTROL keyword See Keywords COPY keyword See Keywords Copying text into a new file extended example 3-35/36 PUT command 4-92/96 Copying text into your file extended example 3-28/34 GET command 3-28/35 Correcting mistyped EDIT commands
Index Current line in EDIT VS defined C-1/2 in the line editor defined 4-11 example in a line-range 5-17 in a range 5-4/5 D D subcommand of FIX command 3-8, 4-46, 4-48 DELETE command 3-2/4, 4-40/43 confirmation query 4-41, 4-43 examples 4-41/43 what to enter 4-40 Deleting text 4-40/43 Disabling control keys 4-110/111 Disk file created by EDIT program 1-3, 4-21/22, 6-3 creating at command interpreter 4-79 file code of EDIT file 6-3 Displaying text lines 4-77/78 Displaying values of a specified file 4-94 DIT
Index EDIT commands ?ENV 4-119 ?FILES 3-34 ?SYSTEM 4-120/121 ?VOLUME 4-123 abbreviations 1-8/9 ADD 2-1/4, 4-15/22 ADD BLOCK See EDIT VS and keywords 1-8/9 and ranges 1-8, 1-11, 5-1/8 column-range parameters 5-27/31 line-range parameters 5-9/17 ordinal-range parameters 5-32/40 range-specifier parameters 5-41/47 string-range parameters 5-18/26 BREAK 3-18/20, 4-24/29 case sensitivity 1-8/9 CHANGE 3-11/15, 4-30/39 combining on one command line 1-8/9, 4-4 command summary 4-13 correcting 1-9/10 example 1-2, 1-13
Index MOVE 3-21/23, 4-81/82 NUMBER 3-24/27, 4-83/86 OBEY 4-87/91 PUT 3-35/36, 4-92/99 QUERY 3-34, 4-97/99 REPLACE 3-5/6, 4-100/104 REPLACE BLOCK See EDIT VS requiring line number or range of lines 1-11, 4-106/119, 6-5 See also Keywords SET 4-106/113 TEDIT 4-115/117 TEDIT commands on same command line 4-116 typing 1-8/9 XEQ See EDIT VS EDIT error recovery procedure B-1/2 when get invalid file message B-1 EDIT errors A-1/10 how to handle A-1 EDIT file backup copy 6-2 closing current 1-16, 4-44 command file S
Index EDIT error messages A-1/10 EDIT error recovery procedure B-1/2 exiting 1-16, 4-44 file code 4-24, 6-1, 6-3 invalid file error B-1/2 line numbers 1-7/8, 6-1, 6-3/5 reassigning 4-84/87 listing all file names in a subvolume 4-120/121 maximum width 5-1/2 naming 1-3/4, 4-21/22, 6-3/4 caution about C42 opening TEDIT 4-115/117 partial file names expanding 6-3/4 printable characters defined 1-11, 6-6 maximum amount of 6-1 reassigning line numbers 4-84/87 replacing text 4-100/104 status of EDIT file from EDIT
Index EDIT VS 1-2, C-1/43 See also EDIT VS editing with 1-2 exiting 1-16 function keys See EDIT VS interactive editing concept 1-5 Line editing 1-5/15 See also Line editing numbering lines 1-7/8, 4-83/86, 5-1/4, 6-1/4, page mode editing See EDIT VS range parameters defined 1-8, 1-12, 4-11 See also Range specifying 1-12, 4-11 summary 5-6/8 relationship between EDIT and EDIT VS C-4/5 screen editing See EDIT VS starting EDIT 1-3, 1-12 interactive mode 4-1/4 noninteractive mode 4-4/8 starting EDIT VS C-8 TEDIT
Index EDIT VS ADD BLOCK compared with PUT command capabilities C-35/36 example C-32/36 for capturing all characters on screen C-35/36 introduction to C-30 pressing BREAK while in block mode C-35/36 using while in an EDIT file C-36 using with terminals on AM6520 line C-36 what to enter C-31 basic editing inserting or deleting characters C-10/12 inserting or deleting lines C-11/12 replacing characters C-10/11 buffer C-1/2 buffer stack C-4 canceling change to screen C-24/25 characters per line C-1/2 concept o
Index error recovery procedures E-1/13 basic recovery by pressing SF14 E-1 EDIT VS (ZZVS) recovery file C-4, E-2 listing name of ZZVS file E-2/3 purging ZZVS files E-2/3 recovery procedure A E-4/7 recovery procedure B E-8 recovery procedure C E-9/10 recovery procedure D E-10 recovery procedure E E-10/12 recovery procedure F E-11/13 recovery procedure G E-12/13 exiting EDIT VS C-13, C-29 full file name of EDIT VS program C-42 line editor related to screen editor C-4/5 line numbers assigned by EDIT C-4/5 lin
Index template C-17/18 tips C-16 using shifted and unshifted C-17 page mode editing commands C-30/43 reading the screen to change EDIT file C-3, C-10, C-16 recovering a cleared screen C-28 recovering text if program fails C-4, E-1/13 REPLACE BLOCK example C-39/41 how to use C-37/38 introduction to C-30 pressing BREAK while in block mode C-41 what to enter C-37/38 starting EDIT VS as part of the EDIT command C-43 example C-8, C-42/43 on a new file C-8 on an existing file C-14 using XEQ command C-8, C-14, C-
Index XEQ examples C-42/43 how to use C-42 introduction to C-32 never name a file VS C-42 starting EDIT VS C-8, C-14, C-42/43 starting EDIT VS at command interpreter C-43 starting EDIT VS at EDIT program C-42/43 what to enter C-42 EDIT VS error messages D-1/3 basic recovery with SF14 key E-2 EDIT VS (ZZVS) recovery file E-2 listing name of recovery file E-3 purging ZZVS files E-3 recovery procedure A E-4/7 recovery procedure B E-8 recovery procedure C E-9/10 recovery procedure D E-10 recovery procedure E E
Index F File See EDIT file File names caution in naming C-42 of EDIT file 1-4 FIX command 3-7/11, 4-45/57 editing line defined 3-8 fixing editor commands 4-55/57 fixing text lines deleting characters 4-48/49 inserting characters 4-48 replacing characters 4-48 how to use 4-45/46 subcommands explained 3-8/9, 4-46/56 terminating a FIX command 4-47, 4-55/56 two or more subcommands on a line 3-10, 4-51/54 what to enter 4-45 Fixing characters extended example 3-7/10 FIX command 4-45/56 FIX COMMAND command 4-55/5
Index G GET command 3-28/29, 4-58/67 accepts line reference in ordinal range 5-8, 5-34/35 capabilities 4-58 copying all of a file to your file 3-28/29 copying part of a file to your file 3-28, 4-63/67 copying text to the beginning of a file 3-30/31 creating new current file 4-62/64 file validity errors using GET 4-67 making EDIT file the current file 4-61 non-disk device adding text from 4-67 using GET with 4-66/67 non-EDIT-format disk files adding text from 4-67 using GET with 4-66/67 what to enter 4-59/6
Index Interactive mode of EDIT program defined 4-1 example 4-3/4 syntax 4-1 Interactive text editing with FIX 4-45/56 J JOIN command 3-16/17, 4-72/74 current join width 4-74 See also QUERY command default join width 4-72, 4-74 example 4-73/74 how to use 4-73 reset join width 4-74 See also SET command what to enter 4-72 word defined 4-72 JOIN keyword See Keywords Join width default 3-16/17, 4-72, 4-74 setting 3-16/17, 4-74 K Keys cursor control keys area in which cursor can travel C-9 arrow keys C-9/10 HOME
Index editing keys correcting typing errors C-10/12 used with ADD BLOCK command C-34/35 used with cursor control keys C-9 used with REPLACE BLOCK command C-39 keyboard keys alphanumeric C-6 cursor control keys C-6/7, C-9/12 editing keys C-6/7, C-10/12 numbered function keys C-6/7 numeric key pad C-6 special purpose keys C-6 numbered function keys and current line in EDIT VS C-1/2 capabilities of each in EDIT VS C-19/29 editing operations triggered by C-15 editing with C-15/16 Super Shift mode C-28/29 templ
Index CONTROL/CONTROL 4-107, 4-110, 4-112 COPY 3-22/23, 4-80, 4-81 DITTO/ DITTO 4-107, 4-113 FREQ 4-107, 4-112 IN and OUT of noninteractive mode of EDIT 4-5/6, 4-76 INLEN 4-108 JOIN 4-108 NAME 3-34, 4-97 NUM examples 4-35, 4-62/63, 4-67, 5-34/39 locating string by its ordinal position 5-20, 5-24, 5-34/40 See also Range, Ordinal-range parameters with ordinal-range parameters 5-32 OUTLEN 4-108 QUIET 3-4, 4-82 effect on common commands 4-9/10 QUIET/ QUIET 4-108, 4-112/113 RANGE examples 5-45/47 with range-spe
Index L Lengthening and shortening lines extended example 3-16/17 JOIN command 4-72/74 Line editing accommodating addition of new text 3-26/27, 3-31/33, 4-86 adding blanks at specific column numbers 4-39 adding text 2-1/4, 4-17/22 breaking lines 3-18/19, 4-24/29 changing characters 3-11/15, 4-30/39 comment lines in a command file 4-6/7 concept of 1-5/6 continuation lines 6-7 copying text into your file 3-28/34, 4-63/67 copying text to a new file 3-35/36, 4-94 deleting lines 3-2/4, 4-40/43 EDIT commands See
Index line numbers defined 1-8 renumbering 3-24/27, 4-84/85 used in ranges 1-8 line of text defined 5-1 listing current system and volume names 4-119 listing file names on a subvolume 4-120 listing text 2-5/7, 4-75/79 making room for more text 4-86 moving lines 3-21/23, 4-80/81 printable characters in a file 1-11, 6-1, 6-6 rearranging text See MOVE command renumbering lines 3-24/27, 4-83/86 replacing lines 3-5/6, 4-100/104 running TEDIT from EDIT 4-115/117 setting the current system 4-122 setting the curre
Index Line-num defined 4-83 Line-range parameters See Range LIST command 2-5/7, 4-75/79 displaying text lines 4-77/78 how to use 4-76 LIST COL command 3-17, 3-19/20, 4-77, 4-79 listing text into non-EDIT-format file 4-79 listing text onto magnetic tape 4-78 what to enter 4-75 Listing all files on current subvolume 3-34, 4-120/121 Listing current system and volume names 4-119 Listing file names on subvolume 4-120 Listing text extended example 2-5/7 LIST command 4-75/79 M Magnetic tape listing text onto tape
Index N NAME keyword See Keywords NO CONTROL keyword See Keywords NO DITTO keyword See Keywords NO QUIET keyword See Keywords NO SHIFT keyword See Keywords NO TABS keyword See Keywords Non-EDIT-format disk file copying it into an EDIT file 4-67 listing EDIT file into 4-79 Noninteractive mode of EDIT program defined 4-1 example 4-7/8 syntax 4-5 using a command file 4-6/7 NUM example with CHANGE command 4-35 keyword for ordinal-range parameters 5-32, 5-47 locating strings by ordinal position 5-20, 5-24, 5-26
Index line-num defined 4-83 reassigning line numbers 4-85 running out of line numbers 6-4/5 what to enter 4-83/84 O OBEY command examples 4-89/91 how to use 4-87/89 one or more in a command file 4-4, 4-88/89 example 4-90/91 what to enter 4-87 OBEY file See Command file Ordinal-range parameters See Range OUTLEN keyword See Keywords P Page mode editing See EDIT VS Prompt asterisk 1-3, 1-5 colon 1-3 COMINT 1-3 EDIT 1-3, 1-5 FIX 1-10, 1-13, 3-8 TACL 1-3 058061 Tandem Computers Incorporated Index–23
Index PUT command 3-35/36, 4-92/96 backup copy of a file 6-2 compressing a file 4-94/96, 6-1, 6-8 copying all or part of file to new file 3-35/36, 4-94 determining the unused file space 4-94/95, 6-8 how to use 4-93 what to enter 4-92/93 Putting text into a new file 4-92/96 Q QUERY command 3-34, 4-97/99 determining unused file space 4-95/96, 6-1, 6-8 examples 4-98/99 how to use 4-97 what to enter 4-97 QUIET keyword See Keywords R R subcommand of FIX command 3-8/9, 4-46/47, 4-49/52 replacement string 3-8/9,
Index specifying column numbers 5-20, 5-28 strings within specified columns 5-28 summarized 5-7/8 syntax 5-27 column-range-list parameter as option of string-range-list 5-42/43, 5-46 defined 5-30 examples 5-30/31 syntax 5-30 common ranges 4-12 concept of 5-2/3 current line 4-11/12 defined 1-8, 1-11, 4-11, 5-1 group of text, defined 5-1/2 how to use 5-3/5 if none specified 4-11 line of text, defined 5-1 line range compared to column range 5-2/3 line-range parameter defined 5-3/5 examples 5-4/5 how to specif
Index multiple range parameters 5-3/4 ordinal-range parameter as option of string-range parameter 5-32 definition of ordinal position 5-32, 5-34/36 examples 5-34/36 GET referencing a line, not a string 5-8, 5-32/33, 5-34/36 keyword NUM always part of syntax 5-32 summarized 5-7/8 syntax 5-32/33 within a string-range parameter 5-42/43 ordinal-range-list parameter defined 5-37 examples 5-37/40 referencing ordinal position of lines 5-38/40 referencing ordinal position of strings 5-37/39 separating ranges with
Index separating elements with commas 5-41/43 summarized 5-8 syntax 5-41/42 specifying 1-11, 2-7, 4-11 string, defined 5-1/2 string-range parameter character string defined 5-18 defined 4-11, 5-1/2 examples 5-22/24 how to use 5-20 keyword COL 5-19/20, 5-23/24, 5-46 options for string-field separators 5-19/20 ordinal position of string in a file 5-20 specifying column numbers 5-20 summarized 5-6/8 syntax 5-18/20 using NUM with 5-20/26 word compared with string 5-21 string-range-list parameter defined 5-25 e
Index Range-list parameters See Range Range-specifier parameter See Range Reassigning line numbers 4-84 See also NUMBER command Recovering a cleared screen C-28 Recovery procedures EDIT error recovery B-1/2 when get invalid file message B-1 EDIT VS error recovery E-1/13 basic recovery with SF14 E-1 EDIT VS (ZZVS) recovery file E-2 purging ZZVS recovery files E-2/3 recovery procedure A E-4/7 recovery procedure B E-8 recovery procedure C E-9/10 recovery procedure D E-10 recovery procedure E E-10/11 recovery
Index REPLACE command 3-5/6, 4-100/104 explicit syntax 4-100 examples 4-102/104 how to use 4-101/104 implicit syntax 4-100/101 examples 4-103/104 in a command file 4-88/89 what to enter 4-100/101 Replacing text in a file extended example 3-5/6 REPLACE command 4-100/104 S SEQ keyword See Keywords SET command 4-106/114 set options abbreviated forms 4-109/114 listed 4-106/110 what to enter 4-106/110 Set options abbreviated 4-114 See also SET command with QUERY command 4-97/98 with SET command 4-106/114 Settin
Index Setting the current volume and subvolume 4-123 SHIFT keyword See Keywords SLACK unused space in an EDIT file 4-95/96, 6-8 See also PUT command String defined 1-11, 5-1/2 embedded 3-15, 5-34/35 and keyword WORD 3-15 enclosed in various characters 4-25 listing lines with a specific 2-5/6, 4-78 qualifying with keywords 4-25, 4-28/29 referenced in ordinal-range parameters 5-7/8 specified in a range 4-11 string-field separators acceptable characters for 4-25, 4-31/32, 4-69/70, 4-101 string-range parameter
Index System name listing current 4-119 setting current 4-122 example 4-119 T Tabs 4-109/111 using DITTO option with 4-114 TABS keyword See Keywords TACL defined 1-3 used as command interpreter in manual 1-3 TEDIT command 4-115/117 examples 4-116/117 how to use 4-116/117 returning to TEDIT from EDIT 4-116/117 what to enter 4-115/116 Temporary file 1-4, 4-22, 4-63/64 starting TEDIT on a 4-116/117 Terminal for running EDIT VS and using the screen editing program C-6/7 full-screen page mode C-6/7 function key
Index U UNSEQ keyword See Keywords Uppercase used automatically 4-108/110 Using TEDIT from EDIT 4-115/117 V Volume name defined 1-4, 6-3 listing current 4-119 setting current 4-123 W WIDTH keyword See Keywords Word compared with string 5-21 defined 3-14 WORD keyword See Keywords Wrapped text lines 6-7 X XEQ command See EDIT VS Index–32 058061 Tandem Computers Incorporated
Index Z ZZVS file See EDIT VS recovery procedures Special Characters ?ENV command 4-119 example 4-119 what to enter 4-119 ?FILES command 3-34, 4-120/121 examples 4-121 to list a ZZVS file E-3 what to enter 4-120 ?SYSTEM command 4-122 example 4-119 what to enter 4-122 ?VOLUME command 4-123 example 4-123/124 what to enter 4-123 ! 3-35/36, 4-42, 4-93, 4-94/95, 4-116/117 “ (enclosing a string) 4-25 $ (preceding a volume name) 6-3 ‘ (enclosing a string) 4-25 * (comment line) 4-6/7 * (current line) 4-11, 4-12 *
Index /enclosing a string) 4-25 /separating line numbers) 1-11 See also Range /(completing addition of text) 1-14/15, 2-1/2, 4-87/88 /(completing replacement of a line) 3-6, 4-88/89 /(negating a FIX command) 1-10, 3-7, 3-10, 4-55/56, 4-57 /(using in command file text) 4-87/88 : (COMINT) 1-3 : (separating columns in a range) 4-11 ; (separating commands) 4-4, 4-6 Index–34 058061 Tandem Computers Incorporated