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



SetGT with ReadP is the correct combination. SetLL sets the file pointer just before the record that
matches the key so that a Read will read the selected record. If the record does not exist, the file
pointer is placed where the record would have been if it existed. So to use SetLL you would need
something like the following to get the same behavior as a SetGT with a ReadP:

/free
SetLL key record;
If %equal;
Read record;
Else;
ReadP record;
EndIf;
/End-free


-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of Mike
Sent: Wednesday, December 26, 2007 3:56 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Confused on SETLL vs. SETGT

Thanks... it feels like a Monday and Friday today...

On Dec 26, 2007 2:15 PM, Kesterson, Randy <RPKesterson@xxxxxxxxxxxxxxxxxxx>
wrote:

Sounds to me like you've got it.


______________________________________________________________________________________________
Randy Kesterson, Information Services
Market Transport Services - a UTi Worldwide Company| 110 N Marine Drive |
Portland, OR 97217 | USA
rpkesterson@xxxxxxxxxxxxxxxxxxx| D +1 503.978.4353 | O +1 503.283.2405x353 |F +1
503.978.4392

-----Original Message-----
From: rpg400-l-bounces@xxxxxxxxxxxx [mailto:rpg400-l-bounces@xxxxxxxxxxxx]
On Behalf Of Mike
Sent: Wednesday, December 26, 2007 12:16 PM
To: RPG programming on the AS400 / iSeries
Subject: Confused on SETLL vs. SETGT

I am working on setting up an approval work flow and am confusing myself
on
SETLL vs. SETGT.

I have the sample data of:

user - approval amnt
mwills - 0.00
mwills - 100.00
mwills - 10000.00

If the total amount is 50, it should use the 0.00 approval work flow.
Would
I have to "SETGT ('mwills', 50) myfile" then do a READP to get the record
I
want?

Does SETLL set the file pointer just before the record and SETGT set the
file pointer just after? Would it work in my example?

--
Mike Wills

Check out my music show at http://thenextgenerationofradio.com
--
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.