× 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 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.

Mit freundlichen Grüßen / Best regards

Birgitta Hauser

"Shoot for the moon, even if you miss, you'll land among the stars." (Les
Brown)
"If you think education is expensive, try ignorance." (Derek Bok)
"What is worse than training your staff and losing them? Not training them
and keeping them!"

-----Ursprüngliche Nachricht-----
Von: midrange-l-bounces+hauser=sss-software.de@xxxxxxxxxxxx
[mailto:midrange-l-bounces+hauser=sss-software.de@xxxxxxxxxxxx] Im Auftrag
von Peter Dow (ML)
Gesendet: Wednesday, August 08, 2007 05:33
An: Midrange Systems Technical Discussion
Betreff: Re: Handling null-capable fields with program-described file--
reading externally described using program defined layout


Thanks Chuck. I tried, but same result. I also tried ALWNULL(*YES)
even though the help text says it's the same as *INPUTONLY just because
it was a value that wasn't mentioned in the manual for the H-spec
keyword. No luck though.

Actually, that help text is pretty much the same thing the manual
(Chapter 13. Control Specification Keywords) says about the ALWNULL
H-spec. The important phrase is "from externally described" input-only
database files. There's a link from that section back to Chapter 10.
Data Types and Definitions where there's a section on "Database Null
Value Support". That's where I got the excerpt I quoted.

You mentioned thinking a null key field might've caused the problem -- I
had to look at the program, but it doesn't have a K in the F-spec. And
it's input-only:

fINPUT if f32766 disk
usropn Input file
f extfile(InpFile) extmbr(InpMbr)

I had tried looking at the same file with DSPPFM which gave me some hope
that it should work, but maybe I should be using some other method of
reading the files, e.g. that API whose name escapes me at the moment,
fread, fget. I'll look into that tomorrow.

*Peter Dow* /
Dow Software Services, Inc.
909 793-9050
pdow@xxxxxxxxxxxxxxx <mailto:pdow@xxxxxxxxxxxxxxx> /


CRPence wrote:
The help text from CRTRPGMOD, instead of the snipped reference to
RPGLE doc:

Allow null values (ALWNULL) - Help
_*INPUTONLY_
Specifies that the ILE RPG module can successfully read records
with null-capable fields containing null values from externally
described input-only database files. When a record containing
null values is retrieved, no data mapping errors occur and the
database default values are placed into any fields which contain
null values. The module cannot do any of the following:
- use null-capable key fields
- create or update records containing null-capable fields
- determine whether a null-capable field is actually null
while the module is running
- set a null-capable field to be null.

Maybe try that parameter specification on the create command,
instead
of [or in addition to] using the H-Spec to see if that resolves.

DSPPFM uses that feature of the database, but DSPPFM never uses any
keyed access/lookup nor update. Although not RPG, DSPPFM also reads the
non-described data. At first glance of the help text, I thought maybe a
key field is null capable, giving rise to the error. But with a program
described definition of the file.? Well... it seemed more likely than
having declared the input file for update.?
Anyhow if eventually the feature gets activated, just like DSPPFM,
using that feature to Allow Null values prevents the application from
knowing or designating the datum as the NULL value [except possibly to
infer from the value being the default for the field].

Regards, Chuck


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

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.