Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

RPG ILE and NULL-values (?)

1,443 views
Skip to first unread message

Barbara Morris

unread,
Dec 23, 1999, 3:00:00 AM12/23/99
to
Yes, starting in V3R7. You have to compile with ALWNULL(*USRCTL) (code
this in your H spec if you have V4R2 or later).

Here's a brief overview of the ILE RPG null-value support:

To set a field to be null-valued, use:
C eval %nullind(fld) = *on

You test if a field is null-valued using
C if %nullind(fld)

To search for a null-key in a file, code an indicator in factor 2 of
KFLD. Set the indicator to '1' if you want to search for a null key.

Barbara Morris

Gunnar Skandsen wrote:
>
> Is it possible to update a NULL-capable field
> (ex. an *ISO-date field) with a NULL-value ?
>
> Gunnar

Thomas Raddatz

unread,
Dec 23, 1999, 3:00:00 AM12/23/99
to gusk...@alfanett.no
Just use the %nullInd() function to accomplish that task.

Example:

Eval %nullInd(dateField) = *ON

That愀 all.

Thomas Raddatz, Germany.

Gunnar Skandsen schrieb:


>
> Is it possible to update a NULL-capable field
> (ex. an *ISO-date field) with a NULL-value ?
>
> Gunnar

--
*=====================================================*

e-mail Adresse:
Thomas....@Online-Club.de

Homepage:
http://www.online-club.de/~Thomas.Raddatz/

*=====================================================*

Gunnar Skandsen

unread,
Dec 24, 1999, 3:00:00 AM12/24/99
to

MOTTE RODOLPHE

unread,
Dec 27, 1999, 3:00:00 AM12/27/99
to
In your DDS, you should add the keyword ALWNULL for the field you want to be
NULL capable.
But don't forget you'll have to seton Null indicator for each field you want
to set Null before performing a Write operation, oterwise those fields will
have *zero or *blank value by default
If anyone knows an instruction that set to Null all the Null capable field
of a format, that would help me (even the DFT(*NULL) keyword doesn't work !)

Gunnar Skandsen <gusk...@alfanett.no> a écrit dans le message :
3863E5DF...@alfanett.no...

0 new messages