I am having two KSDS files whose records i have to match and
according to certain conditions.
The files contains records like:-
111 as mike
222 wet neal
333 of rober
444 yes thomas
888 why sam
222 wet neal
444 the tom
555 see kelvin
666 no gery
a). Account no.present in file1 and not in file2 be written to output with Insert indicartor as “I”.
b.) Account no.present in file2 and not in file1 will be written to output with Delete indicator as “D”.
c.) Account no.are same in both file1 and file2 but the Other Feilds differ than Ind will be compared. If the data is changed, then the record will be written to output with Update ind as “U”.
d.) Account no. present in both file1 and file2 and also the other feilds are same then the record will be ignored.
So now the output file should be like this :-
output file :-
111 as mike I
333 of rober I
444 yes thomas U
555 newton U
888 why sam D
444 the tom U
555 see kelvin U
666 no gery D
so this is my problem, that how can i get this output?
Joined: 11 Jun 2007 Posts: 80 Location: Columbus, Ohio
Multiple file matches are a fairly common process requirement. Dick Scherrer has posted a "Sticky" titled "2-File Match/Merge sample code", at the top of the Mainframe COBOL forum, which contains an example. Study the example to get the basic logic. Then model and modify the code to meet your requirements. If you still have questions/problems, after you have attempted to code, compile, and test your program, please post them along with any pertinent detail info and we will be happy to help.