View previous topic :: View next topic
|
Author |
Message |
ajaybshukla
New User
Joined: 09 Sep 2008 Posts: 39 Location: india
|
|
|
|
Hi All,
I want to compare two files on the basis of some key and want to write similar matching records in one out put file.
i/pfile1 12345 sdffg 2k34jl 34567
12346 ghdd 2lelwe 34555
i/pfile2 12345 sdffg 2k34jl 34567
Ouput should contain:
o/pfile 12345 sdffg 2k34jl 34567
Please help
Thanks |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Which sort product are you using, DFSORT, SYNCSORT, CA-SORT
RECFM & LRECL of both files
Key position, length and format of both files.
Any other rules for include/exclude records |
|
Back to top |
|
|
ajaybshukla
New User
Joined: 09 Sep 2008 Posts: 39 Location: india
|
|
|
|
Thanks for reply
We are using Sycnsort
RECFM & LRECL of both files are different
key length is 10 byte and position is also different
just want to compare 10 specific byte field and if equal then want to write it into o/p file.
Thanks |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Well, if you had read any threads on the subject of sort then you may have realised that the questions I asked were to help those that want to help you.
Please take the time to read your original post, see the same old questions asked again, and then look at the c**p that you replied with.
Quote: |
RECFM & LRECL of both files are different |
WOW, that's interesting - but NOT what was asked.
Please give definitive values
Quote: |
key length is 10 byte and position is also different |
Gosh, does that mean that we can choose the key positions for ourselves, or do you want to tell us the location, length and format of the ones that you want us to use.
Quote: |
just want to compare 10 specific byte field and if equal then want to write it into o/p file. |
What, just the 10 bytes ? Or maybe the record from file 1, or from file2 or a combination of data from both. |
|
Back to top |
|
|
ajaybshukla
New User
Joined: 09 Sep 2008 Posts: 39 Location: india
|
|
|
|
my first i/p is LRCL 29021 byte long
2nd i/p file is LRCL 80 byte only
i want to compare on the basis of 10 byte fileld
i want to compare 10 byt acct number from both files if they r equal then want to write it into o/p file.
Thanks |
|
Back to top |
|
|
expat
Global Moderator
Joined: 14 Mar 2007 Posts: 8797 Location: Welsh Wales
|
|
|
|
Please explain what was so totally unclear regarding my two earlier requests for information that you have deemed that you would not answer the questions fully.
The idea of people asking for specific information is that they NEED the information to try to help you, and not to just ask questions for nothing better to do.
Maybe the little form below might help you
The RECFM for file 1 is
The LRECL for file 1 is
The position of the key in file 1 is
The data format of the key for file 1 is
The RECFM for file 2 is
The LRECL for file 2 is
The position of the key in file 2 is
The data format of the key for file 2 is
If there is a match on the keys, what exactly do you want to see in the output. Is it just the key value, is it the record from one file, both files, a combination thereof.
YOU are the only one who knows what they want, and unless you take the time and effort to explain it to us, then nobody will be able to help you.
Please CLICK HERE to find out the right way to ask your questions. |
|
Back to top |
|
|
ajaybshukla
New User
Joined: 09 Sep 2008 Posts: 39 Location: india
|
|
|
|
Sorry Expat that i could not explain you my problem,
I think this will be ok
The RECFM for file 1 is FB
The LRECL for file 1 is 29021
The position of the key in file 1 is 4 to 13
The data format of the key for file 1 is Alphanumeric
The RECFM for file 2 is FB
The LRECL for file 2 is 80
The position of the key in file 2 is 4 to 13
The data format of the key for file 2 is Alphanumeric
If this key matches then whole record from the file 1 will get written to new output file
Thanks |
|
Back to top |
|
|
|