There are two policies(Q12345& Q789014) repeted twice but the time stamp is differeant.I need to extract latest timestamp policy.
The order should not be changed.
Thank you very much for your response.The records order is changed accoding to the above jcl.In my desired output the records order should not be changed.
One more thing i forgot to specify,i want to extract only the records which are having same policy,version and diferrent timestamp.
For example:
In my first post there are two policies(Q12345&Q78901) having same version no with diferrent timestamp.The policy Q45678 has repeted twice with diferrent version no.i want to retain these records but the order should not be changed.
Can you please help me how to do it. _________________ Thanks,
Ramachandra Reddy
Joined: 03 Jan 2003 Posts: 283 Topics: 27 Location: US
Posted: Tue Aug 22, 2006 7:56 am Post subject:
yrcreddy,
Your inputs and outputs are inconsistent - Take, Q12345, there are 2 records with version nos 1 and 1 - You have retained the record with has the latest timestamp 2006-09-29-11.14.42.23 whereas for Q78901 you have both the records in the output even though they have the same version
Please post a correct set of inputs and outputs inorder for us to suggest you a solution.
________
Vittorio Jano
Last edited by coolman on Sat Feb 05, 2011 1:51 am; edited 1 time in total
Joined: 26 Nov 2002 Posts: 12375 Topics: 75 Location: San Jose
Posted: Tue Aug 22, 2006 8:08 am Post subject:
ycrreddy,
Try this job. I assumed that your input is 80 bytes LRECL and is of FB recfm. However your specs are confusing. You say you want to pick the latest timestamped record and yet you say the order should not be changed. This does not work for Policy no: Q78901 as it has 2 records with the same version no (record # 4 & 11) .record # 11 has the latest timestamp. Now if we are to retain the order then Q78901 will be at the bottom where as you show it as record #4.
I have the following question, How do we get the following result.
1. the order of the policy number should not be changed and the record should be latest record based on timestamp and also removing the duplicates.
2. The order of the policy number should be in ascending order and the record should be latest record based on timestamp and also removing the duplicates.
We can't use the ICETOOL utility but i got the result by using SYNCSORT utility by sorting on Policy number and Timestamp and in the next step removed the duplicates.
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