× 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 10/23/2018 04:41:16
PM:
-----Original Message-----
From: RPG400-L <rpg400-l-bounces@xxxxxxxxxxxx> On Behalf Of Brian
Parkins
Sent: Tuesday, October 23, 2018 3:36 PM
To: RPG programming on the IBM i (AS/400 and iSeries)
<rpg400-l@xxxxxxxxxxxx>
Subject: Re: Problem with reading a file that does have keys

[ External Email ]

----------------------------------------------------------------------
How do you terminate your RPG IV program? Do you have (just) a
RETURN statement?

Brian.

On 23/10/2018 21:25, Burrows, Thomas 1001 wrote:
I had the "K" in column 34. Removed that and took out the SETLL. Get
the exact same results. At no time should This statement be TRUE;

read arlcu;
if cunano = savcuno;
count4 = count4 + 1;
endif;

savcuno = cunano;
count1 = count1 + 1;

================

There are 36,815 records in ARLCU and not a single repeating CUNANO.

Not sure what is up.

Thomas


I've been watching this thread and it has my attention as it appears we
use the same software vendor. It looks like you are using National
Accounts. We looked at it, but never implemented them. I understood the
point of a national account was to combine all accounts for the same
customer--hence there could be duplicate national account
numbers--depending on how you assign customer "numbers'. If you really
copied from ARLCU then ARLCU is keyed by ARCO and ARCUNO. So the national
account won't be in any meaningful sequence--I would think ARLCU6 would be
more useful CUNANO, CUCO, CUCUNO.

To check for distinct national accounts try these two SQL statements:

select count(distinct cunano) from arlcu
select count(distinct cucuno) from arlcu

These will give you the number of unique national account IDs and then
unique customer numbers.

Or maybe what you're after would be:

select count(*) from arlcu where cunano in (select cucuno from arlcu)

(Not the most efficient, but I think it's functional.)

Of course I may be way off base here, but the table layout just looks too
familiar. I'm also way behind on email so your issue may be resolved
already.

Michael Quigley
Computer Services
The Way International

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