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



Okay.  I understand that and what a *null value is then.  Does that mean the 
null maps are there to help the programmer to check the value of fields as part 
of the trigger processing?  

-Tracy 
 Ext. 3107


-----Original Message-----
From: Buck Calabro [mailto:Buck.Calabro@xxxxxxxxxxxx]
Sent: Friday, March 21, 2003 10:32 AM
To: RPG programming on the AS400 / iSeries
Subject: RE: Programming a trigger audit in ILE


>I am having trouble defining the Null Maps.  The compiler 
>doesn't like the ONField and NNField definitions.  I am a 
>little lost how this would be used anyway.  My file contains a 
>date field that could be '0001-01-01'.  Is that considered a 
>null value for an *ISO date?   If I am not doing anything 
>specific with a field, do I need to code for the null maps?

NULL is not a value, it is an attribute of the field, like its length, type
and text.  Unlike text and length, the NULL attribute can be changed during
run time.  You never check or change the NULL attribute by looking at the
value of the variable.  That is, you can't do something like if date =
*NULL.  Rather, you need to wither use the null indicator BIF if
%nullind(date) or the null map.  The null map is a series of short integers
that act as flags to indicate whether a field is null or not.  The null map
must have as many variables as your file does.

DRtnData          ds                  occurs(10)
D TblLib                        10              
D TblName                       10              
D TblType                        1              
D TblText                       50              
D ColName                       10              
D ColType                       10              
D ColLen                         9  0           
D ColScale                       9  0           
D ColText                       50              

D* Null map for retrieved variables             
DRtnNullRaw       ds                  occurs(10)
D NullMap                        5i 0 dim(9)    

In this example, I used an array, but you could use individual variables if
you chose to.  Here, NullMap(1) acts as the null indicator for TblLib.
NullMap(2) is the null indicator for TblName and so on.          

  --buck
_______________________________________________
This is the RPG programming on the AS400 / iSeries (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.



As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.