Creating Your First File
Xedit filename filetype filemode
If the file fn ft fm already exists, the XEDIT command begins an editing session with this file. An editing session is the time between entering an XEDIT command and entering a command (discussed later) to let the editor know you are finished working on the file.
If the file did not exist before, XEDIT will create one and start an editing session with it.
Let us create a simple file. It will contain information about things that are found at picnics. The file name is picnic. The file type is ingredts. (We cannot use ingredients because it has more than eight letters, so we will shorten it to ingredts). The file mode is A followed by a number n, but you do not have to type it. If you leave out the file mode, it is assumed to be An. Your cursor should be at the bottom left of the screen.
X picnic ingredts
PICNIC INGREDTS A1 F 80 Trunc=80 Size=0 Line=0 Col=1 Alt=0 1
Creating new file: 2
6
5
===== * * * Top of File * * * 7
|...+....1....+....2....+....3....+....4....+....5....+....6....+....7... 8
===== * * * End of File * * *
6
====> 3
4 X E D I T 1 File
- 1
- File Identification LineThe first line on the screen gives you the three-part file identifier — file name, file type, and file mode. F 80 means that each record of the file is fixed at 80 characters. Trunc means truncation column. Trunc=80 means that if you type more than 80 characters in a line, the additional characters are rejected by the system. Size=0 is the number of lines in the file. Because we have not entered any data yet, the file contains zero lines. Line=0 is the file line number of the current line. This is explained in number 7, which follows. Alt=0 is the alteration count, which is explained in Protecting Your Files.
- 2
- Message LineThe editor communicates with you by displaying messages on the second line (and third line, if necessary). These messages might tell you that you made an error in a command, or they might provide information. Here, the editor is telling you that you are creating a new file.
- 3
- Large Arrow Command LineThe large arrow (
====>
) at the bottom of the screen points to the XEDIT command line. One of the ways you communicate with the editor is by entering XEDIT commands on this line. XEDIT commands can be typed in either uppercase or lowercase, or a combination of both, and many can be abbreviated. For example, INPUT, Input, and i are all valid ways to type the INPUT command.After typing a command on this line, you must press Enter to send the command to the editor. When you press Enter, the command disappears from the command line and is processed or carried out.
- 4
- Status AreaThe lower right corner displays the current status of your editing session, for example, edit mode or input mode. It also shows the number of files you are editing. The status area in this screen shows that one file is being edited.
- 5
- Prefix AreaThe prefix area is the five equals signs (
=====
) that appear to the left of each line in the file. You can perform various editing tasks on a line by entering prefix commands in the prefix area of that line. We will discuss prefix commands later. - 6
- File AreaThe rest of the screen is available to display the lines in the file. The file lines are inserted between the ***Top of File*** and ***End of File*** notices you now see on the screen.
- 7
- Current LineThe current line is the file line in the middle of the screen (above the scale). It appears brighter than the other file lines or is highlighted. In the sample screen, the current line is the Top of File line.
The current line is important, because most commands you type in the command line perform their functions starting with the current line. Naturally, the line that is current will change as you move up and down in the file. Many XEDIT commands perform their functions starting with the current line, and change which line is current when they are finished.
- 8
- ScaleThe scale appears under the current line to assist you in editing. It is like the margin scale on a typewriter. If your screen does not show a scale, type
SET SCALE ON
at the command line and press Enter.