COBOL match and merge on VSAM



Support for C, C++, COBOL, PL/I, Fortran and assembler applications' runtime Environment LE.

COBOL match and merge on VSAM

Postby d_ash » 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.
d_ash
 
Posts: 1
Joined: Sat May 08, 2010 5:03 am
Has thanked: 0 time
Been thanked: 0 time

Re: COBOL match and merge on VSAM

Postby Robert Sample » Sat May 08, 2010 6:26 am

Depending upon the number of records in each file, either sort the sequential file and do a two-way match program, or read the sequential file and do a direct read of the VSAM file data. In any case, please remember this is a HELP forum, not a DO-YOUR-PROGRAMMING-FOR-YOU forum and we won't provide code -- just assistance and pointers if you have problems.
Robert Sample
Global moderator
 
Posts: 3719
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: COBOL match and merge on VSAM

Postby dick scherrer » Sat May 08, 2010 7:53 am

Hello and welcome to the forum,

Before writing any code, you need to determine how younwill implement the requirement.

Suggest you post how you intend to implement and people here can review your design and comment before you invest a lot of time in code that might not be used.

Once you have worked thru the design, we can also help if there are questions or problems developing the code.
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6268
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to Language Environment

 


  • Related topics
    Replies
    Views
    Last post