View previous topic :: View next topic
|
Author |
Message |
sid_aec
New User
Joined: 01 Jul 2008 Posts: 60 Location: Kolkata
|
|
|
|
Hi,
In an interview I have been asked the below question:
One file have 1000 records and another file have 2000 records,Need to have one file with the records where the first 15 bytes between the two files matches with each other.If multiple records of first file matches with a second file record then all the records will be there into the third file.
Can anybody tell me how can I do other than writing a cobol program. |
|
Back to top |
|
|
santosh.ambaprasad
New User
Joined: 08 Mar 2009 Posts: 16 Location: London
|
|
|
|
yes.
It is possible to do using ICETOOL(DFSORT)
Do a search on 'SPLICE' in this forums, you will see quite a few posts..
Cheers
Santosh S |
|
Back to top |
|
|
sid_aec
New User
Joined: 01 Jul 2008 Posts: 60 Location: Kolkata
|
|
|
|
Please don't mind but as I know to use splice I have to consider one file as base file and records from another file will be joined with the base file records based on matching key and those bytes will be joined to the base record which are mentioned WITH parameter.
But if I want to have the base record too in my output file then how can I achieve and If the both file have duplicates then how can I consider one as a Base file.
Please suggest if you have any trick. |
|
Back to top |
|
|
Frank Yaeger
DFSORT Developer
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
|
|
|
|
The KEEPBASE operand of SPLICE keeps the base records.
If you want a complete answer, you need to give a complete description of the problem. Please show an example of the records in each input file (relevant fields only) and what you expect for output. Explain the "rules" for getting from input to output. Give the starting position, length and format of each relevant field. Give the RECFM and LRECL of the input files. If file1 can have duplicates within it, show that in your example. If file2 can have duplicates within it, show that in your example. |
|
Back to top |
|
|
sid_aec
New User
Joined: 01 Jul 2008 Posts: 60 Location: Kolkata
|
|
|
|
THANKS a lot..I just wanted learn the trick and then try myself.Thanks again. |
|
Back to top |
|
|
|