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

How to Merge 2 different files(rec length diff) data into 1


IBM Mainframe Forums -> DFSORT/ICETOOL
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Laxminarsimharao

New User


Joined: 08 May 2007
Posts: 26
Location: hyderabad

PostPosted: Wed May 07, 2008 2:26 am
Reply with quote

Question: I have 2 different files with different length, how can i merge the contents of the 2 files based on Pol no into one output file.

files are in below format

File1
Pol no name type
500231 arun P
567901 raj A
400567 josh A
700777 sam P


File2
Pol no Amount percentage
500231 1000 50
567901 500 20
700777 900 10

Output
Pol no name type Amount percentage
500231 arun P 1000 50
567901 raj A 500 20
400567 josh A
700777 sam P 900 10

Please help me.
Back to top
View user's profile Send private message
Skolusu

Senior Member


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

PostPosted: Wed May 07, 2008 2:59 am
Reply with quote

Laxminarsimharao,

See the Smart DFSORT trick "Join fields from two files on a key" at:

www.ibm.com/servers/storage/support/software/sort/mvs/tricks/
Back to top
View user's profile Send private message
Laxminarsimharao

New User


Joined: 08 May 2007
Posts: 26
Location: hyderabad

PostPosted: Wed May 07, 2008 3:08 am
Reply with quote

Thank you Skolusu.

I got the result.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DFSORT/ICETOOL

 


Similar Topics
Topic Forum Replies
No new posts Compare 2 files(F1 & F2) and writ... JCL & VSAM 5
No new posts Store the data for fixed length COBOL Programming 1
No new posts How to split large record length file... DFSORT/ICETOOL 10
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Write line by line from two files DFSORT/ICETOOL 7
Search our Forums:

Back to Top