View previous topic :: View next topic
|
Author |
Message |
rkarthik22
New User
Joined: 18 Apr 2009 Posts: 47 Location: India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
rkarthik22
New User
Joined: 18 Apr 2009 Posts: 47 Location: India
|
|
|
|
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 |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
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 |
|
|
|