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.

This thread ...


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

This mailing list archive is Copyright 1997-2019 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].