×
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.
Hi Birgitta,
The solution I was hoping to use was the ALWNULL(*INPUTONLY) solution,
wherein the system looks at the null flag and if it's on, sets the
associated field to it's default value (blank or zero). In other words,
I don't want to use the null flags in the program, I want the system to
handle them, which seems quite doable, since DSPPFM appears to do
something similar.
And actually (I think you pushed a button of mine wit h the word
"cannot"<g>) I see no reason at all why a null indicator array couldn't
be returned when a program-described record is read. If nothing else,
an API should be able to do it -- after all, I can get a list of the
externally-described fields for a program-described file. And as you
say, the null values are stored somewhere in the physical file object
and surely an MI program could retrieve them -- after all, the system is
able to retrieve them.
In fact, not only is the system retrieving them, it's trying to map them
to somewhere. And given that it managed to process 5 records of the
input file in question before blowing on the 6th, it's not a problem
mapping the null indicators, otherwise it would've had a problem with
the 1st record since it would have to map the null indicators that are
not set. Given that it's doing that much, it doesn't seem that much
harder to simply map a default value when it encounters a field with its
null indicator set.
But for whatever reason, it doesn't. So I need another method of
achieving the same end. Besides looking for an API method, wouldn't the
SQL APIs be able to do what I want? Prepare a "SELECT * FROM lib/file
INTO hostvar" then use the information about lib/file to extract the
field values.
Thanks for the idea!
*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
pdow@xxxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxxx> /
BirgittaHauser wrote:
Hi Peter,
%NULLIND and other solutions to handle NULL values won't work with
internally described files.
Null-Values are stored in separate flag lists that themselves are stored in
the physical file object. For each field a flag is created and can be set to
*ON (NULL-value) or *OFF (no NULL value). With the external description (and
ALWNULL in the H-Specs) these flag lists are integrated into the program
object and can be used (%NULLIND).
With an internally described file no such an flag list can be integrated and
consequently cannot be used.
As an Amazon Associate we earn from qualifying purchases.