Read filea And file b write the same records in both files?
Records in a but not in b record in b but not in a

Answer Posted / ravi


JOB INPUT (INFILE1 KEY (INFIL1-ID) +
INFILE2 KEY (INFIL2-ID))
IF MATCHED
PUT OUTFILE1
ELSE
IF INFILE2
OUT1-REC = INFIL1-REC
PUT OUTFILE2
ELSE
OUT1-REC = INFIL2-REC
PUT OUTFILE2

END-IF
END-IF
.

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how do you reference the rrds file formats from cobol programs

793


If you are current on the owner of a set, what is the difference between an obtain next and obtain first? Actually in which topic will we use dis???Plz explain it clearly

2657


Hi pls anybody tell me about " ANALYSIS DOCUMENT PREPARATION AND ESTIMATION OF TASK " (in real time project)."I want to update a sequential file in my project" for that purpose i need both structures i mean analysis document and estimation of task.

1697


How to remove the spaces at the end of each record in the output file of variable length, via cobol program?

670


What is perform what is varying?

701






State the various causes of s0c1, s0c5 and s0c7.

658


What is the default value(s) for an initialize and what keyword allows for an override of the default?

691


What are 77 levels used for?

656


In COBOL programming, what is PERFORM? What is VARYING?

668


What are the pertinent COBOL

2041


What are various search techniques in cobol? Explain.

641


Difference between cobol and cobol-ii?

704


Can we change the password using ALTER? anyone tried and changed?

1542


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

1646


How do you reference the following file formats from cobol programs?

693