copy colums from two files one the third one



Unicenter CA-Easytrieve Plus Report Generator: CA's information retrieval and data management tool

copy colums from two files one the third one

Postby pmagui » Sun Dec 19, 2010 4:27 am

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.
pmagui
 
Posts: 7
Joined: Thu Jun 10, 2010 5:28 pm
Has thanked: 0 time
Been thanked: 0 time

Re: copy colums from two files one the third one

Postby dick scherrer » Sun Dec 19, 2010 10:31 am

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. . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: copy colums from two files one the third one

Postby BChat » Sun Dec 19, 2010 1:33 pm

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
BChat
 
Posts: 19
Joined: Thu Jun 11, 2009 8:20 pm
Has thanked: 0 time
Been thanked: 0 time

Re: copy colums from two files one the third one

Postby dick scherrer » Mon Dec 20, 2010 2:57 am

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 . . .
Hope this helps,
d.sch.
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times

Re: copy colums from two files one the third one

Postby pmagui » Thu Dec 30, 2010 10:24 pm

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
pmagui
 
Posts: 7
Joined: Thu Jun 10, 2010 5:28 pm
Has thanked: 0 time
Been thanked: 0 time

Re: copy colums from two files one the third one

Postby dick scherrer » Fri Dec 31, 2010 12:46 am

Wish you all a happy new year!
You too - good to hear you are starting the New Year feeling better :)

d
User avatar
dick scherrer
Global moderator
 
Posts: 6269
Joined: Sat Jun 09, 2007 8:58 am
Has thanked: 3 times
Been thanked: 93 times


Return to CA-Easytrieve

 


  • Related topics
    Replies
    Views
    Last post