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.
COBOL match and merge on VSAM
-
- Global moderator
- Posts: 3720
- Joined: Sat Dec 19, 2009 8:32 pm
- Skillset: Systems programming, SAS, COBOL, CICS, JCL, SMS, VSAM, etc.
- Referer: other forum
- Location: Dubuque, Iowa, USA
Re: COBOL match and merge on VSAM
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.
- dick scherrer
- Global moderator
- Posts: 6268
- Joined: Sat Jun 09, 2007 8:58 am
Re: COBOL match and merge on VSAM
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.
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.
d.sch.
-
- Similar Topics
- Replies
- Views
- Last post
-
- 8
- 6099
-
by kbabu
View the latest post
Mon Mar 15, 2021 8:25 am
-
- 1
- 1831
-
by sergeyken
View the latest post
Mon Nov 23, 2020 7:25 pm
-
-
Merge multiple fixed length files of different record length
by corvette1982 » Mon Mar 01, 2021 11:46 pm » in JCL - 8
- 5202
-
by willy jensen
View the latest post
Tue Mar 02, 2021 3:02 am
-
-
- 2
- 1406
-
by Robert Sample
View the latest post
Fri Oct 22, 2021 9:41 pm
-
- 3
- 7844
-
by socker_dad
View the latest post
Thu Jan 28, 2021 4:13 am