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



>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

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.