|
Hi! Just for kidding you... I was 4 when you wrote that kind of programs lol... Charles "Douglas Handy" <dhandy@xxxxxxxxx> a écrit dans le message de news:ca27ca770611211338q33af1bd9lc2991db7e8feea83@xxxxxxxxxxxxxxxxx
Charles, 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?It isn't a real indicator, but yes, you can get the value of any fields in the next record provided it is a program described file. Externally described files do not support look ahead fields. You just have another I-spec section naming the record positions you are interested in, and giving them unique field names. The values from the current record are in the fields listed under the normal I-specs, and the values from the next record are in the field(s) listed under the ** delimited I-specs. If the file has multiple record types, you must
examine
the codes yourself. The look ahead fields get populated from the next
record
without regard to the record format or type. Look-ahead was useful in the days of mandatory Primary files (can you
spell
card reader?) and you needed more control over "level breaks" or "total time" processing than simple Lx breaks could accomodate. Its usage is
much
rarer now -- its probably been 25 years since I wrote a program using look-ahead. Doug -- 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 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.