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



"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx> wrote on 11/14/2014 09:51:31
AM:

From: Luis Rodriguez <luisro58@xxxxxxxxx>
To: "RPG programming on the IBM i (AS/400 and iSeries)" <rpg400-
l@xxxxxxxxxxxx>
Date: 11/14/2014 09:51 AM
Subject: Re: Can the ALWNULL(*USRCTL) option be limited to a specific
file?
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx>

On Fri, Nov 14, 2014 at 2:19 PM, <MichaelQuigley@xxxxxxxxxx> wrote:

e


Michael,

Can you change your file to a view that uses COALESCE? Something like
COALESCE(myField, 0) AS MyField ?

Regards,

Luis Rodriguez
IBM Certified Systems Expert — eServer i5 iSeries
--
--
This is the RPG programming on the IBM i (AS/400 and iSeries)
(RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/rpg400-l.


Luis,

I could rewrite all the access to our home-grown file to use SQL, but that
would require rewriting a large chunk of logic that has been working fine
for well over a decade. My problem isn't that I don't want to see the
nulls. The mull information from the home-grown file is important. My
problem is that the ALWNULL(*USRCTL) is now being applied to all files in
the program. The vendor's files have no null. Just our home-grown file has
null values.

This program was last compiled over four years ago--and ALWNULL(*USRCTL)
was added over ten years ago. It is working fine in production as last
compiled. Something must have changed between V5R4 and 7.1.

I was stumped because we've changed the default on CRTBNDCL to specify
DFTACTGRP(*NO). Hence, the ACTGRP(*STGMDL) should make the CL run in QILE
and the program I'm having trouble with runs in activation group WAYOPE.
So the shared open shouldn't apply.

However, the CL (which has no vendor changes to apply was compiled long
before we changed the CRTBNDCL command default. Hence, the OVRDBF was
running in *DFTACTGRP. So the override was effectively *CALLLVL--meaning
it applied to everything following. I recompiled the CL so it now runs in
QILE. The OVRDBF only applies to programs running in QILE and the problem
program runs in our own activation group.

This works around the problem for now. I'm still not sure what's changed
since the last time the CL program was compiled over 9 years ago and the
RPG over 4 years ago.

I would still like to hear if anyone knows how to limit the scope of
ALWNULL(*USRCTL) to specific files in a program rather than all files.

Thanks,
Michael Quigley
Computer Services
The Way International
www.TheWay.org
419 753-1222


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.