atari email archive

a collection of messages sent at Atari from 1983 to 1992.

Editing files in shared directories

(1 / 1)


	Have you ever "lost" an edit?  Changes you made once mysteriously
evaporated from later versions of the same file?  The cause was probably
"too many cooks".  Yasee, both EDT and TPU create the output file (the
edited version) when they exit.  It is some manipulation of the file
at the time it started.  If you begin an edit session while somebody
else is editing the same file, you'll both start with the same data.
You each make your own changes, and when each of you finish, each of you
writes a new version with your changes incorporated.  The one who exits
LAST will create the highest-numbered version, in other words, the current
file.  The poor guy who exits first has his changes evaporate.

	"Big deal" you say!  Well it is, if it is your data that is lost.
And the real pain of it is that this almost never happens except when deadlines
are close and you can't afford the time to find it or fix it.

	Well, there's a cure.  You can ensure that you don't step on anyone
else; but you can't stop them from stepping on you.  On the other hand, nobody
wants to waste their effort; if all concerned are careful not to start an
edit while another is in progress, it will never happen.

	There exists a command file that does all kinds of nice things for
you, including checking for existing journal files (made automatically when
you edit a file).  It also finds an editor initializer file, if you have one,
so you don't have to specify it every time, or copy it to each directory in
which you intend to edit.

	To use it, define (in your login.com) EDT or TPU to mean @UTL$COM:EDT
or @UTL$COM:TPU (your choice).  You may use both, if you are bilingual.  The
command files are in fact identical, and find out which editor to run by the
name of the command file you use.  They check for existing journal files, for
both editors (they know about each other), they do the initializer search,
they know about the /READ_ONLY and /RECOVER qualifiers, and so on.  They will
NOT enter the editor if there is a journal file open.  They will not enter
the editor if an old journal file exists.  If you're just looking, you can
specify /READ_ONLY and it will remind you of the danger (of overwriting some-
body else's changes) and let you in.

	In general:  If you already define symbols that call out the editor
you want, replace the EDIT/EDT or EDT verb part with @UTL$COM:EDT (and similarly
for TPU).  If the first thing after the name of the editor is a slash, you'll
need to put double quotes in it, as follows:

	for				use
$ EDT :== EDIT/EDT		$ EDT == "@UTL$COM:EDT """	! note quotes
$ HEY :== 'EDT' SYS$NAG:NAG.DAT	$ HAY :== @UTL$COM:EDT SYS$NAG:NAG.DAT
$ AGAIN :== EDIT/EDT/RECOVER	$ AGAIN == "@UTL$COM:EDT ""/RECOVER"

	For those of you in engineering who use (or used) "E", that is the
initializer locating logic installed here.  If you have an EDT inializer
file you always want to use, do:
	$ define edtini sys$login:edtini.ini	! or wherever it is
	$ define tpuini sys$login:tpuini.ini	! tpu version of the same

As usual, if you find problems that I've missed, let me know.

sas
Message 1 of 1

Sep 18, 1987