Joined: 07 Jun 2006 Posts: 11 Topics: 7 Location: India
Posted: Thu Aug 03, 2006 1:07 am Post subject: How to merge 2 files with some indicator in output file as ?
How to merge 2 files with some indicator in output file as it differentiate from 2 files input is merged using sort or Icetool ? _________________ Raki
Can you be more clear in your requirement as what exactly you are looking for ? Post some example data along with file DCB properties _________________ Shekar
Grow Technically
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Mon Aug 07, 2006 5:22 am Post subject:
vraki wrote:
I know it's working in 3 steps but my requirement is in single step.Please guide me on this?
Well did you mean 1 pass of data or just 1 step ?. Using Icetool you can cram 3 passes of data in a single step.
As far as I know you CANNOT get the desired results with a single pass of data using SORT. However if easytrieve is an option then you can get the desired results with a single pass of data.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Aug 07, 2006 11:34 am Post subject:
Raki,
Here's a DFSORT/ICETOOL job that will do what you asked for. Note that I'm sorting on 1,3 and then 5,1 (rather than 7,1) to get the output you asked for.
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
Joined: 04 May 2003 Posts: 92 Topics: 4 Location: Paris, France
Posted: Tue Aug 08, 2006 3:23 am Post subject:
kolusu wrote:
As far as I know you CANNOT get the desired results with a single pass of data using SORT.
Kolusu,
It is possible if you 'merge' Frank's solution with the group keys technique treating the 2 files as 2 groups. There is only 1 hdr to concat in front of each file. I think Frank knows this method but doesn't post it because of a MVS restriction about concatenation problem.
Joined: 26 Nov 2002 Posts: 12378 Topics: 75 Location: San Jose
Posted: Tue Aug 08, 2006 5:35 am Post subject:
Quote:
It is possible if you 'merge' Frank's solution with the group keys technique treating the 2 files as 2 groups.There is only 1 hdr to concat in front of each file.
Joined: 04 May 2003 Posts: 92 Topics: 4 Location: Paris, France
Posted: Tue Aug 08, 2006 9:17 am Post subject:
Kolusu,
Exactly.
In fact I posted something similar on other forum. That's why I didn't put the link here for convenience...
Of course it will not work when recfm=FB & lrecl are different
_________________ Frank Yaeger - DFSORT Development Team (IBM)
Specialties: JOINKEYS, FINDREP, WHEN=GROUP, ICETOOL, Symbols, Migration
DFSORT is on the Web at:
www.ibm.com/storage/dfsort
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum