[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Disk DB
- Subject: Re: Disk DB
- From: valthoff@magnus.acs.ohio-state.edu (Victoria M Althoff)
- Date: 10 Dec 1993 04:29:50 GMT
- Keywords: *T 057 STUFF ON MY DISKS 12/09
- Newsgroups: comp.sys.apple2
- Organization: The Ohio State University
- References: <1993Dec8.085841.5365@pro-novapple.clark.net> <1993Dec9.224655.2162
Two potential problems with that...
First of all, just for convenience, I believe the APPEND command does not
require a slot or drive specification if the file has already been opened. DOS
3.3 will remember the locations of all open files. No problem there.
FIRST PROBLEM: The DOS 3.3 APPEND command has NEVER worked properly. Every
re-release of DOS 3 has contained a patch to 'fix' a bug with APPEND, and to my
knowledge, they never did get it right. Unfortunately, I don't know the exact
nature of this bug. My tactic is to simply avoid that command entirely.
SECOND (and stickier) PROBLEM: The DOS 3.3 "WRITE" command will send all text
output that goes through the normal COUT ($FDED) character display routine to
the open text file. DOS itself uses that output routine, so the above program
SHOULD work. But you will probably have problems. As I recall, there are
several ways to shut down a WRITE operation. One is to CLOSE the file.
The other is to send a Ctrl-D character. This is so that you can issue a CLOSE
command, or a command to READ, or a command to WRITE, without having the
command written to the file. Consequently, you get the pointer set to the end
of the file, you get ready to write, then you issue a Ctrl-D to issue the
CATALOG command. That self-same CTRL-D will shut down the WRITE operation, and
you will get nothing in the file 8-(.
MY SOLUTION TO BOTH PROBLEMS: First of all, you know what this program is
going to do. So eliminate the APPEND statement; instead, don't CLOSE the file
between disks. Of course, this means you have to sacrifice screen prompts, or
end up with the prompts written to the file. Just accept a carriage return
(INPUT "";KK$). Then, instead of issuing a "^DCATALOGD2" command, CALL the DOS
catalog command handler directly. Unfortunately, I don't have the address
off-hand (or I'd post it). Of course, you would also have to POKE the
appropriate drive specification. But that will prevent the ^D from getting
intercepted by the WRITE command.
ANOTHER SUGGESTION: When you are WRITEing to a file, the screen output is
suppressed. This would be a great place to use one of my favorite DOS 3.3
commands (apparently left out of ProDOS), MON CIO. Or, at least MON CO.
For the uninitiated, MON tells DOS to echo [C]ommands, text [I]nput, and/or
text [O]utput to the screen during deferred-mode execution.
--Dave Althoff, Jr.
(specializing in DOS 3.3 TEXT files)
- Follow-Ups:
- Re: Disk DB
- From: valthoff@magnus.acs.ohio-state.edu (Victoria M Althoff)