|
At 19:36 08/26/1999 , Randy Gevedon wrote: >In RPG400 I am wanting to do an override on a physical file to a specific >member when outputting to the file. Here is the kicker that I don't know how >to handle. There are 16 different members and I don't want to have to hard >code each override in the program. Is there any way of overriding to a >member to &MEMBER (varies each record output). One time the override may be >for "SAM" and the next record may be for "JACK". Two possibilities come to mind. If you will be changing members infrequently during program execution, close the file, issue a new override via a call to QCMDEXC, and then re-open the file. Bear in mind though, that opening and closing files is very expensive from a resource utilization point of view, so if you will be changing members frequently, I would suggest declaring the file 16 times, issuing all overrides at the start of the job, and then just writing to the appropriate RPG file. It's not pretty, but once the files are all open, it will be the most efficient way. Pete Hall pbhall@execpc.com http://www.execpc.com/~pbhall +--- | This is the Midrange System Mailing List! | To submit a new message, send your mail to MIDRANGE-L@midrange.com. | To subscribe to this list send email to MIDRANGE-L-SUB@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 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.