Hello,
It is very much possible using DFSORT; but it requires a bit of programming which is directly dependent on your DFSORT coding proficiency.
You need to first answer:
a. How many 'third column' are possible under a unique first and second column group?
b. Do you want the output values to be arranged in a SORTED order, or they need to be arranged as-is?
The above questions are asked to ascertain the maximum record length possible should there be many values under column 3 for a unique group 1/2; you would've already noticed by now that your o/p's data length is not same for all records.
The pseudo-logic would go on the lines of:
a. Use INREC/IFTHEN with INIT, and pad the input record on a column at the maximum assumed record length of the output expected; now this is the data on which modifications will be carried out
b. Now group all the records and pad a unique id for each group and their subsequent column 3 values, using INREC/IFTHEN/GROUP with PUSH/ID/SEQ
c. Once the records are grouped together, use INREC/IFTHEN/GROUP with BEGIN on SEQ number AND BUILD to build each column 3 value with the grouped records.
d. Lastly, couple them with OUTFIL NODETAIL SECTIONS TRAILER3 to write the output
If you want a sample code,
look at this post; or google - 'combine multiple rows into one dfsort'.
Reiterating, a bit of code is required to achieve this task, and will directly depend upon your programming proficiency.