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


  • Subject: Re: RPG UDDS Generic File Display/Update (Null fields in program described files)
  • From: Frank Kolmann <frank.kolmann@xxxxxxxxx>
  • Date: Thu, 17 Jan 2019 18:02:13 +1100
  • Arc-authentication-results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=fAMrjX0b; spf=pass (google.com: domain of frank.kolmann@xxxxxxxxx designates 209.85.220.41 as permitted sender) smtp.mailfrom=frank.kolmann@xxxxxxxxx; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-language:in-reply-to:mime-version:user-agent:date :message-id:references:to:subject:from:dkim-signature; bh=gq2/peooh7dj95FhKZtI9vm00ImzcLLXOiVFa+nj534=; b=iWCHgQpPRuL+cxkTwmXnyitjg3tfM8gJVMKrOICEtImYKNfTcJj4IlMnCKvx+G1WNB N1sJ2Cs0T8OckjzRcl7G5jCbZAjS0M7HwE3Rb0z/cMsEsFWfcISkdJKI0mW5rcKX8LJA +a0QNPko0r2qANx6i6LMCyCOpGKQ+g+FMzQ7jLjFfKZbV3/nH4bprV8aMs1xE1km2Vft UCaCIUf99Q3pB/CH87ssi6l3q0B/ssxaI3wxpwjCrtJTjxqyNMWosV7WRMtYE44yE4l2 0drraBKjmROLCo3izyCzN17tvISnOH1pLWeOS766qGi4tpts32AWdGb9TV8tr3qvWIAa UO4w==
  • Arc-seal: i=1; a=rsa-sha256; t=1547708531; cv=none; d=google.com; s=arc-20160816; b=omjcWG3aWwKQlwHWtsaiVU4gxAFPcGFufAaBG+5jo0DrGKtepvD7u5pd9UoYzVsZ+I 5B+6qGGHSh7phxXFf6/Ov+eA01WEgTHtb338G3SF4y9GG2NaxJPWWHi78r6/U1UVowXu 0pLs4AFoNlBbAfBH29uK6abg+1mkZ2wYLYp18GDvEpGATz5QHWXov9f7AVxDZimpOb8c QfD1yz6Ct2rKBQk0b2Zixfc4RAaTMgM1XoAIa8nyn5eJkTvjeYo2MTmOMY34ZQiXhouO V6nRXSHKDC3cA6dSnN7xpj7vBF7WdydUGP6+nAds7ld/tOlGw7+miQy/Zs+A7qnG3C5E FmyA==
  • List-archive: <https://archive.midrange.com/rpg400-l/>
  • List-help: <mailto:rpg400-l-request@lists.midrange.com?subject=help>
  • List-id: "RPG programming on the IBM i \(AS/400 and iSeries\)" <rpg400-l.lists.midrange.com>
  • List-post: <mailto:rpg400-l@lists.midrange.com>
  • List-subscribe: <https://lists.midrange.com/mailman/listinfo/rpg400-l>, <mailto:rpg400-l-request@lists.midrange.com?subject=subscribe>
  • List-unsubscribe: <https://lists.midrange.com/mailman/options/rpg400-l>, <mailto:rpg400-l-request@lists.midrange.com?subject=unsubscribe>

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.