Suppose, file A has 100 records and file B has 500 records. We
want to write records common to both A and B into file C and
records which are present only in either A or B into another file D.
What should be the logic of Cobol program to achieve this?
Answer Posted / m
correction to #3
sort files Asc
if f1 = f2
move file1-rec to file3-rec. write file3-rec
read f1 & f2.
if f1 < f2
move file1-rec to file4-rec. write file4-rec.
read f1.
if f1 > f2
move file2-rec to file4-rec. write file4-rec
read f2.
| Is This Answer Correct ? | 11 Yes | 1 No |
Post New Answer View All Answers
How do you code cobol to access a parameter that has been defined in jcl? And do you code the parm parameter on the exec line in jcl?
What is rmode(any) ?
What is amode(31)
Which is not true about evaluate statement
Our issue is there seems to be a disconnect, or no link, between our SELECT statement and our SD. We had SELECT SORT-FILE and SELECT SORT-FILE ASSIGN TO SORTWRK. ASSIGN TO SORTWRK1 SORTWRK2 SORTWRK3 SORTWRK4. with SD SORT_FILE RECORD CONTAINS 7833 CHARACTERS. In either case, at run time, the system ignored our SORTWRK# DD statements and allocated 16 sort works with the SORTWK## naming convention. Any ideas why the system does not recognize the connection? We do not even need the SORTWRK DD statements. Thanks
)If there are 10 steps in GDG, if I want to refer the step2 after step5 . what should I do?
What is the difference between structured cobol programming and object alternativelyiented cobol programming?
I have File 1 occurs 5 times with Employee-ID,Employee-Name,Employee-Dept (EEE and MECH). I have File 2 occurs 10 times with Employee-ID,Employee-Name,Employee-Dept (EEE,CIVIL,CHEMICAL and MECH). In FIle 1 and FIle 2 , for matching Employee-DEPT (Only MECH) , we need to move entire records from file1 to file 2. We should not use 2D array. Your help is needed here.
Can a Search can be done on a table with or without Index?
how do you reference the fixed unblock file formats from cobol programs
In COBOL, what is the different between index and subscript?
Is it possible that the redefines clause has different picture clauses compared to the one it redefined?
How do you reference the following file formats from cobol programs?
What are the different rules for performing sort operation?
What are the different open modes available in cobol?