|
You need to do two things in the HR part - instead of the CHAIN to the PF you need to do a *SETLL on the file, then DOWEQ *OFF or DOUEQ *ON, then READ the file. This should reset the file pointer. Jim -----Original Message----- From: Chuck Lewis [mailto:clewis@xxxxxxxxxx] Sent: Thursday, June 05, 2003 11:41 AM To: RPG/400 / iSeries Subject: Really dumb RPG Question... Hi Folks, I get drug back into programming every now and then (I wear a ton of different hats.) and normally do OK but I am having a brain fart or something today and have exhausted every avenue I could think of. I am developing a fairly simple set of programs to allow employees to submit comments to management. They key in an entry and once they hit enter it writes the record to the Comments PF and emails a contact in HR that there has been a new entry. Well it is this section of code for emailing that is causing me the problem. There is a file that has HR contacts in it. Right now there is only one entry in there, but the thought is, in the future there could be more. So I do a DOWEQ OFF read on this file and send email until there is no more hits in the file. Then the user gets a screen with their tracking # and the chance to do another entry. Well if you do this it adds the record to the Comments PF but does not send the email because in the email routine the HR contacts file is still positioned at the last record. How do I get it to reset ? Thanks ! Chuck _______________________________________________ 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.