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.
copy colums from two files one the third one
- dick scherrer
- Global moderator
- Posts: 6268
- Joined: Sat Jun 09, 2007 8:58 am
Re: copy colums from two files one the third one
Hello,
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. . .
Yes, there is no rule requiring a read to use a key.Is this possible with CA-Easytrieve?
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.
d.sch.
-
- Posts: 19
- Joined: Thu Jun 11, 2009 8:20 pm
- Skillset: 8+ yrs
- Referer: www_ibmmainframes_dot_com
Re: copy colums from two files one the third one
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
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
- dick scherrer
- Global moderator
- Posts: 6268
- Joined: Sat Jun 09, 2007 8:58 am
Re: copy colums from two files one the third one
Hello,
Please read/understand the topic and try to limit replies/suggestions to the question(s) asked. . .
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. . .
When the TS says they do not want/need a "matching solution" it is not proper to suggest matching solution . . .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.
Hope this helps,
d.sch.
d.sch.
-
- Posts: 7
- Joined: Thu Jun 10, 2010 5:28 pm
- Skillset: One year working on Mainframe
- Referer: googling
Re: copy colums from two files one the third one
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
Wish you all a happy new year!
cheers,
Pmagui
- dick scherrer
- Global moderator
- Posts: 6268
- Joined: Sat Jun 09, 2007 8:58 am
Re: copy colums from two files one the third one
You too - good to hear you are starting the New Year feeling betterWish you all a happy new year!

d
-
- Similar Topics
- Replies
- Views
- Last post
-
-
How can I copy message queue files (LGMSG,SHMSG) in V9R1
by futohomok » Thu Jul 27, 2023 5:54 pm » in IMS DB/DC - 6
- 2011
-
by futohomok
View the latest post
Thu Aug 03, 2023 1:21 pm
-
-
-
Joining 2 vb files into vsam files ended error
by newbiemainframe » Thu Nov 12, 2020 7:59 am » in JCL - 1
- 1748
-
by NicC
View the latest post
Thu Nov 12, 2020 7:15 pm
-
-
- 12
- 3848
-
by RalphEagle
View the latest post
Fri Jul 30, 2021 1:00 pm
-
- 4
- 6087
-
by steve-myers
View the latest post
Sat May 15, 2021 1:58 am
-
-
Copy partial record after a string in a record using SORT.
by Esmayeelhusen » Thu May 04, 2023 3:03 pm » in DFSORT/ICETOOL/ICEGENER - 16
- 4164
-
by Esmayeelhusen
View the latest post
Mon May 22, 2023 3:50 pm
-