Posted: Fri Jun 15, 2012 3:04 pm Post subject: ICETOOL - drop records and keep last duplicate key record
We ran into a production problem with
this. Apparently the 'LAST USING(CTL1)' first retained only the last record (with the 'A'), then dropped the record because of the 'INCLUDE=(7,1,CH,NE,C'A')'.
So the end result was that NO records were written out.
Is there a way to recode this so that the last record will be dropped (because of the 'A'), but the second record kept? (the '11111 2')
Joined: 26 Nov 2002 Posts: 12377 Topics: 75 Location: San Jose
Posted: Fri Jun 15, 2012 3:55 pm Post subject:
tcurrier,
You can actually avoid the whole problem by moving the INCLUDE condition to the beginning , so that you read less number of records.
I would also check for a positive condition instead of a negative condition.
Use the following DFSORT ICETOOL JCL which will give you the desired results. I assumed that your data is already sorted on the key. If Not then just remove the statement OPTION=COPY
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