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



Simplicity wins. Put it in a procedure and call it a day......


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Charles Wilt
Sent: Monday, March 03, 2014 10:47 AM
To: RPG programming on the IBM i (AS/400 and iSeries)
Subject: Re: Treat file fields as an array

Soctt,

Yes I was simplifying the example. In reality I'm dealing with a set of 10
fields...

Your example of
D CustAddr_t ds qualified template
D Customer like(BTCustomer)
D Name like(BTName)
D Address1 like(BTAddress1)

D Addresses ds
D BTCustomer
D BTName
D BTAddress1
D STCustomer
D STName
D STAddress1
D Cust likeds(CustAddr_t) Dim(2)
D overlay(Addresses:1)

Is what I was thinking about...

I'm not currently using DS I/O but I could switch too it without issue.

I shouldn't have to worry about the BT/ST not matching.

I just really didn't like the look of duplicating 15 lines of code (10 evals
and say 5 for chain) and was hoping there was a better way.

But 30 lines of code vs. 20+ lines of D-specs...perhaps not worth the
"trickyness" :)

Charles


On Mon, Mar 3, 2014 at 1:27 PM, Scott Klement
<rpg400-l@xxxxxxxxxxxxxxxx>wrote:

Hmmm... maybe that's it. Maybe there's a lot more addresses, and each
one has more fields, etc. And he was just simplifying it for the sake
of the post.


On 3/3/2014 12:21 PM, Briggs, Trevor (TBriggs2) wrote:
Yes, you're right. It just seems like a lot of trouble to go to
avoid a few Evals. I would find the Evals much easier to understand
if I was the person who had to amend this program in 5 years time.
If there were 10 sets of address fields, then fair enough, but for two?
--
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.


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



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.