Joined: 09 Mar 2011 Posts: 7312 Location: Inside the Matrix
Unless the data is already in that order, a JOINKEYS solution would require a SORT of the data, and possibly a second SORT if the original order is required for the output. JOINKEYS would also require more memory, as there are three tasks.
Why do you need the INCLUDE= on OUTFIL, why not INCLUDE COND=? Is it part of something else?
A simple solution would be to have the 10 values, but for any which are not required, set those to a value which is impossible: X'FFFFFFFFFF' for instance.
To make generation (and human reading) easier, regularize your cards:
So that is what it could look like with 10 values.
The problem for generation is that you need three different types, first, middle and last. The first requires the INCLUDE=(, the middle ones are simple, and the last has a trailing bracket instead of the comma.
If your 10-record file can be like this:
Then generating the INCLUDE= is easy.
So, how much data, is it in the selection order, can the selection file be made like that, or do you have to work it out. Why INCLUDE= not INCLUDE COND=, and anything else you feel may be helpful.