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
Suppose there are 2 Input files Infile-1 and Infile-2. Both the Files contain Employee Records. You need to compare both the files and Write the Common Records in third file named Outfile. How can we do this using File-Aid?
What are hierarchy levels in jcl?
How do you create a temporary dataset?
Explain dfsort utility?
What is the function of dd disp parameter?
what is DD statement is used in JCL?
What is the use of symbol // in jcl?
How to do automated restart when a job abend?
How does jcl specify the job to the operating system?
What happens if both JOBLIB & STEPLIB is specified ?
Explain about LMQUERY�give a dialog information about a data set
//S10 EXEC PGM=ICETOOL //TOOLMSG DD SYSOUT=* //DFSMSG DD SYSOUT=* //CON DD DSN=VAR.INPUT1,DISP=SHR // DD DSN=VAR.INPUT2,DISP=SHR //OUT DD DSN=VAR.OUTPUT,DISP=(NEW,CATLG,DELETE), // SPACE=(CYL,(5,5)),UNIT=SYSDA //TOOLIN DD * * Splice the needed data from the two VB files together SPLICE FROM(CON) TO(OUT) ON(5,5,CH) WITHALL - WITH(12,5) WITH(22,20) VLENMAX /*
Explain the hierarchy levels in jcl?
what happens in conversion stage in job processing?
What do you understand by the term job time – out and how can you overcome that?