× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 12/11/2015 5:24 PM, Stone, Joel wrote:
I am using QMQRY to an *OUTFILE.

So the easiest method may be to have a second QMQRY to do the "Label On" to define the colhdg values.

Is it possible to do this in one QMQRY source file? No biggie to add a second QMQRY run, but I was hoping that I could get away with something as simple as using the word "AS" to rename the field, hoping I could use "Label On" in the select statement somehow to define the colhdg.

Some ideas to consider:
1) Use a permanent file. You can build it initially with QMQRY, then
use RUNSQLSTM to do the ALTER TABLE LABEL ON... Let your current QMQRY
do a *REPLACE.
2) Keep the QMQRY as-is, add RUNSQL to the process to add the labels
after the QMQRY has run.
3) Assuming you are building a file to be consumed by something
downstream, build a VIEW instead so that the file is always up to date.
Eliminate the QMQRY altogether.
4) Make a model table with the LABELS you want and use CRTDUPOBJ or
SELECT NODATA to copy the 'template' into your temporary file location.
Leave the QMQRY as-is except for *REPLACE.
5) Move the whole thing into an HLL rather than use a utility.
6) Move the whole thing into a script that you execute via RUNSQLSTM.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.