If there are two files one with 100 records and other with
101 records. we have to find out the one record that is the
odd man out . What are the steps to do it

Answer Posted / kamal

Hi Presannakumar,
We can't compare two files in dfsort.so u first u merge two files and using dfsort in dfsort some fields equal to none means its coming avoid the duplicates,so we can give extra xsum the particular extra record will store xsum dataset.
sync sort we can esily match.

in cobol program matcing logic program we can use and find.
read 2 file at end.
if eno = eno1
move eno to eno3
write rec
if eno > eno1
perform first-para read
write another file
if eno < eno
perform second-para read
write another file.
now the particular record presend in another file.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

i made it to stage 3 of an interview process wednessday they will quiz my knowledge again face to face for an analyst role recruiter said it will be based on Business requirements system is cobol and good ideas what they might ask etc

2111


Explain the configuration section of a cobol program with examples of syntax.

663


How to find out the closest prime number of an input number? I believe it has something to do with SEARCH and COBOL Linear Array.

3728


How to remove 2 duplicate records and copy only one using job control language?

760


Define cobol?

874






how we sort two input files based on a common column and giving one o/p file please send me the coding logic?

1666


can anybody post me about file-aid and changemen tools pls and give me reference if any mainframe guys are there

1912


Can you please let me know the centre name of INS certification in Kolkata.

1723


Is it possible that the redefines clause has different picture clauses compared to the one it redefined?

683


which is Best IBM Mainframe Training and Placement Institute in Ameerpet Hyderabad

1030


A table has two indexes defined. Which one will be used by the SEARCH?

767


please..could u give an example about USAGE IS POINTER ..and explain why and when we use it ?

1962


i want a program using by if, evaluate , string, unstring, perform, occurs?

4069


what is search and searchall?what is the diffrence between them?give an best example?

5581


I have to write to a outfile where the number of records in that file should be the header of that file using IMS.. can anyone help me in this issue

1935