without the use of the [ code ] [ /code ] tags, the TS would not know
to insure all the parameters contained in the SYSIN must start in col 2 (or greater)
with a space in col 1.
yes, i tried and it worked. by the way, how to display the recs not matched in different files. in other words, the recs not matched in file a shuold be displayed in file c, and the recs not matched in file b should be displayed in file d.
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
xpower wrote:
Thank you so much, Sir.
I'm not Sir, I'm just another guy on the block.
Quote:
yes, i tried and it worked. by the way, how to display the recs not matched in different files. in other words, the recs not matched in file a shuold be displayed in file c, and the recs not matched in file b should be displayed in file d.
Joined: 22 Apr 2006 Posts: 6248 Location: Mumbai, India
I've just noticed, this thread is in DFSort part of the Forum, Please note there is a difference the way JOINKEYS syntax is allowed in SyncSort and DFsort and I can not check if this will work with DFSort or not as I'm not logged on to the LPAR uses DFSort. For example, DFSort would use F1=IN1 while what I post is SyncSort Syntax. But you said previous solution worked for you..so I leave it to you (and Frank, ofcourse).
xpower,
Try below job for DFSort. Its just another way to get the desired results. The solution Anuj provided earlier,gives the same result as well.
Below job uses DFSort's 1 byte join indicator('?') to determine which records match and which ones doesn't.
'B' - in the join indicator indicates that the key was found in F1 and F2.
'1' - in the join indicator indicates that the key was found in F1, but not in F2.
'2' - in the join indicator indicates that the key was found in F2, but not in F1.
hi, I tried the above code and it works fine for me.
In the above example, file1 contains A1 twice and file2 contains A1 only once. What should i do to get A1 only once (i.e same number of occurences as of file2) from file1?
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
It's not clear what you're asking for. You need to show a better example with the differrent variations you want to handle, and explain the complete rules for getting from input to output.
My requirement is to write the matched records from File1 and it should look like
A1 -> Should come only once, as A1 is present only once in file2
B1
C1
C1 -> should come only twice, because in file2 C1 is present only twice even though C1 is present thrice in file1.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
By those rules, shouldn't D1 be in the output? It isn't. I think file2 is the controlling file, but I don't understand exactly how. The example shown doesn't even indicate which input file the output records come from so it's very confusing. We shouldn't have to guess what the OP wants.