|
Create a logical file over QADSPFFD. You can do this after the DSPFFD, or you must somehow prebuild the QADSPFFD file, then the new logical. Your dds will not list any fields, except "K" lines for the keys, in the order you want them. Then, your RPG program gets an "E" in the F spec, for externally defined. Now you do not need to use an override, or a OpnQryF. to compile the program, you must have the physical & logical files built. To do this interactively, dso a dspffd on a file, use CRTLF to create the logical file, use CRTxxxPGM to create the program. To do it in batch, put those steps in a CL. HTH, Bob VENU YAMAJALA wrote: > Hi All, > > I want to retreive (random retreival) the database fields' information > from DspFfd command in an RPGLE pgm. > > I need some suggestions/help. In my driver CL pgm I am doing a DSPFFD > of one database file to an outfile in QTEMP library. Say QTEMP/DSPxxx. I want > to build a key for this outfile and use the keyed file in my called RPG. I am > confused with the sequence of steps I need to do. I am doing > > OvrDbf Qtemp/DSPxxx SHARE(*YES) > OpnQryF (Qtemp/DSPxxx) KEYFLD(WHLIB WHFILE WHFLD) OPENSCOPE(*JOB) > > Call RPG1 > > In my RPG1, I will be doing some CHAIN to this file. So I need to define the > file in the F specs. I defined it as QADSPFFD (template of DSPFFD). > > I am missing something here. The QADSPFFD in the F spec cannot be defined as > Keyed (it is giving a compile error!!). If I dont define it as keyed, I cannot > do a CHAIN. Next problem is I need this QADSPFFD to point to the dynamically > built keyed OpnQryF file. I am missing something here. > > Can anybody help me or is there any work-around. Thanx in advance for any help > or suggestions. > > Rgds, > Vg > +--- > | 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 > +---
begin: vcard fn: Bob Larkin n: Larkin;Bob org: <A HREF="HTTP://web.wt.net/~blarkin/">Larkin Computer Consulting</A> adr: <A HREF="http://web.wt.net/~blarkin/">Bob and Diana's Page</A>;;;Houston;TX;<A HREF="http://web.wt.net/~blarkin/">;United States email;internet: blarkin@wt.net title: Systems Consultant x-mozilla-cpt: ;4104 x-mozilla-html: FALSE version: 2.1 end: vcard
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.