|
If which date field can be determined from a list of all the date fields in the [record format of the] file, or if there is only ever one date field for the [record format of the] file, then there are numerous ways to obtain the column name(s) to enable making that substitution.
Although just as Manuel suggested for an approach, I would probably defer to the Query Management Query (QMQRY) variable substitution feature [Set Variables (SETVAR) of the Start QM Query (STRQMQRY)] instead of whatever that custom RUNSQL uses\does.
Now, if I knew the name of the date field for all the files, I could
submit this to batch, substituting the 3 variables:
Library
File
Date
RUNSQL REQUEST(' select ''UPPENFILES'' as MyLib, ''STMTM3P'' as
MyFile, GQBGUN, count(*) as MyCount FROM UPpenfiles/STMTM3P GROUP BY
GQBGUN ORDER by GQBGUN') OUTPUT(*PRINT)
Run it across an entire library.
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.