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



hi,

In such a case you may alos write a new pgm that just do a loop under
detailed to sum values, and pass back the total .
It is simple (just add a call) and reusable if you want to get the total a
next time or only for some records ....

----- Original Message ----- 
From: "Weber, Richard" <Weberr@xxxxxxxxxxx>
To: "'RPG programming on the AS400 / iSeries'" <rpg400-l@xxxxxxxxxxxx>
Sent: Tuesday, November 22, 2005 2:23 PM
Subject: RE: Opening the same file twice


> 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
> -- 
> Group Dekko Services, LLC
> Dept 01.073
> PO Box 2000
> Dock 108
> 6928N 400E
> Kendallville, IN 46755
> http://www.dekko.com
>
>
>
>
>
> "Weber, Richard" <Weberr@xxxxxxxxxxx>
> Sent by: rpg400-l-bounces@xxxxxxxxxxxx
> 11/21/2005 04:02 PM
> Please respond to
> RPG programming on the AS400 / iSeries <rpg400-l@xxxxxxxxxxxx>
>
>
> To
> rpg400-l@xxxxxxxxxxxx
> cc
>
> Fax to
>
> Subject
> Opening the same file twice
>
>
>
>
>
>
> I need some suggestions to refresh my memory.  I need to open up for input
> the same externally-described file twice in an RPG program.  I wrote this
> once before, but I can't locate the code now.
>
> Thanks,
>
> Richard L. Weber  |  Senior Systems Analyst, TOYS 'Я' US International  |
> 973.617.3497  |  weberr@xxxxxxxxxxx <mailto:weberr@xxxxxxxxxxx>
>
>
>
> ========================================================================
> This email message is for the sole use of the intended recipient (s) and
> may
> contain confidential and privileged information. Any unauthorized review,
> use, disclosure or distribution is prohibited. If you are not the intended
> recipient, please contact the sender by reply email and destroy all copies
> of the original message. To reply to our email administrator directly,
> send
> an email to EmailAdmin@xxxxxxxxxxxx
> Toys "R" Us, Inc.
> -- 
> 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.
>
>
>
>
> ========================================================================
> This email message is for the sole use of the intended recipient (s) and
may
> contain confidential and privileged information. Any unauthorized review,
> use, disclosure or distribution is prohibited. If you are not the intended
> recipient, please contact the sender by reply email and destroy all copies
> of the original message. To reply to our email administrator directly,
send
> an email to EmailAdmin@xxxxxxxxxxxx
> Toys "R" Us, Inc.
>
> -- 
> 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.