I have two files.
File 1 and File 2, I want to create a file named File 3.
File 3 should have the records when a few columns of File 1 is equal to a few columns of File 2.
File 1:
ABCDE1
ABCDE2
ABCDE3
File 2:
ABCDE1
ABCDE2
ABCDE4
File 3:
ABCDE1
ABCDE2
should have above records, comparison, last three columns of File 1 against File 2
Sorry, Above requirement has been changed a littile bit:--
Please see below--
I have three flat input files, [file-B(LRECL=9, Key=1-9)] ,[file-P(LRECL=9, Key=1-9)] and [file-S(LRECL=9, Key=1-9)]
One output file, [File-M(LRECL=9)]
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
deepak_munjal wrote:
Thanks Kolusu!!
But can't we do this with Comparex or ICETOOL.
Are you shopping for a solution ? I gave you the optimal solution using DFSORT. If you want a solution using COMPAREX , then why did you even post the question in DFSORT forum in the first place.
Next time you post a requirement , post all your limitations and your choices too , so that i can simply ignore them.
As you see the above code has two steps and Also liitle complicated.
I was looking to do this in one step by using ICETOOL/Comparex.
As here, I have following condition--
( file-B key NOT= file-P key) OR (file-B key = file-S key)
I mean I can do this easily in two steps by using ICETOOL/comparex with less complicated code.<By implementing (file-B key NOT= file-P key) in one step and (file-B key = file-S key) in 2nd step>
Joined: 07 Dec 2007 Posts: 2205 Location: San Jose
deepak_munjal wrote:
Its not the matter of preferred!!
As you see the above code has two steps and Also liitle complicated.
I was looking to do this in one step by using ICETOOL/Comparex.
Do you really know the concept of how many passes it would require to do with ICETOOL ?. Understand the difference between one step vs multiple passes of data. Even though you code a single ICETOOL step it would take a minimum of 4 passes to get the desired results.
Quote:
I mean I can do this easily in two steps by using ICETOOL/comparex with less complicated code.<By implementing (file-B key NOT= file-P key) in one step and (file-B key = file-S key) in 2nd step>
Oh really ? I can't speak for COMPAREX , but I would LOVE to see an easier solution using ICETOOL. May be I can learn a thing from you.
Quote:
Please let me know if we have a better way.
What is the use? You are hell bent on having a solution your way. So it doesn't matter if we provided the most optimal solution.
I am not saying that that this is not the solution... I am asking if you have any other way which i can opt for and see which process take longer time.
I can do this easily using Comparex.
For first condition Compares card would be-
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
So run your COMPAREX job and Kolusu's DFSORT job and see which is faster.
As Kolusu said, you don't seem to understand the difference between multiple steps and multiple passes and how they relate to performance.
Quote:
I can do this easily using Comparex.
You seem to think the Comparex solution is "easy" whereas the DFSORT solution is not. I don't know on what basis you've reached that conclusion. That Comparex solution doesn't look easy to me (but then I don't know Comparex as you obviously don't know DFSORT).
I'm locking this thread as there's no point in continuing this discussion.