COBOL match and merge on VSAM
Posted: Sat May 08, 2010 5:28 am
Hello,
I have a requirement to use a VSAM input file (size 50) and Flat file (VB size300). i will have customer number, date and customer date of birth in the VSAM file and in the VB file I have customer number and date and some other details.
Here i have to match these 2 files for customer number and output file should contain the complete details of VB file size 300 plus the dob from VSAM file. Please let me know what logic should be used here.
Other thing is I will have 5 or 6 records in the VB file, but I need to match the customer number and merge the DOB only for the first record and all other records should be written in the Output as it is.
ex: first record should match customer number and write it with DOB, but the other records from 2 to 5 or may 7 should be written as it is.
Thanks in advance.
Das.
I have a requirement to use a VSAM input file (size 50) and Flat file (VB size300). i will have customer number, date and customer date of birth in the VSAM file and in the VB file I have customer number and date and some other details.
Here i have to match these 2 files for customer number and output file should contain the complete details of VB file size 300 plus the dob from VSAM file. Please let me know what logic should be used here.
Other thing is I will have 5 or 6 records in the VB file, but I need to match the customer number and merge the DOB only for the first record and all other records should be written in the Output as it is.
ex: first record should match customer number and write it with DOB, but the other records from 2 to 5 or may 7 should be written as it is.
Thanks in advance.
Das.