View Full Version : Will OPNQRYF help me?
Guest.Visitor
06-04-2004, 05:44 AM
I do not have SQL package on AS400. I am using RPGLE program with 'QC2LE' as Bnddir. What i am upto is that in my CL program i am executing DSPFFD command over PRTF and now i want to have values provided by DSPFFD file (using C Dir). The 'C' provides field names as 'WHFLDE', 'WHFLDT' etc. So i have the field name now i want to retrive the value of 'WHFLDE' in my RPG Code. Will OPNQRYF help me? and How. Or i have to look for something else.
DougCMH
06-04-2004, 05:44 AM
I'm not sure I understand what you are using C for. What exactly are you trying to do? Do you need random access to the DSPFFD outfile? If you only need sequential access, here's what I do (when I'm too lazy to use API's). In my CL, I do my DSPFFD to OUTFILE(QTEMP/QADSPFFD). Then, either I override QADSPFFD to QTEMP/QADSPFFD, or, I put an EXTFILE('QTEMP/QADSPFFD') keyword on my RPG F-Spec for QADSPFFD. I always use file QADSPFFD, since that is the model file that IBM provides - an externally defined file with the WH* fields - and is always available. This model file is in QSYS, but do not output there - That's why I use QTEMP. The one drawback to QADSPFFD is that it is arrival sequence. If you need random access, then you may need to do something like duplicating QADSPFFD to a permanent file somewhere, and building a logical over it.
Powered by vBulletin® Version 4.1.5 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.