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



Yes, but you have to give the fields different names. Such as, FLDNAM for the current record's field and LAFLD for the look ahead field.


        * Jerry C. Adams
*IBM System i5/iSeries Programmer/Analyst
B&W Wholesale Distributors, Inc.* *
voice
        615.995.7024
fax
        615.995.1201
email
        jerry@xxxxxxxxxxxxxxx <mailto:jerry@xxxxxxxxxxxxxxx>



Charles St-Laurent wrote:

Hi!

Suppose I have a Input Primary file that is program described and I want to
know the current record value of the field and the next record value of the
same field, is it possible to do it with a lookahead indicator?

Charles

"BILL FRANCIS" <bill@xxxxxxxxxxxxxxxxxxxxx> a
écrit dans le message de
news:20061121195302.MKXE9790.imta01a2.registeredsite.com@xxxxxxxxxxx
Opps... ** replaces the indicator not NS or AA, my bad.


-----Original Message-----
From: BILL FRANCIS
[mailto:bill@xxxxxxxxxxxxxxxxxxxxx]
Sent: Tuesday, November 21, 2006 2:56 PM
To: 'rpg400-l@xxxxxxxxxxxx'
Subject: RE: looking for an example of lookahead fields

Charles,

That's easy. Put this in your I-SPECS directly below where you described
the
file:

I         AA  **
I                             1    1  FIELDNAME

That's all you have to do.

Anytime you reference FIELDNAME it will refer to the record which is
stored
in the input area but has not been moved to the processing area to be
processed in the normal RPG cycle.

It's the ** instead of NS or AA that denotes the field as a look ahead.

Hope that helps!

-Bill




-------------
message: 5
date: Tue, 21 Nov 2006 14:32:24 -0500
from: "Charles St-Laurent"
<dringpiece@xxxxxxxxxxx>
subject: looking for an example of lookahead fields

Hi!

I'm looking for a RPG program that uses lookahead indicator ** with a
program described file. I searched on the IBM information center and I
found
no sample code using this functionality...

Is there any old programmer here that still know how to use it?

Charles
-------------

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