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
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL
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    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

Skolusu

Senior Member


Joined: 07 Dec 2007
Posts: 2205
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: 26
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
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DFSORT/ICETOOL All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts copying data without knowing location arunsoods DFSORT/ICETOOL 6 Thu Jul 20, 2017 1:03 pm
This topic is locked: you cannot edit posts or make replies. Fetching data from BAI File arunsoods JCL & VSAM 1 Wed Jul 19, 2017 4:28 pm
No new posts Loading data to table gives wrong for... Raghu navaikulam DB2 16 Thu Jul 13, 2017 2:11 pm
No new posts SQL - select data available in index Nileshkul DB2 3 Mon Jun 26, 2017 1:30 am
No new posts NDM syntax checking without actually ... GAPX1 All Other Mainframe Topics 0 Wed Jun 07, 2017 2:36 am


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