Page 1 of 1
copy colums from two files one the third one
Posted:
Sun Dec 19, 2010 4:27 am
by pmagui
Hello,
I have the following problem:
I have two files; one has one one column with one number field, and the other a lot iof columns, I need to merge this two files by adding this only column from file 1 to the file 2 . I do no need to match anything, I just need to copy the firts column of file1 to the file2.
Is this possible with CA-Easytrieve?
The only way I founf to manipulate two files is by matching keys and I do not want this, I just want to create a thrid file from the other two.
Please let me know if this is possible, I'm pretty lost here.
Thank you
pmagui.
Re: copy colums from two files one the third one
Posted:
Sun Dec 19, 2010 10:31 am
by dick scherrer
Hello,
Is this possible with CA-Easytrieve?
Yes, there is no rule requiring a read to use a key.
Just read a record from file 1and a record from file 2 then write the new output file from the combined data.
This will have problems if it ever happens that there are not the same number of records in both files. . .
Re: copy colums from two files one the third one
Posted:
Sun Dec 19, 2010 1:33 pm
by BChat
Hi,
Any particular reason for not using the file matching (like may be you do not have a matching key)?
As Dick pointed out, you will have problem if you have any mismatch. If you have the option, it is a better idea to do a file matching logic with an exception report if unmatched. In almost all days the report will be empty. But suddenly if there is a some error in the input file, this will save your production-support guy from spending a sleepless night fixing it.
Thats my suggestion.
Thanks,
BChat
Re: copy colums from two files one the third one
Posted:
Mon Dec 20, 2010 2:57 am
by dick scherrer
Hello,
Any particular reason for not using the file matching (like may be you do not have a matching key)?
Please read/understand the topic and try to limit replies/suggestions to the question(s) asked. . .
I do no need to match anything.
. . .
The only way I founf to manipulate two files is by matching keys and I do not want this, I just want to create a thrid file from the other two.
When the TS says they do not want/need a "matching solution" it is not proper to suggest matching solution . . .
Re: copy colums from two files one the third one
Posted:
Thu Dec 30, 2010 10:24 pm
by pmagui
Hi All, I've been very sick! not able to access my computer!, Thank you so much for your hepl, it worked!.
Wish you all a happy new year!
cheers,
Pmagui
Re: copy colums from two files one the third one
Posted:
Fri Dec 31, 2010 12:46 am
by dick scherrer
Wish you all a happy new year!
You too - good to hear you are starting the New Year feeling better
d