View previous topic :: View next topic
|
Author |
Message |
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
I have three input files
First four bytes is KEY Field.......
File1
----
E001 shank tttt
E002 deep rrrr
E003 reen gggg
.
File2
----
E002 dddd rrrr
E003 eeee gggg
.
File3
-----
E003 tttt yyyy
.
Ouput supposed to be
Output file
--------
E001 shank tttt
E002 deep rrrr
E002 dddd rrrr
E003 reen gggg
E003 eeee gggg
E003 tttt yyyy
I came to know that we can do this with ICETOOL splice option. |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
ibmmainframesyntel, you're not splicing anything. All you're doing is concatenating three files into one, sorted by the key field. |
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
IF the key field (first four bytes) from file1 doesn't match,
then the respective key matching from file2 and file3 should not be in the ouput file. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Your example doesn't illustrate what you say you want since the keys in file2 and file3 all have matches in file1. Please show a better example where records are dropped from the output file. Also, what is the RECFM and LRECL of your input files? |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
First two byte is a key field
The respective record which matches the key field
from input-1 to Input-2 and Input-3 should be in output file.
Input-1
--------
E1 first file record
E3 first file record
E4 first file record
E6 first file record
Input-2
-------
E1 second file record
E2 second file record
E3 second file record
E3 second file record DUp
Input-3
-------
E3 third file record
E4 third file record
E5 third file record
Ouput
-----
E1 first file record
E1 second file record
E3 first file record
E3 second file record
E3 second file record Dup
E3 third file record
E4 first file record
E4 third file record
E6 first file record
"E2 second file record "
is not in the output file
coz no respective key field in Input-1
"E5 third file record"
is not in the output file
coz no respective key field in Input-1
The key 'E3' matches in all the file
so respective records are concatinated according to that..
Pls let me knw...
hope u understood.. |
|
Back to top |
|
|
ibmmainframesyntel
Active User
Joined: 26 Feb 2007 Posts: 126 Location: Chennai
|
|
|
|
Ignore the previous Format which i submitted
consider this one...
First two byte is a key field
The respective record which matches the key field
from input-1 to Input-2 and Input-3 should be in output file.
Input-1
--------
E1 first file record
E3 first file record
E4 first file record
E6 first file record
Input-2
-------
E1 second file record
E2 second file record
E3 second file record
E3 second file record DUp
Input-3
-------
E3 third file record
E4 third file record
E5 third file record
Ouput
-----
T1 E1 first file record
T2 E1 second file record
T1 E3 first file record
T2 E3 second file record
T2 E3 second file record Dup
T3 E3 third file record
T1 E4 first file record
T3 E4 third file record
T1 E6 first file record
First file record should be prefix with 'T1' in the output
Second file record should be prefix with 'T2' in the output
third file record should be prefix with 'T3' in the output
My record length is 150
Recfm is FB
"E2 second file record "
is not in the output file
coz no respective key field in Input-1
"E5 third file record"
is not in the output file
coz no respective key field in Input-1
The key 'E3' matches in all the file
so respective records are concatinated according to that..
Pls let me knw...
hope u understood.. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
Closed - duplicate |
|
Back to top |
|
|
|