file [filename]
If you do not specify a file name, the contents of your workfile (without the top line) will be written in the file your workfile is assigned to. You find the name of the respective file in the status line from column 19 onwards or in the top line after the words TOP LINE. If the file name corresponding to your workfile is longer than 41 characters, there will be only its beginning displayed in the status line. In this case, you may have to look it up in the top line to be able to read the full name of the file.
If there is no file name assigned to your workfile, you receive this message:
Parameter missing
Contrasting, if you specify a file name in the FILE command, the workfile will be written in this file. If the file assigned to your workfile has a different name, it will not be changed.
The file name, both the one that is assigned to the workfile and the one you specified in the FILE command, could be either an absolute or a relative file name.
Now we have to differentiate between Unix and Windows systems.
In Unix systems:
An absolute file name begins with a slash, a relative one does not. If you specify a relative file name, it will be completed by exaEdit putting your current working directory in front of it. If you would like to know the name of your current working directory, you may use the following exaEdit command:
call pwd
or _pwd
This gives you the result of the Unix command pwd (pathname of the working directory). For example: If
/u/fmath/ppreus/exaEdit
is your current working directory, the following two commands
file etc/one
or file /etc/one
write into the following two files:
You may also refer to the parent directory by using the common spelling conventions. In the example above, you would use
file ../abc/two
to write in the file
/u/fmath/ppreus/abc/two
although your working directory is
/u/fmath/ppreus/exaEdit
at the moment.
Finally, you could also use the spelling with the tilde
(~
) for the file name.
In the following example
~/...
the tilde stands for your HOME directory and
~uid/...
stands for the HOME directory of uid
.
In Windows systems:
An absolute file name begins with a backslash (`\') or a drive letter, a relative one does not. If you specify a relative file name, it will be completed to an absolute file name by exaEdit putting the name of your current working directory in front of it. If you would like to know the name of your current working directory, you may use the following exaEdit command:
call cd or _cd
d:\pe\dok
file winnt\win.ini or
file \winnt\win.ini
d:\pe\dok\winnt\win.ini or
d:\winnt\win.ini
file ..\abc\two
d:\pe\abc\two
d:\pe\dok
From here on, it is about Unix and Windows systems both.
If the file name you specified in the FILE command contains spaces, apostrophes or the command separator, you have to include the file name in apostrophes. In the example
file 'a ;'
the file name consists in an a, one space, and the semicolon (which is your command separator). An apostrophe as part of the file name has to be spelt as two apostrophes in a row.
Before the workfile is actually written in the file, exaEdit finds out whether the file already exists or whether it is a new file. Then you receive one of the two following messages:
Old data set, press J or Y to replace it:
New data set, press J or Y to create it:
These questions are used to reduce the danger of typing errors and file names you did not want to specify.
If you want to continue the saving process as you specified it, you only
have to press the key `J
' or `Y
'
(standing for `ja' or `yes'); small letters are sufficient,
the return key is not necessary.
If you press - involuntarily or voluntarily - another key, you
receive this message:
ATTENTION: Data not saved!
and the alarm message beeps if it exists. But if you allowed the saving process to continue and everything has worked without problems, you receive the message
Data saved
It is important to note that you will only see the latter message if
you respond to the request `press J or Y ...
'
with either the J or the Y key without
pressing the return key afterwards.
When you save a workfile you may receive one of the following error messages:
Data set may be read onlyThe access rights for the file to write in are such that only read is possible.
File not found
This message appears if exaEdit cannot find the file in question. Maybe you made a typing error or the file is in another directory.
File system may be read only
The access setting for the directory to write in says that you only have admission to read.
No Home-directory found for ...
This message appears when you have used ~uid
(see above) and the operating system cannot find a home
directory for uid.
No file and no directory
This message appears if the object you wanted to save into is neither a file nor a directory. It cannot be edited.
No connection to another computer
In order to find out whether you have access to the file you specified, the operating system has to ask for access at a computer different from the one you are just working at. But if the other computer or the connection to it do not work properly, you receive the message cited above. It is highly probable, then, that you cannot read or write any file at the moment.
Ending ' missing
This message occurs if a file name in the FILE command
begins with an apostrophe ('
) but exaEdit
cannot find the corresponding closing apostrophe, and so
exaEdit does not know which file name is meant.
The latter is the case if there is a space in the line anywhere after the
opening apostrophe
which is followed by still other characters. In other words: If the file
name (which you want to enclose in apostrophes) contains no spaces, you may
leave out the closing apostrophe.
Part of the name is no directory
A component of the absolute file name which is not the last one was found not to be a directory but, for example, a file.
A directory cannot be edited
This message appears if you tried to save in a directory instead in a file. exaEdit can only handle files.
Directory not found
You receive this message if a directory in your file name could not be found.
Too many symbolic links, refer to itself?
This message appears if the operating system cannot solve the file name, which contains links to other files. The cause is in most cases a circular definition, i.e. a direct or indirect link to itself.
Access not allowed
This message appears if you are denied access to a file because it belongs to somebody else, for example.
access errno = ...
getcwd errno = ...
stat errno = ...
and similar messages. These messages should never occur. They appear if certain errors happen, for which exaEdit has no special message stored. If you receive one of these messages, you should fix the complete message together with the circumstances of its appearance and send this information to the author of exaEdit.
Finally, it may be interesting for you to know that in writing the
workfiles back onto the disk any space at the end of each
record (including the last one) is taken away and a newline
character (\n
, x0a) is added there.