|
On 2/12/07, James H H Lampert <jamesl@xxxxxxxxxxx> wrote:
"Chris Pando" wrote: > I do this [access files whose names are not known at > compile time] all the time. Before calling the program, > I'll do a DSPFFD (of the 'unknown file) to an outfile, > and then open the file as program-described, mapped to a > buffer. . . . It isn't difficult, much less > extremely difficult. . . . Uh, do a DSPFFD to an outfile before calling the program?!? While I'll admit that this sounds potentially a bit easier to deal with than QUSLRCD and QUSLFLD, much less QDBRTVFD, it also sounds like a slow and messy way to get the meta-data.
Doing a DSPFFD to a spoolfile, and then processing that, is slow and messy (and the way I wrote it the first time, in 1985 or so). The whole thing is buried in a service program; I call it with a file name, and I'm returned a pointer to the various data structures. If I'm ever in there, I'll update the logic to use APIs (I'm always eager to use a new API), but as it ain't broke, I'm not going to fix it.
But getting the meta-data is only part of the battle. Until EXTFILE was added (and thank God the designers set THAT up so that the object of the clause can be a variable!), you had to use an OVRDBF just to get the file to open.
Live and learn. I'll have to explore what EXTFILE can do; I can't say I've ever used that keyword. Chris -- www.brilligware.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.