× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This is a multi-part message in MIME format...
--
To: mi400@midrange.com
From: jamesl@hb.quik.com
X-Advert: http://emumail.com
Reply-To: jamesl@hb.quik.com
Date: Mon, 12 Nov 2001 15:56:51 AST
X-Mailer: EMUmail
Subject: Re: [MI400] More fun with nullmaps

On Mon, 12 Nov 2001 12:24:52 -0500 "Steve Richter" wrote:

> I am unclear on
what the null map is and when it is used. Could you try to
> explain
it?

Dear Steve (et al.):

The null map is used to communicate between the
application and the file
system. When reading or writing records in a
database file with null-capable
fields, the null map, a block of bytes (one
per field in the format, null-
capable or not) in the input and output
buffers, is used to indicate which of
the null-capable fields are in fact
null. If a field is null, the corresponding
byte in the null map is set to
EBCDIC '1' (x'F1'); if not-null, it is set to
EBCDIC '0' (x'F0').

I am
making a leap of conjecture at this point, but I suspect that under the

covers, just as date, time, and timestamp fields are stored in something
more
compact than their human-readable formats, VARLEN and null-capable
fields have
their excess bytes squeezed out.

At any rate, my latest
experiment has verified that while putting the null map
back where it was
found (i.e., in the input buffer, at byte "reclen + 11 +
keyfields +
keybytes") for the UPDATE operation works correctly (note also that
the
UPDATE operation uses the input buffer as its output buffer), none of the

obvious places work for the PUT operation.

Another of today's
experiments, changing Mr. Gaunt's null map demo program to
use an
"all-modes" open, causes it to crash with data mapping errors (giving
reason
code 20, that non-null-capable fields were nulled) on all fields,
null-
capable or not, null-flagged or not. The real application doesn't do
this.

I'd attempt to try dissecting an RPG400 program that does an "all
modes" open,
then writes new records with null-capable fields nulled-out,
but at this point
I'm not aware that one CAN null-out a null-capable field
from RPG400. (My
hardcopy RPG manual set is V2R1; I'll have to check the
softcopy AFTER LUNCH!).

One extremely kludgy alternative that comes to mind
would be to, if there are
any ones in the nullmap, PUT the field, read it
back, update the null map, then
use an UPDATE operation to force the null
map.

--
J.Lampert




As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.