There are two different ways to load a file, which means to read from the data medium and bring the file into the workfile. The first method is to specify a file name when calling exaEdit:
exaedit file
If the file name contains special characters, you have to make special arrangements, for example, put the name in quotation marks ("). But this does not help in every case. How you actually have to deal with this problem is, for Unix, determined by your interface (shell) or has to be looked up for Windows.
If the loading was successful, the file name is assigned to the workfile, which means that it appears in the top line and in the status line. As a result of this, when the command FILE is given without the specification of a file name, the workfile will be written in the file with this name.
The second method to load a file is to use the command LOAD with a file name during a running exaEdit session:
load file
The file name, either the one which is assigned to the workfile or the one you specified in the LOAD command, can be an absolute or a relative file name.
Now we have to differentiate between Unix and Windows systems.
In Unix systems:
The absolute file name begins with a slash, the relative one does not. If you specify a relative file name, it will be completed to an absolute file name by putting the current directory in front of your relative specification. If you want to find out the name of your current working directory, you may use the exaEdit command
call pwd or _pwd
/u/fmath/ppreus/exaEdit
load etc/one or load /etc/one
/u/fmath/ppreus/exaEdit/etc/one or
/etc/one
load ../abc/two
to read the file
/u/fmath/ppreus/abc/two
and be successful with this although your current working directory is
/u/fmath/ppreus/exaEdit
Additionally, you may also use the spelling with the tilde (~) for file names. In the next example,
~/...
the tilde stands for your HOME directory, in the following example,
~uid/...
~uid stands for the HOME directory of uid.
In Windows systems:
The absolute file name begins with a backslash (\) or drive letter, the relative one does not. If you specify a relative file name, it will be completed to an absolute file name by putting the current directory in front of your relative specification. If you want to find out the name of your current working directory, you may use the exaEdit command
call cd or _cd
d:\pe\dok
load winnt\win.ini or load \winnt\win.ini
d:\pe\dok\winnt\win.ini or
d:\winnt\win.ini
load ..\abc\two
d:\pe\abc\two
d:\pe\dok
If the file name contains special characters, you have to apply the following rule: Put the entire file name in single apostrophes ('); replace an apostrophe within your file name by two apostrophes.
When loading a file with the LOAD command, it is important to know that loading a file is also possible for workfiles that are not empty. In this case, the file will be loaded behind the record of the current line. In order to add one file to another in this way, you have to load one of the two first (by means of exaEdit or LOAD), then you have to give the command BOTTOM and then you can load the other file with LOAD.
If the loading with the LOAD command was successful, the name of the loaded file will be assigned to the workfile (in other words, the file name becomes the file name of the workfile) if there has not been a file name for the workfile before. Contrastingly, if there already exists a file name for the workfile, it will not be changed through the execution of the LOAD command.
If you decide to transfer the result of your editing into another file, you can do this with the FILE command, compare section Saving a File.
Now, a few words about possible errors that could occur in the process of loading a file.
If the file you specified cannot be found, maybe because you made a spelling mistake or the file is in another directory, you will receive the following message:
File not found
`Common' mistakes you may make when you load a file are the following ones:
Parameter missing
Ending ' missing
Access not allowed
A directory cannot be edited
No file and no directory
No connection to another computer
Part of the name is no directory
Too many symbolic links, refer to itself?
access errno = ...
getcwd errno = ...
stat errno = ...
Data set not opened (does not exist?)