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

Horizontal merging


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
rkarthik22

New User


Joined: 18 Apr 2009
Posts: 47
Location: India

PostPosted: Sun May 17, 2009 11:27 am
Reply with quote

I have two input file as s:

Input file 1:

F1 F2 F3

1234 ABCD XYZ
5678 EFGH SOT


Input file 2:

F1 F2 F3

4321 PQRS MAKE
5187 TUVW SOUL
9101 GJKL LOP


I am expecting output like:

Output:


F1 F2 F3 F1 F2 F3

1234 ABCD XYZ 4321 PORS MAKE
5678 EFGH SOT 5187 TUVW SOUL
<<<<<<SPACES>>>> 9101 GJKL LOP

Can anyone help me to accomplish this with the help of easytrieve ...horizontal merging..
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun May 17, 2009 2:44 pm
Reply with quote

Hello,

The only time there will be <<<<<<SPACES>>>> inserted is on the last mis-matched record(s)? This cannot happen in ther middle?
Back to top
View user's profile Send private message
rkarthik22

New User


Joined: 18 Apr 2009
Posts: 47
Location: India

PostPosted: Sun May 17, 2009 5:52 pm
Reply with quote

Output:


F1 F2 F3 F1 F2 F3

1234 ABCD XYZ 4321 PORS MAKE
5678 EFGH SOT 5187 TUVW SOUL
<<<<<<SPACES>>>> 9101 GJKL LOP

Spaces should be there...because..there is no third record in input file 1.

i am not matching on any keys.....i just want to merge both the files i.e.horizontal merging with easytrieve
Back to top
View user's profile Send private message
dick scherrer

Moderator Emeritus


Joined: 23 Nov 2006
Posts: 19244
Location: Inside the Matrix

PostPosted: Sun May 17, 2009 9:48 pm
Reply with quote

Hello,

Then what is the issue?

Define 2 input files and 1 output, read them record by record until end of file, move the info from each file to output and write.

Set an indicator when either file has reached e-o-f and move spaces to that part of the output area.

When both files reach e-o-f, terminate.

If something does not work, post the problem info and someone will be able to assist.
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Merging 2 datasets into one DFSORT/ICETOOL 1
No new posts Merging 2 files but ignore duplicate... DFSORT/ICETOOL 1
No new posts Syncsort- Merging two records into on... SYNCSORT 5
No new posts Merging more than two records DFSORT/ICETOOL 15
No new posts Merging lines DFSORT/ICETOOL 4
Search our Forums:

Back to Top