IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Matching records between 3 files


IBM Mainframe Forums -> JCL & VSAM
Post new topic   This topic is locked: you cannot edit posts or make replies.
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
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
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

Global Moderator


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

PostPosted: Tue Nov 27, 2012 12:13 am
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. View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 4
No new posts Write line by line from two files DFSORT/ICETOOL 7
No new posts Compare only first records of the fil... SYNCSORT 7
No new posts Pulling a fixed number of records fro... DB2 2
No new posts Merge two VSAM KSDS files into third ... JCL & VSAM 6
Search our Forums:

Back to Top