I've three records which corressponds 77(RD) & it was sorted order before the writing into ouput.but I want the records without duplicates,so it will take the 1st sort record from the i/p file,which is a one of the duplicate record.
so,how to eliminate the duplicates from the file which i've three records.
I've one query,usually it will take 1st sort record or 2nd duplicate record or 3rd one.
like this I've some other records which having similar type of duplicates.
562728727 08
222728289 08
I've given
//SYSIN DD *
SORT FILEDS (12,2 EQ 'C RD)
SUM FIELDS=NONE
/*
//
I'm not able to find the sol & facing some error.
I'm requesting you all,please help me out.cos,I'm new to jcl as i'm from SAS.
Fager,I hope you'll give a better solution.
Thanks,
Swetha Reddy.
Bangalore.
India.
First, isn't that 77 in column 11 and 12 rather than 12 and 13?
Second, to eliminate dups you will have to sort on those columns but your desired output is not in that order, is this order required?
Third, the first 77 record was kept but the second 08 record was kept, how are you decieding on that?
Sort can get rid of the dups and can keep the original order but without understanding fully your needs, it is hard.
seems to take random records for the dups (e.g. the first record for the 77 dups, but the second record for the 08 dups).
I'm guessing that what you really want is to keep the first record with each value, but have the output in the original order of the input. If that's the case, then for your example, the output would be:
and you can use the following DFSORT/ICETOOL job to get that output. I assumed that your input file has RECFM=FB and LRECL=80, but the job can be changed appropriately for other attributes. Note the use of OPTION EQUALS which tells DFSORT to keep the first record which each value.
I mistaken typed wrongly.I supposed to write "frank",unfortunate i did mistake.I'm very sorry.
coming to my requirement,I will update today,what i need exact & as i'm waiting from customer .as they given some inputs,so we doing some analysis.
I'm very sorry,i've given wrong o/p file.I will send my exact requirement.
Hopefully,I can send the customer requirement this coming next week.as they are on vaccation till jan 2.in meantime,i will send my estimation requiremnt.
Thank you frank for your support.
and Bill ..thanks for your inputs.