Splitting and merging of file using sort

Hi,I have a file which contains 3 types of transactions with account number,transaction type and transaction creation date.The transaction types are 35,39 and 41.The file has duplicate records for all transactions(ie 2 records for each account number for each transaction).Now I need to remove the duplicate for the 39 type transaction alone and keep the remaining.That is only for the transaction type 39 the duplicate record(record with old transaction date) need to be removed and for the remaining transactions the duplicates need to be there.How to achieve this in a single sort step?

  
Showing Answers 1 - 9 of 9 Answers

ramu

  • Jun 27th, 2012
 

Use ksds files it will wont allow duplicates in this keys are used to eliminates the duplicates

  Was this answer useful?  Yes

Rishu

  • Jul 30th, 2014
 

It is not possible to do it in single SORT step. 2 steps are required. First, extract all 39 type transaction record using EXCLUDE statement. Second, remove duplicate from step 1 file with SUM FIELDS=NONE. Third, merge output from step1 and 2.

  Was this answer useful?  Yes

manikanta

  • Feb 15th, 2019
 

we can do it by ICETOOL by selecting the firs duplicate row only and rest of the rows based on the transtion type it will not copy.
SELECT FROM(IN) TO(OUT) ON(starting post,length,CH) USING(CTL1) FIRST - it will copy the first records only.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions