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



Frank,

Shouldn't the null map contain integers instead of booleans?

-mark

On 1/17/2019 2:02 AM, Frank Kolmann wrote:
Ok thanks Barbara, I will try again.
Just to be specific.

What I am doing is writing a "Generic" file update program that can update any file.
I am using the C Ropen/Rwrite etc functions and it is mostly working except when I try to ADD a new record.
The ADD fails where I get a error
Cause . . . . . : A data mapping error occurred on field ACTIV in record
number 0, record format TESTR, member number 1, in member TESTPFN file
TESTPFN in library KOLMANN, because of error code 20.

20 -- A field that is not null capable could not be set to null.

Every field in the file has ALWNULL keyword.

I set up a specific NULL byte map
// Set NULL byte MAP
KOLMANN_TESTPFN_TESTR_nmap_t = *all'0';
KOLMANN_TESTPFN_TESTR_nkmap_t = *all'0';

xn.in_null_map = %addr(KOLMANN_TESTPFN_TESTR_nmap_t);
xn.null_key_map = %addr(KOLMANN_TESTPFN_TESTR_nkmap_t);
xn.out_null_map = %addr(KOLMANN_TESTPFN_TESTR_nmap_t);
XN.NULL_MAP_LEN = numfld;
XN.nullkymaplen = numkey;
record = data;
fb_p = Rwrite(in_p : buf_p : RCDL );
ErrMsg = %str(strerror(errno));
UPDDONE = @TRUE;
ENDIF;

This is a portion of the NULL MAP DS.
*
D KOLMANN_TESTPFN_TESTR_nmap_t...
D DS qualified align
D ACTIV N
D NULL1 N
D CMPNO N
D NULL2 N
D PLTNO N
D PRDNO N
D OPBAL N
== snip ==


Regards
Frank

On 17/01/2019 3:55 AM, Barbara Morris wrote:
On 2019-01-16 11:27 AM, Charles Wilt wrote:
Think you missed the point of Barbara's message...

As I read it, she's suggesting you split the code into two modules...
- One with ALWNUL(*USRCTL) that handles the PF I/O
- One with ALWNULL(*NO) that handles the UDDS display file I/O


No, I don't think he needs two modules. Even if there's a UDDS display file that wouldn't use null values in the ALWNULL(*USRCTL) module, the PF I/O can would still handle null values ok.



As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.