× 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: Mon, 14 Jan 2019 19:05:30 +1100
  • Arc-authentication-results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=SQWZ+0Rt; 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:content-transfer-encoding:in-reply-to:mime-version :user-agent:date:message-id:references:to:subject:from :dkim-signature; bh=UeVAd42fQOYJtnWRQcMC65uNffjf4vzuX3X+71MgZIo=; b=QWCGTbfKTJWwv1M3JsjCPoWhi5PdoeqrcnIrvuWRikMODvSrC5GEkHTjetILs0jkjs hO9im3je5uAb67J30IzpKN1LMaCttOdfrEEUu2vGhIAnhpb0rDlVNi/atBiVw7gHaQk6 DAz9AjCCwT70RQtfWrBVPLeCI1SRHHx24KhzfOOFnkvr0HGlDG080bBOP/xhn4fEKjT7 ewTL+pzdRaZKZJdzlfwasYp/RPABJvVtai47jCEr39IrgAzILjnmnFMPo4RtKx5zUCS/ qzW0hkUAU0Ex5X+DRKHujiSMKsciEgDp1n8rRg+Z9CjhNJHrat0tkkzTaWdGgT6waM6C cC9A==
  • Arc-seal: i=1; a=rsa-sha256; t=1547453115; cv=none; d=google.com; s=arc-20160816; b=iJG1Dft66Jv81lK4iMTBvMVMw4FMmdNHUZfEJSbEkmt0onC5H/MhQQ4qCxTGccohuV 3qS4pePye0uf6cHmK8hrezbB1ixzgQ1eeHdaRnw1Gi2uBLj6346eev9I4EiWrBiy7I58 rVTYraZc/Vjvw0zoCbuo/jGYjGcnxJ57T9PJkfRjvHQt35iUsq9CdADqyS7VWNhiiVuQ I3/S2PAEDAI6N2fyIiUQEFQBj2ML7f4puDED+v8lkX/KtB3BNtYL2HfCe2wyNaf/vLNv Nhszave0oxKEBzmENrosKlsHvgnWe6R4hgvXHU4ae/+kzT7QcyFz+9lh4tsgyRsVUpfI sMbQ==
  • 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>

Thanks Buck

After some attempts to cater for NULL values I have figured out that UDDS is fundamentally in conflict with NULL values.
UDDS requires a program described Display file, and ANY program described file makes the RPG compiler create the program with ALWNULL(*NO).
Further, Full Free Form RPG does not allow Program described files so UDDS has effectively gone the way of the Dodo.

The only possible way out of the dilemma is to have a separate program that does the file updates calling the C  Ropen/Rwrite etc functions.
I think I will try the split out into a separate program.
However the question remains how  the UDDS display program sets fields to null, I think field/exit will clear a field to null, but most probably it will be too messy if not impossible.
Possibly separate modules some with ALWNULL(*USRCTL) some with ALWNULL(*NO) but I suspect this will cause the CRTPGM to fail,

I could replace the UDDS code with DSM but the point of this exercise was to demonstrate UDDS.
I have a program that uses DSM here. https://wiki.midrange.com/index.php/QDFRTVFD_%E2%80%94_Retrieve_Display_File_Description#DSMFD_Driver
It will be a major rewrite to convert to DSM and probably not worth the effort, given the power of SQL, so I may do this only as a spare time job, if ever.

RIP UDDS

Regards
Frank Kolmann

On 8/12/2018 9:18 AM, Buck Calabro wrote:
On 12/7/2018 5:06 PM, Frank Kolmann wrote:

Looks like my utility will never work on NULL capable fields.

--  snip from the RPG Manual ---
Database Null Value Support
Note: For a program-described file, a null value in the record always
causes a data mapping error, regardless of the value specified on the
ALWNULL keyword.
---- end snip  ----
Perhaps I can read the mapping error *DIAG messages and infer that the
columns are NULL. The question is whether the rest of the columns will
get populated or not.
--buck

http://wiki.midrange.com
Your updates make it better!



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.