This may be completely irrelavent, but I was wondering about IDDU... I haven't used it much since I came to OS400, but as I recall, it allows an external definition to be placed over a flat file. I don't remember if it's possible to define multiple record formats, so this might not work for this application anyway...
Eric
-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of Barbara Morris
Sent: Monday, August 13, 2007 8:16 PM
To: midrange-l@xxxxxxxxxxxx
Subject: Re: Handling null-capable fields with program-described
file--readingexternally described using program defined layout
Peter Dow (ML) wrote:
If I understand what you're saying, it's the RPG compiler that is not
passing the ALWNULL() request to the LIC database code when it's opening
a program-described file. Barbara, if you're listening, is this what's
going on?
Yes, only externally-described files can be opened by RPG to handle
null-valued fields. I think the RPG compiler is working as designed,
since the help for ALWNULL explicitly says that the ALWNULL parameter
only applies to externally described files.
Even if "externally described file" could be interpreted in some sense
other than the normal RPG sense of 'E' in the F spec, the actual meaning
of ALWNULL(*YES or *INPUTONLY) has been well established since V2R1 when
the ALWNULL parameter was added to the CRTRPGPGM command. That meaning
cannot be extended to apply to program-described files without some new
syntax to allow the RPG programmer to request it. The current behaviour
may seem like a bug for an application that wants to behave like DSPPFM;
but it is a feature for an application that was never intended to work
if a record had a null-valued field.
As an Amazon Associate we earn from qualifying purchases.