|
On Wednesday, July 15, 1998 4:09 PM, Goodbar, Loyd (AFS-Water Valley) [SMTP:LGoodbar@afs.bwauto.com] wrote: > When using OPNQRYF, CPYFRMQRYF or RUNQRY, is it possible to select > particular columns for reporting? In other words, I have columns A, B, > and C in a file. I only want to see columns A and C in my output. Can I > do that? (I don't have Query/400 available for quick queries...) Loyd, I *think* RUNQRY is a part of Query/400. You can use QMQRY for quickies with some tinkering. Basically, you edit an SQL statement in a source member and CRTQMQRY to create an object that you execute via STRQMQRY. Midrange Computing did a generic one some time ago, and I think that David Gibbs has posted my modified version on his web site: http://www.midrange.com QMQRY will run on any /400 even if it doesn't have Query/400 licensed product installed. <Shameless plug *ON>If you like it, send David (not me) some money for making it available! I'm sure if you email him he'll be happy to provide an address...<Shameless plug *OFF> If you want to use OPNQRYF, you control what columns are returned by the file you specify for the FORMAT parameter. So, if you have a file MASTER with NAME, AD1, CITY, ZIP, CRDLMT and you wanted to show only NAME and CITY, you'd make a new file (say MASTEROQ) that only has NAME and CITY. Specify this file on the FORMAT parameter and your access path will have only the 2 fields you want in it. Then, CPYFRMQRYF will produce a physical file with those records in it. Kind of a long way to go for a quick query... hope this helps, Buck Calabro Commsoft, Albany, NY mailto:mcalabro@commsoft.net +--- | 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.