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



It's an old COBOL habit that's hard to break.  The file contains both
summary and detail records.  In order to calculate a field in the summary
record, I have to accumulate the field from the details.  I am reading the
summary record, then reading the details to accumulate the field then
updating the summary.  I don't have a second logical I can use and I don't
want to create another if I don't have to.

Actually, thanks for asking.  Writing this out has given me the solution I
should use and I won't need to open the file a second time.  I'll just
rearrange the order of my process.  That is, I'll accumulate the detail
records first, then read and update the summary record.

Thanks for all your responses.

Rick Weber  |  TOYS 'Я' US International 


-----Original Message-----
From: rob@xxxxxxxxx [mailto:rob@xxxxxxxxx] 
Sent: Monday, November 21, 2005 4:26 PM
To: RPG programming on the AS400 / iSeries
Subject: Re: Opening the same file twice


RPGLE you would be USROPN in the keyword field.

Why twice?  If it is because you want to do an override consider also 
using EXTNAME(MyVar) or EXTMBR(MyMbrVar).  Saves that pesky CALL QCMD to 
OVRDBF.

Rob Berendt

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.