 |
» |
|
|
|
The text editor EDIT/3000 is a Hewlett-Packard subsystem that comes with your HP 3000 system. You can create and edit files using EDIT/3000 or another word processing program. If you are using another program, refer to its instructions to create and modify files. The following task descriptions provide instructions for working within EDIT/3000. To start the editor |  |
To start the editor, do the following: Type the command EDITOR at the system prompt, and press Return. A slash prompt (/) signifies that you are in the EDIT/3000 program.
To add text to a file |  |
To create a file using EDIT/3000, specify ADD to begin the file and type lines of text. At the editor's prompt (/), enter A or ADD. When line number 1 displays on the screen, the program is waiting for text for line 1 of the file. Enter the text for the file beginning at line 1. Enter no more than 72 characters on a line. Press Return to continue on the next line. EDIT/3000 does not automatically wrap text to the next line. You must enter Return to start another line. When you have finished entering text, press Return to give you a new line. Enter // Return to signify the end of adding text.
To save a file |  |
When you type the text into a file, it exists only in the editor's workspace. To keep your text permanently, you must save it in a file by using the EDIT/3000's KEEP command. To save the file, at the editor's prompt (/), enter K or KEEP followed by a file name. Select a name for the file that fits the following restrictions. Use no more than eight characters.
Use an alphabetic character for the first character.
Do not use special characters (such as $, @, &, or *) in the name.
Do not use a slash (/) in a file name. This character has a special function in file names. If used incorrectly, you might have difficulty accessing the file later.
For example, if you want to save the file under the name LETTER1, you would type the following. If the name that you selected is already in use, you are prompted by the program to overwrite the existing file. Again, using the example of LETTER1, the following prompt would appear on the terminal screen:
LETTER1 ALREADY EXISTS - RESPOND YES TO PURGE OLD AND KEEP NEW
PURGE OLD?_
|
If this message appears on the screen, do one of the following: Enter Y to overwrite the existing file.
Enter N to end your request. Enter K or KEEP again, using a unique name for the file.
To end the editor |  |
To leave the editor program, use the editor's END, or E, command. This command is typed at the editor's prompt. Enter END or E.
Press Return.
The message END OF SUBSYSTEM appears on the screen, and you are returned to the system prompt. Your screen should look like this: Editing an EDIT/3000 file |  |
Retrieving a file, adding and deleting lines of text, and modifying words in a text line are described in this section. To retrieve an existing fileThe EDIT/3000 command TEXT, or T, lets you retrieve a file for viewing, printing, or editing. This command brings your file into the EDIT/3000 workspace. At the editor's prompt, type either TEXT or T followed by the file name that you want to retrieve.
Press Return.
The following example uses the file name MYFILE: If your file is extremely large, it may take several seconds before you again see the editor's prompt (/). To list a file's contents in the editorThe EDIT/3000 command LIST allows you to view all or any portion of your text file. The tasks described here assume that a file is already in the EDIT/3000 workspace. From the editor's prompt, enter LIST ALL to display all of the contents of a file. Press Return.
You can display portions of a file by using special listing commands. For example: To display the first line of the file, use the keyword FIRST: To display the first through the twentieth lines of the file, use the keyword FIRST as the beginning of a range and a line number as the end of the range: Note that the screen can display about twenty lines of a file at a time without scrolling off the screen. Specify a range of twenty or fewer lines so that it will fit the screen.
To display a segment of a file, specify a range of line numbers, such as lines 10 through 17: To display only the last line of the file, specify LAST with no line numbers: To display from a certain line number to the end of the file, use the keyword LAST and a line number:
To add a line of text to an existing file, use the editor's ADD, or A, command. A file must be retrieved into the editor's workspace before issuing this command. For example: Enter A or ADD to add text to the end of the file. Enter A or ADD and a line number to add text after the line specified. (Note that the additional line numbers are added as decimals, in this example 32.1, if all whole numbers are in use.) Enter A or ADD and a decimal number less than 1 to add text to the beginning of the file.
To erase a line of text, use the editor's DELETE, or D, command. Type DELETE along with the line number that you wish to erase. The following procedures assume that a file is already in the EDIT/3000 workspace. From the editor's prompt, type DELETE followed by a line number.
Press Return.
The following example deletes line 15 of the text. Note that the line of text displays on the screen as it is being erased.
/DELETE 15
15 wonderful calicos from the early 19th century were used
|
To erase a range of linesTo delete a series of consecutive lines of text, use the DELETE command and specify the range of lines that you want to erase. The line range is designated by a start number and an end number, separated by a /. For example, 24/85 will erase lines 24 through 85. Type DELETE, and provide a line range. Press Return.
In the following example, lines 5 through 7 of the text are deleted. Note that the lines of text appear on the screen as they are erased:
/DELETE 5/7
5 The dominant color was blue, symbolizing honor and
6 tranquility. Borders were done in a different
7 complementary color.
|
To change or modify a line of textTo change or modify lines of text, use the MODIFY, or M, command and the R, I, or D subcommands. The following tasks assume that a file is already in the EDIT/3000 workspace. At the editor's prompt, enter M, or MODIFY, followed by a single line number or a range of line numbers to change text on certain lines. The line or first line of the range is displayed on the screen.
Use the spacebar to move the cursor so that it is under the character or beginning of the phrase that needs to be changed. Use one of the following methods to change the text: To replace text, type an R followed by the new text. The new text overwrites the existing text. If two characters are entered, two characters of the original phrase are overwritten.
1 Here is a line with a mistar.
Rke. Return
1 Here is a line with a mistake.
|
To insert text, type an I (for insert) followed by the
new text.
1 Here is a line with a mistake.
iout Return
1 Here is a line without a mistake.
|
To delete single characters that are next to one another,
type D (for delete) beneath each character to be deleted:
1 Here is a line without a mistake.
ddd Return
1 Here is a line with a mistake.
|
To delete a section of text in the middle of a line, type a D under the first letter to delete and another D under the last letter to delete.
1 Here is a line with a mistake.
d d Return
1 Here is a mistake.
|
To renumber lines in a fileThe line numbering of the file can become complicated if several lines have been added, deleted, and modified. To renumber your file from the first line to the last using only whole numbers, use the EDIT/3000 GATHER ALL command: From the command mode of the editor, enter GATHER ALL, and press Return. Use the LIST ALL command to view your file.
To print your EDIT/3000 file to a printer |  |
You can print the contents of a file by directing the output of the LIST command to the printer. To do this, include the OFFLINE parameter. Note that the LIST command prints the contents of the file as it would appear in a listing on the screen. It does not format the text as word processors often do. To print the entire file, use the ALL parameter.
/LIST ALL, OFFLINE Return
|
The following message appears:
***OFF LINE LISTING BEGUN.***
|
To print selected lines of the file, enter the range of line numbers desired:
/LIST 1/10, OFFLINE Return
|
To print only the end of a file, specify a range beginning with a line number and ending with the parameter LAST, or specify the beginning of the range as LAST minus a number of lines and the end of the range as the parameter LAST:
/LIST 170/LAST, OFFLINE Return
|
or
/LIST LAST-20/LAST, OFFLINE Return
|
To create command files |  |
If there are commands that you use frequently, you may want to create a command file. At their simplest, command files can shorten or abbreviate what you type at the system prompt. Command files can contain MPE/iX commands, program names, and or other command file names. To create a command file, perform the following tasks: Get into a text editor.
Enter each command that you want to execute on a separate text line. Save the file under an abbreviated name, and exit the editor.
The following example shows the text of a command file created in the EDIT/3000 text editor. This command file executes the SHOWTIME command when you type ST at the system prompt.
:EDITOR Return
/ADD Return
1 SHOWTIME Return
2 //
/KEEP ST Return
/END Return
END OF SUBSYSTEM
:_
|
The following example creates a command file that executes the EDIT/3000 program when E is typed in at the system prompt:
:EDITOR Return
/ADD Return
1 EDITOR Return
2 //
/KEEP E
/END
END OF SUBSYSTEM
:_
|
The following example creates a command file in EDIT/3000 that executes two command files, ST and E, when SE is typed in at the system prompt:
:EDITOR Return
/ADD Return
1 ST Return
2 E Return
3 // Return
/KEEP SE Return
/END Return
END OF SUBSYSTEM
:_
|
Any problems? |  |
Did the following message appear on the screen when you tried to retrieve a file in the EDIT/3000 program?
+-F-I-L-E---I-N-F-O-R-M-A-T-I-O-N---D-I-S-P-L-A-Y-+
! ERROR NUMBER: 52 RESIDUE: 0 !
! BLOCK NUMBER: 0 NUMREC: 0 !
+-------------------------------------------------+
*23* FAILURE TO OPEN TEXT FILE (52)
NONEXISTENT PERMANENT FILE (FSERR 52)
|
Verify the spelling of your file name with the LISTFILE command. Retype the command to retrieve a file. In trying to retrieve a file, did the following prompt appear on your screen?
LOCKWORD: username.groupname.acctname?
|
This prompt is informing you that a lockword may have been inadvertently assigned to your file. Ask the system administrator to identify the lockword for you. At the lockword prompt, type in the lockword. Keep your file under a different name, making sure that you do not use the "/" character in the new name. Delete the old file name to prevent further occurrences of this problem. Did you get the following error message?
OUT OF DISC SPACE (FSERR)
|
This error message indicates that you have run out of disk space allotted to you. To create disk space, delete any files that are not needed with the PURGE command. Have some of your files stored to cassette tape using the STORE command, and then erase those files from the disk. Refer to the "Working with Files" section of this chapter for instructions on the use of these commands.
|