× 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: DOW & DOU
  • From: "James W. Kilgore" <qappdsn@xxxxxxx>
  • Date: Fri, 08 May 1998 16:08:05 -0700
  • Organization: Progressive Data Systems, Inc.



boothm@ibm.net wrote:

> I am confused.
>
> If I was going to read the file from beginning to end why wouldn't I just
> use the rpg cycle? If I am just processing a section of the file, and want
> to get out of a loop in the odd event that I am at a group that happens to
> contain the last record in a file, then this structure serves no useful
> purpose.
>

This construct exists where you are not reading the file as the 
primary/secondary
file, but the primary/secondary file needs to loop and get records.

In a batch MR process it would not be needed, but IMO, an interactive "work 
with"
process is the foremost user of this.

Example: We have a "Work with Customer" display panel which lists the active
customers.  When one chooses a customer, a "work with" type panel is displayed
that shows outstanding sales orders(among other things).  This secondary program
does a loop to build the subfile of orders.  This loop read/sfl write is our 
use.

You are correct in that only a hard core COBOL/PIC/control freek/etc.  
programmer
would use a read instead of the cycle to process a file in batch mode and not
take advantage of record blocking. But then again that's another thread. <g>



+---
| 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 MIDRANGE-L-UNSUB@midrange.com.
| Questions should be directed to the list owner/operator: david@midrange.com
+---


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.