|
|
Using HP 3000 MPE/iX: Fundamental Skills Tutorial: HP 3000 MPE/iX Computer Systems > Chapter 4 Creating Text FilesLesson 1 Using EDIT/3000 |
|
Lesson 1 presents
The text editor EDIT/3000 is a Hewlett-Packard subsystem that comes bundled with your MPE/iX operating system. It is devoted to the general task of creating and editing text files. the editor has its own special set of commands and subcommands that give you considerable flexibility in your work. At work you may hear the terms application, subsystem, utility, and program. They are all basically programs, but with subtle differences between them. Those differences are not especially significant to the general user. EDIT/3000 is available to everyone who uses your MPE/iX system. The fundamentals of EDIT/3000 are easy to learn. EDIT/3000 produces text that is fully compatible with all MPE/iX operations. EDIT/3000 allows you to create any kind of file that you might need with MPE/iX.
Starting the editor is simple. Just type the command name and press Return. Enter:
When the editor starts, your screen should look something like this:
Notice that the MPE/iX system prompt has disappeared. Instead, the editor provides its own prompt, the slash (/). When the editor prompt ( / ) and the cursor are alone on a blank line, the editor is in command mode. In command mode, you can issue EDIT/3000 commands, but you cannot create lines of text. To get out of the editor program, use the END, EXIT, or E command. Enter:
Get out of the editor program now. Your screen should look like this:
The computer once again displays the MPE/iX system prompt.
Get into the editor again. Enter:
Do you have the editor slash prompt on your screen? If you do, you are in command mode. The command to start writing in the editor is ADD or A. Commands must be entered when the editor is in the command mode. You can enter commands in all uppercase letters, all lowercase letters, or a combination of uppercase and lowercase letters. Enter:
It should look like this on your screen:
ADD puts the editor in edit mode. Now you can enter text.
The editor provides the number of the next line that you type. Since you have started a new file, the first line number is 1. You are now ready to begin typing. When typing in text, remember the following:
Type this:
Does your screen look like this?
Notice what happens:
Type in the rest of these lines, and notice where the Return key should be pressed:
Your file should look like this:
Notice that the cursor is on an empty line. You are now ready to change back to command mode. If you were to change back to command mode while the cursor was at the end of line five, you would lose line five. To stop adding lines, enter:
It should look like this on your screen:
The editor is now in command mode. You can now execute EDIT/3000 commands again.
At this point, you may wish to see all of the file you have just written. To see all of a file on screen, use the LIST or L command. Enter:
You should see all of the file scroll upward on your screen. If it were a long file, you might need to use STOP or CTRLS to stop the scrolling (and then STOP again or CTRLQ to let the scrolling continue). You can display a single line from a file, too. Try this:
You should see line 5 scroll up on your screen. You can display a portion of a file: Enter:
This tells the computer to show you lines 2 through 4. You should see lines 2, 3, and 4 scroll into view.
So far your text exists only in the editor's workspace. In order to keep text permanently, you must save the file on disk. The command to save or keep a file permanently is KEEP. This saves the file on a computer disk. The editor requires that you give the file a name when you keep it on the disk. Call it DOCUMENT. Enter:
You know that your file has been kept when the / prompt reappears. Enter:
What happens? You have saved a copy of the file to disk. A copy of the file is still in the editor's workspace, too. The cursor is now at the beginning of a new line, line number 6. Add this text at line number 6:
Get out of edit mode (//Return). By now the screen is a little cluttered. List your file again. Enter:
Keep DOCUMENT once more. Enter:
Do you get this message on the screen?
The editor knows that a version of DOCUMENT already exists on the computer disk. It assumes that the file you are keeping is a new version of the same file, so it asks: "Do you want to purge (erase) the old version on the disk and replace it with the new version you are keeping?" In this case, the computer is waiting for you to answer YES or NO to its question.
This time, enter:
This message should appear on the screen:
Is your file still in the workspace? Enter:
You should see your file displayed on the screen. Leave the editor by entering this:
You should see this on the screen:
The editor knows that you added a line to the original text (line 6). So, it asks whether you want to save this new version of the file before ending the program.
This time, enter:
The following message should appear on your screen:
To save the file, use:
Again, you are asked if you want to purge (erase) the old version of the file. Enter:
The editor now saves the most recent version of the file (and in doing so destroys the older version). If you want to keep two versions of the file, you have to save one version with one name and the other version with another name. Finally, exit the editor. Enter:
Now that you have created and kept a file, how can you keep track of any or all of the files that you save? The MPE/iX command LISTFILE alphabetically displays file names to your terminal screen. At the MPE/iX prompt, enter:
Your screen should look something like this:
There may be other files listed on the screen, but for now, check to see if DOCUMENT is there.
|
|