I have compared two files(file1 & file2) and wrote the matched records in an sepearte file. Now adding to this i need to do write an unmatched records in seperate file and compare those records with file1 in next run of the job. Each time the job runs the files(file1 & file2) input will be changed.
can any one please help me in cobol part of this prg ?
file1 - cust file
file2 - addr file
both have common cust no.
i have sorted with that key
read cust file into cust rec
read addr file into addr-rec
if cust-no < ad-cust-no
display ' no match addr recd for custno'
if cust-no > ad-cust-no
display 'no custno match for ad-custno'
move cust-rec to out-rec
i m writing my output file. ths s my actual code .
Joined: 22 Apr 2006 Posts: 6258 Location: Mumbai, India
There is a "sticky" in the "Mainframe COBOL" part of the Forum (2-File Match/Merge sample code) -- unload(download?) that, please have a look there and make changes accroding to that. If you get stuck, please post us back with what you've tried and what error did you get.