I have the requirement to compare the two files and pick up
the matching records.
File 1. file2
23 32
32 13
34 15
35 36
36 35
43
Get the matching records from this 2 files to out file. how
you will do this in cobol program?
Answer Posted / soumya santosini patnaik
first load the files in shorted order after that code a
matching program. in the procedure division check the file1
entry with file2 entry if file1 entry = file2 entry then
then write to o/p file end-evaluate esle check for file1<
file2 (if yes then the pointer is brought down to the 2nd
rec of file1 and checked with 1st rec of file2 when the
para is performed for 2nd time),if the above condition is
false then it checks if file1>file2 if yes then pointer is
brought down to the next entry of file2 and checked with
1st entry of file1 with 2nd entry of file2 in next perform
and the process is done till the end of records.
Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
how can i see junk values in dclgen or in hostvariable of comp ?
What is the difference between goback, stop run and exit program in cobol?
Explain the configuration section of a cobol program with examples of syntax.
Write a program that uses move corresponding.
How can you get the ksds file records into your cobol program?
what is difference between cobol and cobol/400
input 1 input2 ouput1 output2 output 3 1 re 300 1 re 200 1 re 300 3 rc 500 1 re 200 2 rr 400 1 re 300 2 rr 400 1 rc 400 3 rc 500 1 rc 400 2 rr 700 2 rr 700 5 tt 900 5 tt 900 2 inputs r in flat file and output 1 is matched records,ouptput2 is unmatched of input1,output3 is unmatched of input2! how vl u get the output files using sequential order and to check with each and every records! let me know the procedure division ?
What is amode(24), amode(31), rmode(24) and rmode(any) (applicable to only mvsesa enterprise server) ?
example for sub strings ? and refernce modifications whit output pls
What is the difference between structured cobol programming and object alternativelyiented cobol?
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
In which area will you utilize 88 level items in cobol?
Write a cobol program making use of the redefine clause.
Explain how to differentiate call by context by comparing it to other calls?
State the various causes of s0c1, s0c5 and s0c7.