Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

I have a File that has duplicate records. I need only those
records that occur more than thrice.

Answer Posted / brian

Sort the file in ascending order of your duplicated fields.
You can write a COBOL module to read the file sequentially.
Set up a dup-counter in Working Storage. Set up a group of
fields in Working Storage to hold duplicated fields. They
should be similar to what you are sorting on. Save each
records read fields after reading it. When you read the
current record compare it to the saved fields. If they
match add to your dup-counter. If they don't match zero
out your counter. After adding to your counter check the
value. If > 1 you have a 3rd duplicate. Write that record
to a duplicate output file. Hope I'm close to getting you
an answer.

Is This Answer Correct ?    3 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how can a gdg base be created in a jcl. What is the difference between empty and scratch parameter while defining/altering gdg base?

1280


What do you understand by the term notcat 2 – gs?

1241


Can anybody tell what is tool used to generate the list of PROCS used in JCL to generate a PROCTREE

2456


Is condition checking possible in jcl? If yes, how?

1290


How to code these statements in JCL: CLEANUP INITIAL(NO) RESTART(NO) DYNALLOC(NO) job definition..?

2254


Can we use DISP=SHR in output file in JCL

1419


What is NOTCAT ?

1332


Explain the function of dd name parameter with a 2 part structure; audit.report?

1456


What is the purpose of dd dummy statement?

1463


in ways data can be passed to a COBOL program from JCL?

1222


How can return codes be tested before execution of a job step?

1482


a dd statement has 2 types of parameters. Name them?

1135


What is the function of the steplib dd statement?

1199


What is 'mounting' of volumes ? Is there anything that a programmer can do in it ? How to find currently mounted volume ?

2565


What is the purpose of the dd keylen parameter?

1219