Yes, you could define the field.
In AS/400 query is concatination cat or || or concat?
anyway if the year and month are character you could define the date as
Year cat Month cat ’01′ and use LGRA1 as the second field,
If they are numeric take Year * 10000 + Month * 100 + 01
I cannot think of a way to incorporate day 2 into the same query so, sad to say you are probably making 31 queries.
Tom .. I didn’t miss the bit about obsolete, old, past prime.. describes me to a ‘T’.
Phil here again.. got it now!!!
You output Query day1 to a new file
You output Query day2 .. day31 to the same file as adds
The result is a file with each day as a seperate row
This file can be used as an input files to a join to other files on date.
Remember that the file you’re creating is an extract of the data, when the original table changes, you will have to rerun the 31 queries to rebuild it.