| RE: VFC-formatted relative files, and printing indexed and relative files
To prevent the ACCVIO reported here, a change was made in the DCPS sources
in October 1993 to prevent the printing of indexed and relative files.
Well, as "new guy on the block", I wondered why DCPS would not support the
printing of such files. In my distant memory, I remember doing RMS work
on indexed files, and I believed that sequential access to them with no
special setup simply reads in order by the primary key. I dug out the RMS
books and could find no particular issues with sequential access to indexed
or relative files.
So I hacked the code and printed a PRN-formatted relative file just fine,
and so too an indexed file. No ACCVIO. I dug up DCPS V1.0C and still no
problem. I then created a VFC file with a 37 byte header and a max length
of 132 and the ACCVIO was back!
BUT I eventually found that a VFC-formatted SEQUENTIAL file with a 37-byte
header would also ACCVIO.
I set a breakpoint at the ACCVIO location, but the break never occurred.
Further, the stack was wiped out so I couldn't look at the call frame.
The immediate cause of the ACCVIO was looking at a RAB at address one (1),
but I didn't know why.
To wrap up this story... turns out that an assumption was made that every
VFC file would have a two-byte header. NOT! Any header longer than two
bytes would start corrupting data on the stack. For 37 bytes, it altered
the register save mask in the stack frame so that when an earlier routine
returned, the caller's registers were trash!
I've also reenabled the printing of indexed and relative files. Unless
some other problem surfaces with doing so, this "feature" will once again
be available in DCPS V1.4.
[Some have argued that indexed and relative files should not be allowed
because they often contain binary data (see note 5287). This is true,
but .OBJ and .EXE files contain binary data too... should we not allow
sequential files either?!!! I say, garbage in... garbage (vs. nothing)
out. Let the user beware!]
By the way, other than the release note mentioned in an earlier reply,
I found nothing in the SPD nor the hardcopy docs to indicate that indexed
and relative files are not supported.
--Dan S.
|