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



Mark,

>From the manuals:

"Database Null Value Support

In an ILE RPG program, you can select one of three different ways of handling 
null-capable fields from an externally described database file. This depends on 
how the ALWNULL keyword on a control specification is used (ALWNULL can also be 
specified as a command parameter): 
1) ALWNULL(*USRCTL) - read, write, update, and delete records with null values 
and retrieve and position-to records with null keys. 
2) ALWNULL(*INPUTONLY) - read records with null values to access the data in 
the null fields 
3) ALWNULL(*NO) - do not process records with null values 

Note:
For a program-described file, a null value in the record always causes a data 
mapping error, regardless of the value specified on the ALWNULL keyword."

On the CRTBNDRPG the parameter ALWNULL(*YES) is similar to ALWNULL(*INPUTONLY). 
With ALWNULL(*USRCTL) you can use the %NULLIND BIF, from the manuals:

"%NULLIND(fieldname)

The %NULLIND built-in function can be used to query or set the null indicator 
for null-capable fields. This built-in function can only be used if the 
ALWNULL(*USRCTL) keyword is specified on a control specification or as a 
command parameter. The fieldname can be a null-capable array element, data 
structure, stand-alone field, subfield, or multiple occurrence data structure. 

%NULLIND can only be used in expressions in extended factor 2. 

When used on the right-hand side of an expression, this function returns the 
setting of the null indicator for the null-capable field. The setting can be 
*ON or *OFF. 

When used on the left-hand side of an expression, this function can be used to 
set the null indicator for null-capable fields to *ON or *OFF. The content of a 
null-capable field remains unchanged."

But I think, you aleady knew that.
As far as I can see there is no performance difference.

Regards,
Carel Teijgeler

*********** REPLY SEPARATOR  ***********

On 19-5-04 at 20:10 M. Lazarus wrote:

>  The reason I'm asking the question is because if there's no performance 
>difference then I see no reason to ever use ALWNULL(*INPUTONLY)!




As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.