[net.micro.pc] DataStar Help Needed

mojo@kepler.UUCP (Morris Jones) (04/08/86)

In article <664@epistemi.UUCP> rda@epistemi.UUCP (Robert Dale) writes:
>My friend has a membership/subscriptions file with approximately 500
>records, which just won't work.  On starting up DataStar, at first the
>program objected because it thought the .DTA file wasn't properly
>terminated.  After a bit of hacking around, I came to the conclusion that
>DataStar data files need to be terminated with a record whose contents are:
>
>	a byte with decimal value 255
	... etc.

What DataStar needs on the end of the file is a ^Z.  You can put
one there by simply opening the data file in WordStar and saving it.

The culprit is usually an older version of Formsort that left the
data file without a terminator byte.  There was a program supplied
on a number of the older version systems called "puteof.com" that
would add the proper terminator byte to the datafile.  If you find
a copy of puteof.com on your disk, you can use it to fix your
problem also.

A record starting with 255 marks a "deleted" record in DataStar.
You can remove them from the file without harm if they're at the end.

You should ask your system administrator to file a UUCP map entry, too.

-- 
Mojo
... Morris Jones, MicroPro Product Development
{lll-crg,ptsfa,dual,well,pyramid}!micropro!kepler!mojo

rda@epistemi.UUCP (Robert Dale) (04/08/86)

A friend has a Sanyo MBC-555 -- you know, the almost-IBM-alike with 160K
drives.  He has a problem with DataStar running on this machine.  He isn't a
programmer, and I'm new to DataStar.  I wonder if anyone out there can help
with the following problem:

My friend has a membership/subscriptions file with approximately 500
records, which just won't work.  On starting up DataStar, at first the
program objected because it thought the .DTA file wasn't properly
terminated.  After a bit of hacking around, I came to the conclusion that
DataStar data files need to be terminated with a record whose contents are:

	a byte with decimal value 255
	another byte with decimal value 255
	a comma
	another comma
	a carriage return
	a line feed

(I take it the carriage return/line feed is the standard record-end marker
in DataStar).  Well, I wrote a wee BASIC program to stick this sequence at
the end of the data file, and, hey presto ... DataStar produces a different 
error message.  This time it objects that "either the key field is the wrong
length or the index (.NDX) file is not terminated properly".  Okay:  my
friend doesn't know why his files are screwed up, but it looks like a crash
that resulted in both the .DTA and the .NDX files not being terminated
properly.  The problem is, I can't see any way to fix the .NDX file, since,
as far as I can see, it contains at least one CTRL-Z's, which BASIC believes
to be an end-of-file.  So, I can't read through the file to see what's at
its real end.  Any ideas?  The only tools we have available are BASIC,
WordStar, and EDLIN, and none of these will let me get past the CTRL-Z.  Is
there any way I can do this from BASIC?  Alternatively, does anyone know the
format of DataStar index files, such that I could reconstruct the index file
from the data file?

Any leads at all would be appreciated.  Unfortunately, this machine is an
island due to its weirdo disk format and its lack of ports, so I can't move
the data to another machine with better tools.


-- 

Robert Dale	University of Edinburgh, Centre for Cognitive Science,
                2 Buccleuch Place, Edinburgh, EH8 9LW, Scotland.

 ...!ukc!cstvax!epistemi!rda

mojo@kepler.UUCP (Morris Jones) (04/08/86)

I made a major mistake in my previous article on DataStar help.

The problem: DataStar complains about "file not properly terminated".
The problem file is not the data file but the index file (usually).
If the index file (file.ndx) ends on an even 128 byte record boundary,
older versions of Formsort don't end the file with a ^Z.  (Fixed in
InfoStar 1.6.)

However I was correct that "puteof.com" supplied with the older
DataStar will add a proper terminator to the index file.  The alternative
is to do it with debug.

-- 
Mojo
... Morris Jones, MicroPro Product Development
{lll-crg,ptsfa,dual,well,pyramid}!micropro!kepler!mojo