Portal | IBM Manuals | Downloads | Products | Refer | Info | Programs | JCLs | Forum Rules*| Site Map | Mainframe CD 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index
 
Register
 
IBMMAINFRAMES.com - IBM Mainframe Support Forums Index FAQ Search Memberlist Usergroups Profile Log in to check your private messages Log in
 
How to Merge 2 different files(rec length diff) data into 1

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
Author Message
Laxminarsimharao

New User


Joined: 08 May 2007
Posts: 21
Location: hyderabad

PostPosted: Wed May 07, 2008 2:26 am    Post subject: How to Merge 2 different files(rec length diff) data into 1
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
References
PostPosted: Wed May 07, 2008 2:26 am    Post subject: Re: How to Merge 2 different files(rec length diff) data into 1 Reply with quote

Skolusu

DFSORT Developer


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

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

Laxminarsimharao,

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

http://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: 21
Location: hyderabad

PostPosted: Wed May 07, 2008 3:08 am    Post subject: Reply to: How to Merge 2 different files(rec length diff) da
Reply with quote

Thank you Skolusu.

I got the result.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1