Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Matching records between 3 files

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM
View previous topic :: :: View next topic  
Author Message
Indrajit_57
Warnings : 1

New User


Joined: 27 Jun 2006
Posts: 60

PostPosted: Mon Nov 26, 2012 11:28 pm    Post subject: Matching records between 3 files
Reply with quote

Hi,

My requirement is to find records present in File 1 (Fixed length Flat file) which are either present in File 2 (Fixed length VSAM File) or File 3 (Fixed length VSAM file). File 2 and 3 are of the same record length. File 1, 2 and 3 have keys starting at 1 position and is of length 5 bytes.

File 1 will not have any duplicate record and the records will definitely be present in either File 2 or File 3.

When a match is found then the entire record from File 2 or File 3 (wherever it is found) needs to be written into a flat output file.

For example,

File 1 (FB/80 bytes)

00001ABC
00004DEF
00007GHI

File 2 (VSAM/1000 bytes)
00001ABCTHIS IS A TEST DATA 1
00002PQRTHIS IS A TEST DATA 2
00003XYZTHIS IS A TEST DATA 3
00004DEFTHIS IS A TEST DATA 4

File 3 (VSAM/1000 bytes)
00007GHITHIS IS A TEST DATA 5
00009LMNTHIS IS A TEST DATA 6

The output should be (FB/1000 bytes)
00001ABCTHIS IS A TEST DATA 1
00004DEFTHIS IS A TEST DATA 4
00007GHITHIS IS A TEST DATA 5


Can this be performed in a single step?

Thanks,
Indrajit
[/code]
Back to top
View user's profile Send private message

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
Location: San Jose

PostPosted: Mon Nov 26, 2012 11:51 pm    Post subject:
Reply with quote

Indrajit_57,

Aren't using Syncsort? This Forum is for DFSORT related questions. Please post your questions in the JCL forum.

Thanks
Back to top
View user's profile Send private message
Pandora-Box

Moderator


Joined: 07 Sep 2006
Posts: 1534
Location: Andromeda Galaxy

PostPosted: Tue Nov 27, 2012 12:13 am    Post subject:
Reply with quote

Indrajit,

Did you close all queries in your open threads?

Moderators,

Please lock this thread until he closes the open threads all lead to some dangling pointer
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   This topic is locked: you cannot edit posts or make replies.    IBMMAINFRAMES.com Support Forums -> JCL & VSAM All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts Check if any Detail records and extra... V S Amarendra Reddy SYNCSORT 19 Mon May 08, 2017 8:54 pm
No new posts Unable to create multiple files using... mbattu COBOL Programming 3 Fri May 05, 2017 5:35 pm
This topic is locked: you cannot edit posts or make replies. Merge two files and update Trailer re... Yashashri JCL & VSAM 1 Thu May 04, 2017 12:54 pm
No new posts Dynamic split of files under groups sril.krishy DFSORT/ICETOOL 4 Mon Apr 17, 2017 1:09 pm
No new posts Compare two files and subtract values ameetmund DFSORT/ICETOOL 7 Fri Mar 31, 2017 3:35 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us