Joined: 11 Jan 2006 Posts: 83 Location: Lower Saxony (DE)
Some time ago I had the problem to sort two files with different key-positions. I placed my question in an other forum but this is closed now. Maybe Mr. Yaeger remembers me and my problem Maybe I gonna have some luck here and now? Maybe, meanwhile there's a tool which provides such a feature?
Concrete: Both dataset have an indicator at position 1, length 1. The first Dataset has it's key i.e. at position 10 and the second at position 2, both in length of ten bytes.
i.e.:
First File
Code:
1 One ...
1 Two ...
1 Three ...
1 Four ...
1 Five ...
1 Six ...
2Eight ...
2Eleven ...
1 Five ...
1 Four ...
2Nine ...
1 One ...
2Seven ...
1 Six ...
2Ten ...
1 Three ...
2Twelve ...
1 Two ...
Has anybody an idea with which tool and which statements I can solve this problem without formating one input-file and reformating the result?
Thank you all for your help
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
Here's a DFSORT job that will do what you asked for. I assumed your input files have RECFM=FB and LRECL=80. If not, the job can be changed appropriately. You'll need z/OS DFSORT V1R5 PTF UQ95214 or DFSORT R14 PTF UQ95213 (Dec, 2004) in order to use DFSORT's IFTHEN and OVERLAY functions. Only DFSORT has these functions, so if you don't have DFSORT, you won't be able to use them. If you do have DFSORT, but you don't have the Dec, 2004 PTF, ask your System Programmer to install it (it's free). For complete details on all of the new DFSORT and ICETOOL functions available with the Dec, 2004 PTF, see:
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
OVERLAY is new with the Dec, 2004 DFSORT PTF. For complete details on OVERLAY and all of the other new DFSORT and ICETOOL functions available with the Dec, 2004 PTF, see: