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



Are you doing a load all at once subfile or a page at a time? How many total records are being read?

If you are loading all or reading very few records, the code shouldn't get too ugly. It's pretty simple.

Setll *loval file;
Dow not %Eof(file);
Read file;
If %Eof(file);
Leave;
EndIf;
If searchName <> *blanks and searchName <> nameinfile;
Iter;
EndIf;
If searchApp <> *blanks and searchApp <> appinfile;
Iter;
EndIf;
...
// write to subfile.
EndDo;



-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of David FOXWELL
Sent: Thursday, February 24, 2011 8:43 AM
To: RPG programming on the IBM i / System i
Subject: RE: READE on a file selected by user

Thanks all,

We often end up debating when sql has an advantage over rla but I don't ever recall this being put forward as one of them.
Surely as soon as one knows that in an application a user is going to effectively select a set of records himself then one should be thinking SQL from the start?

I know of one application that first showed clients selected by name. Then they added a number. Then maiden name followed and company name. The code is really ugly without sql.

-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Jerry C. Adams
Envoyé : jeudi 24 février 2011 14:27
À : 'RPG programming on the IBM i / System i'
Objet : RE: READE on a file selected by user

Here, here. I admit that I usually forget about this (using
embedded SQL).
But I recall one inquiry a few years back where everybody and
their second cousins wanted different selections and
sequences. I wound up writing a selector panel where they
could put in just about anything they wanted (well, within
reason, as defined by me) and sort (order by) whatever.
Building the SQL wasn't too bad.

Jerry C. Adams
IBM i Programmer/Analyst
I found a delivery in my flaw. -Don Quisenberry
--
A&K Wholesale
Murfreesboro, TN
615-867-5070


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Helge Bichel
Sent: Thursday, February 24, 2011 6:45 AM
To: 'RPG programming on the IBM i / System i'
Subject: RE: READE on a file selected by user

Hi David.

It's better and much more flexible using SQL for this task.

I know starting with dynamic SQL constructing the SQL with
Select, Order By etc.
and implementing the processing of Declare, Open, Fetch etc.
can be a challenge, but done once I believe you would never
go back using various SETLL, READE processing.

Brgds
Helge


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx]

Sent: Thursday, February 24, 2011 1:01 PM
To: RPG programming on the IBM i / System i
Subject: READE on a file selected by user

Hi,

I'm sure someone must have already run into this problem :

--
This is the RPG programming on the IBM i / System i (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.

________________________________

Notice from Bob Evans Farms, Inc: This e-mail message, including any attachments, may contain confidential information that is intended only for the person or entity to which it is addressed. Any unauthorized review, use, disclosure or distribution is strictly prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message and any attachments.

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.