Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Jul 03, 2006 9:58 am Post subject:
Here's a DFSORT job that will do what you asked for. I assumed that your input file has RECFM=FB and LRECL=80, but you can change the job appropriately for other attributes.
_________________ 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
Last edited by Frank Yaeger on Thu Jul 13, 2006 11:28 am; edited 2 times in total
Joined: 21 Jun 2006 Posts: 9 Topics: 4 Location: Bangalore
Posted: Wed Jul 12, 2006 6:23 am Post subject:
Frank,
When i tried this example using the data I have, I found that each output file has more than 3 records. The reason being, that we restart the Sequence number after very 3 records and the records with sequence number LE 3 are selected. But in this case we need to restart the Sequence number for every change in the key fields and only the records with the sequnce number LE 3 should be selected.
Is thereany way of doing this?
Sorry that I was not able to reply to this post before.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Wed Jul 12, 2006 10:19 am Post subject:
Quote:
Yeah Its working when I gave the data in SYSIN directly and tried.
When I tried it with my file it isnt working.
The DFSORT job I gave you would work regardless of whether the control statements are given in SYSIN directly, or in a file with RECFM=FB and LRECL=80, as long as you have the control statements I showed in each. _________________ 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: 21 Jun 2006 Posts: 9 Topics: 4 Location: Bangalore
Posted: Wed Jul 12, 2006 11:48 pm Post subject:
Thanks all for your responses.
The problem when I ran this job with my file was that there are too many records for each key. And as i was using the size of sequence number as 2 digits for every 100th record the sequence number was getting reset and hence i was getting more than 3 records. I increased the size of the Sequence number accordingly and got the desired results.
Thanks a lot to u all. _________________ Thanks,
Deepa
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Jul 13, 2006 11:28 am Post subject:
Oh, I should have used a larger seqnum to begin with. I changed my example. Sorry. _________________ 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