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



Hello Frank,

What keywords did you specify for the mode parameter on the _Ropen call?

Cheers,
Carsten

-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Frank Kolmann
Sent: 17. januar 2019 08:02
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: RPG UDDS Generic File Display/Update (Null fields in program described files)

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 ==

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.