The NVI_Buf->Length_NVI is 10, it is exactly the same as the
fp->null_map_len. So I don't think the memory is getting corrupted?

The error I get is that the field is not NULL capable.

Data mapping error on member EMPDETS.
Message . . . . : Data mapping error on member EMPDETS.
Cause . . . . . : A data mapping error occurred on field RATED in record
number 0, record format EMPREC, member number 1, in member EMPDETS file
EMPDETS in library TSTMDTA, because of error code 20. The error code
20 -- A field that is not null capable could not be set to null.

This is after I changed some of the fields to be null capable. I am playing
with a Limited Availability API so I cannot pass on all of the information
which is making this even harder to resolve..


Chris Hird
Shield Advanced Solutions Ltd
1(519) 940-1192
Please consider the environment before printing this email.

This message, including any attached documents, is intended for the
addressees only. It may contain information that is confidential, privileged
and/or exempt from disclosure. No rights to privilege or confidentiality
have been waived. Any unauthorized use or disclosure is prohibited. If you
have received this message in error, please reply to the sender by e-mail
and delete or destroy all copies of this message.
Avant d'imprimer ce courriel, pensez à l'environnement.

Ce message, incluant tous les documents joints, est à l'intention des
destinataires visés seulement. Il peut contenir des renseignements
confidentiels, protégés et/ou ne pouvant pas être divulgués. Aucune
renonciation n'est faite quant à sa nature confidentielle et privilégiée.
Par conséquent, toute diffusion ou utilisation non autorisée est strictement
interdite. Si vous avez reçu ce message par erreur, veuillez en aviser
immédiatement l'expéditeur par retour de courriel et en détruire toutes les
copies existantes.

-----Original Message-----
From: c400-l-bounces@xxxxxxxxxxxx [mailto:c400-l-bounces@xxxxxxxxxxxx] On
Behalf Of Barbara Morris
Sent: Friday, September 14, 2012 5:07 PM
To: c400-l@xxxxxxxxxxxx
Subject: Re: [C400-L] _SET_NULL_MAP_FIELD() macro

On 9/14/2012 4:02 PM, Chris Hird wrote:
... I am wondering if I
can create a nullflds map over a file of say 8,000 null fields and
simple use it as a template for all null_maps? Probably easier if I
could simple access the in_null_map with a ptr and set the memory
directly with 0xF0 or 0xF1?

I don't think you really need anything special for the null field map; an
ordinary char* should do fine.

But in an earlier post, it looked like you were doing just that. At least,
I'm assuming that nvi_set was defined as a char *:

for(j = 0; j < NVI_Buf->Length_NVI; j++,data++,nvi_set++) {
if(*data == 0xF9)
*nvi_set = __NULL_VALUE;
*nvi_set = __NOT_NULL_VALUE;

The only think I can think of here is that NVI_Buf->Length_NVI is greater
fp->null_map_len. If so, you'd be corrupting some other storage which might
lead to the errors you're seeing. I don't think you've told us exactly what
errors you're seeing.
This is the C programming iSeries / AS400 (C400-L) mailing list To post a
message email: C400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list
or email: C400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at

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-2021 by 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.