• Subject: RE: Trigger question - Null Fields
  • From: John P Carr <jpcarr@xxxxxxxxxxxx>
  • Date: Sat, 5 Feb 2000 12:48:53 -0500


Yes the Null-capable field will still have "Valid" data for the 
type of field it is even when the associated Null Flag is set to "YES".

The reason is that of the 256 characters(x'00' to x'FF') none of them
represents a NULL condition.  There is a flag associated with every 
Null capable field to say that the state of the field is Null.  Hence,  
the data inside is "Invalid"  to look at or to derive any meaning from.

In SQL you will receive a binary field used as the Null indicator for 
every Null capable field.   It is set to Negative 1 if the field is null.
You should inspect the Flag first for Null Capable fields then use
the field if it isn't "Null".   This is is true also for the Before, and
After
images sent by the OS in a Trigger program.  Test the Null flags 
associated with the Before and After record images and 
perform the appropriate action.

John Carr
PowerTech
www.400school.com


-------------------------
I thought the whole point of NULL data was there was no value. If a field is
NULL, there is no such thing as valid data for the field... Is this a
database issue, or an RPG issue?

I'm still working on it, though.
Thanks everyone so far!

Loyd
+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to MIDRANGE-L@midrange.com.
| To subscribe to this list send email to MIDRANGE-L-SUB@midrange.com.
| To unsubscribe from this list send email to MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.