Is there any way to get the common values present in multiple files(more than 2 files) - using Syncsort? The values that are present in all files has to be written to another file.
But the number of steps increases as files are in more numbers.
Vijayakumar Mani,
You can use the SYNCSORT with a ONE STEP for multiple files to achive the desired output.Please provide dummy input and expected output so that you can get quick and correct solution.
The XSUM parameter should be used if you want records deleted by SUM processing to be written to a data set defined by the SORTXSUM DD statement.
Since you have concatenated the 3 files in SORTIN DD statement and specified SUM FIELDS=NONE, the duplicate values will be deleted and those deleted values will be stored in datset defined by the SORTXSUM DD statement.
My requirement is different. I want the particular values found in all files to be written to an output dataset. I think i have specified my requirement clearly in the first post itself.
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
Hello,
I may be mistaken, but i believe this has gone in a different direction than the original request.
If i understood, the output should be only the values that appear in every file. If there were 3 files, only values appearing in all 3 files would go to output. If there were 20 files, onle values appearing in all 20 files would appear in the output.
So far, i believe nothing posted except JOINKEYS will do this. . .
Joined: 23 Nov 2006 Posts: 19243 Location: Inside the Matrix
Hi Arun,
Quote:
I believe Gerry's card also needs to be modified with the number of input files.
Yup, it will
If the number of files to process is dynamic, a "front-end" process might detect the number of files and generate the "number of input fles" in whatever code. . .