the first two fields are the keys along with the third field. If all the keys are matched then i need only one record in the output but the dates should be Min date and the max date. If the end date is given as blank then i need it to be blank as shown in the above output. Assume that the file is 80 byte long
Joined: 02 Dec 2002 Posts: 1618 Topics: 31 Location: San Jose
Posted: Mon Oct 26, 2009 6:36 pm Post subject:
Your "rules" have holes and your example is not very good.
Quote:
If all the keys are matched then i need only one record in the output but the dates should be Min date and the max date.
You show an example with the Min date, but not with the Max date.
Quote:
If the end date is given as blank then i need it to be blank as shown in the above output.
You show an input example where one of the end dates for the three records with the same keys is blank and the output record has blank. Do you want a blank for the end date if any of the end dates is blank? And is the field really blank or does it have '--' or what?
Please show a better example of input and expected output for all relevant variations. Give the starting position, length and format for each relevant field. Show what a "blank end date" really looks like. Please use code tags around your records so we can see what they really look like. _________________ 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
key1 - 1 to length of 5
key2 7 to length of 4 (packed decimal)
typ 13 to length of 3
begin date 17 to length of 10
end date 28 to length of 10
end-date null indicator pos 38
All the fields are character fields except key2. It is a packed decimal field(PD) for a length of 4 bytes. Blank end date will be 10 spaces.
As far as I know there cannot be two open end dates for a particular key(3 fields together) combination.
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