Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Nov 19, 2007 3:26 pm Post subject:
You were very close - you only missed one required change:
Code:
3034:SEQNUM,8,PD,START=0,RESTART=(3001,4))),
should be changed to:
Code:
3034:SEQNUM,8,PD,START=0,RESTART=(3001,17))),
You want to restart when the complete 17 byte key (in positions 3001-17) changes. 1,4 will only get you part of the first key. _________________ 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
Thanks Frank for the reply. I just got another problem with it. There are a few reocrds in the dataset that have no change in the date fields for ex:
P1V1C1D1
P1V1C1D2
P2V1C1D1
P3V1C1D1
P3V1C1D2
now since, Key P2 doenot have another date(D2), he grouping is getting wrong. So we need to ignore those records.
So in this case my output should be like
File1:
P1V1C1D1
P3V1C1D1
File 2:
P1V1C1D2
P3V1C1D2
Please help me to get a logic to ignore any kind of records where the P* Key(12 byte wide) doenot have a break in the date key D*(2 byte number), then we need to ignore those records. _________________ Thanks!,
Santosh Kulkarni
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Thu Jan 10, 2008 5:58 pm Post subject:
If I understand you correctly, you want to remove records with a unique Px field (e.g. only one P2 record). You can use DFSORT/ICETOOL to put only the dup records in a temporary file and then use that temporary file as input to your existing COPY.
Note: Since your Px values are already in sorted order, I added SORT FIELDS=COPY for the SELECT so it will do a copy instead of a sort. Copy is more efficient than sort. _________________ 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
To elaborate it furthur I would say, there could be multiple P2 records, but can have same dates.
For ex:
P1V1C1D1
P1V1C1D2
P2V1C1D1
P2V1C2D1
P2V2C1D1
P3V1C1D1
P3V1C1D2
Since there is no variation on P2-D1 combination, we should see the above said result.
All times are GMT - 5 Hours Goto page Previous1, 2
Page 2 of 2
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