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


  • Subject: Re: LookAhead
  • From: CVWD@xxxxxxx
  • Date: Fri, 26 Sep 1997 16:38:14 -0400 (EDT)

In a message dated 97-09-26 05:18:21 EDT, you write:

> Hello All,
>  I used to use the record Look Ahead (NS  **) on my S36 RPG programs when
>  it was the best method to do certain processing.  As, you cannot use
>  Look ahead with externally defined AS400 files.  Has anyone found any
>  real neat replacements for this function?  I would appreciate a nudge in
>  the correct direction.

Try this:
1. Change the F spec to program-described.
2. Define a data structure based on the external description of your file.
 Call it RECORD.
3. Define another data structure based on the external description of your
file.  Call it NXTRECORD.  Use the prefix keyword on this definition so the
fields all have different names from the first data structure:  prefix(NXT).
4. Create an I spec for your file with just one field - the first data
structure.
5. Create a '**' I spec for your file with just one field - the second data
structure.

It compiles under ILE and seems to work but your mileage may vary.  HTH,
Lance.

+---
| This is the Midrange System Mailing List!
| To submit a new message, send your mail to "MIDRANGE-L@midrange.com".
| To unsubscribe from this list send email to MAJORDOMO@midrange.com
|    and specify 'unsubscribe MIDRANGE-L' in the body of your message.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

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.