Joined: 04 May 2003 Posts: 92 Topics: 4 Location: Paris, France
Posted: Sun Jun 05, 2005 7:47 am Post subject:
Still thinking of it, my previous post can be modified a bit for a probable faster execution : assuming that doing a sub arithmetic is slower than a direct SEQNUM. The fact is I don't have a file big enough to test this.
Sorry for that.
Joined: 04 May 2003 Posts: 92 Topics: 4 Location: Paris, France
Posted: Mon Jun 06, 2005 4:23 pm Post subject:
Once more...
My previous post shows how to remove unwanted records AND the possibility to be able to use a key group, unique between the groups for a SPLICE, later, for example. It means multi passes.
Here is a simplified way from a COPY, to only remove unwanted records with no further passes.
Code:
1 0000100001
START 00002
A 0000300002
END 00003
1 0000400004
2 0000500005
START 00006
A 0000700006
B 0000800007
END 00008
1 0000900009
2 0001000010
3 0001100011
START 00012
A 0001300012
B 0001400013
C 0001500014
END 00015
1 0001600016
Joined: 04 May 2003 Posts: 92 Topics: 4 Location: Paris, France
Posted: Thu Jun 09, 2005 2:53 pm Post subject:
The last post gave me the idea to improve the one I posted before the last by removing one IFTHEN.
The logic changes a bit : the synchronisation between ColC & ColD means that the records to remove;
the desynchronisation, the records to keep.
The group key is ColB.
Code:
ColA ColB ColC ColD
A 00001 00001 00001
START 00001 00002
A 00001 00003 00002
END 00001 00003
A 00005 00004 00004
A 00006 00005 00005
START 00002 00006
A 00002 00007 00006
B 00002 00008 00007
END 00002 00008
A 00011 00009 00009
A 00012 00010 00010
A 00013 00011 00011
START 00003 00012
A 00003 00013 00012
B 00003 00014 00013
C 00003 00015 00014
END 00003 00015
A 00019 00016 00016
Joined: 04 May 2003 Posts: 92 Topics: 4 Location: Paris, France
Posted: Fri Jul 08, 2005 4:55 pm Post subject:
I hadn't tried how dfsort would react if I substracted a num value to a blank (for HDR & TRL). Well, a blank is treated as a zero and that's mean that the last IFTHEN from the last post could be removed and the OMIT changed to an INCLUDE.
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Fri Jul 08, 2005 6:05 pm Post subject:
Blanks are treated as zero for ZD because the X'40' is treated as a zone of 4 (ignored) in all but the last byte, a sign of 4 (positive) in the last byte, and a digit of 0 in all bytes. _________________ 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
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