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



Would below come close? I'm not very familiar with MR stuff and my
translate might miss a little.

FGLD490C1 IF E K Disk
FGLD490G1 IF E K Disk

D rsC1 ds qualified
D year like(CYEAR)
D perd like(CPERD)
D prod like(CPROD)
D rrnC 15 0
D rrnG 15 0
D type 20

C exsr setC1

C exsr fetchC1
C dow sqlCod = 0

C select
C when rsC1.type = 'AmtNotMatch'
C* exsr AmountsDiffer

C when rsC1.type = 'InCNotInG'
C* exsr UnmatchedC

C when rsC1.type = 'InGNotInC'
C* exsr UnmatchedG
C endsl

C exsr fetchC1
C enddo

C exsr closeC1
C eval *inlr = *on

**************************************************************
* set cursor to select desire record
**************************************************************
C setC1 begsr

C/exec sql
C+ declare C1 scroll cursor for

* Amount not match
* ----------------------------------------------------
C+ select CYEAR, CPERD, CPROD, 'AmtNotMatch', rrn(GLD490C1),0
C+ from GLD490C1 join GLD490G1 on
C+ CYEAR=GYEAR and CPERD=GPERD and CPROD=GPROD
C+ where CCST <> GCST
C+
* Record in C but not in G
* ----------------------------------------------------
C+ union
C+ select CYEAR, CPERD, CPROD, 'InCNotInG', rrn(GLD490C1),0
C+ from GLD490C1 exception join GLD490G1 on
C+ CYEAR=GYEAR and CPERD=GPERD and CPROD=GPROD
C+
C+ union
C+
* Record in G but not in C
* ----------------------------------------------------
C+ select GYEAR, GPERD, GPROD, 'InGNotInC', 0, rrn(GLD490G1)
C+ from GLD490G1 exception join GLD490C1 on
C+ CYEAR=GYEAR and CPERD=GPERD and CPROD=GPROD
C/end-exec

C/exec sql
C+ open C1
C/end-exec

C endsr

**************************************************************
* close C1
**************************************************************
C closeC1 begsr

C/exec sql
C+ close C1
C/end-exec

C endsr

**************************************************************
* fetch C1
**************************************************************
C fetchC1 begsr

C/exec sql
C+ fetch from C1 into :rsC1
C/end-exec

C endsr

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Michael Ryan
Sent: Tuesday, December 18, 2007 1:27 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Matching Records - End Product

Well...write the equivalent code and post it.

On Dec 18, 2007 2:19 PM, Glenn Gundermann <ggundermann@xxxxxx> wrote:
If all the people that know the cycle continue using the cycle, then
you will soon get something like what was was included in a section of

the company's CIO Newsletter 2007 that went out to thousands of
employees
worldwide:

"The <project-name> project has been established in 2006 to developo a

successor for <package-name>. There are both business and technical
reasons to replace <package-name>. From a technical perspective, the
age of the application (some parts are 15 years old) and the
programming language (RPG) make maintenance and further development
more and more difficult/expensive. In addition to that, it is not
possible to run the application on other hardware than AS/400."

You guys can defend the cycle all you want, along with beta max and
8-track.

The code that was included with this note is not structured and not
logical. It is crap IMHO (pardon the language).

Glenn Gundermann
ggundermann@xxxxxx
(647) 272-3295


Agreed. It is structured and logical (not always the same thing).
Terri even got it right that the data from the secondary file (02)
is not available for comparison until the 02 record is read.

Writing Level Control Breaks may, as someone said, be "trivial", but

matching records is far from a trivial exercise. It would take far
less time for a newbie to grasp the concept of matching records than

it would take to re-write it. And I doubt that such re-write would
be as understandable. I used to work in a mixed Cobol / RPG shop.
Any time matching record processing was needed, we always wrote
those in RPG because it was simple, short, sweet, and
understandable.


* Jerry C. Adams
*IBM System i Programmer/Analyst
B&W Wholesale Distributors, Inc.* *
voice
615.995.7024
fax
615.995.1201
email
jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>
--
This is the RPG programming on the AS400 / 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.


--
This is the RPG programming on the AS400 / 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.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

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.