I have 2 files. For the specific condition match in 2nd file, I need to skip the relevant primary key details from file 1 as well in the output file but all records besides skipped records from file 1 must be present in output file.
I have tried Include and Omit but they are not working properly.
In file 2, we need to match 2 conditions and based on that records must be skipped from file 1.
Joined: 15 Aug 2015 Posts: 1334 Location: Bamberg, Germany
You have to show attempts to achieve the desired results, and also error messages you might have got. Also we would like to see input and desired output. Do not forget to use code tags (see button above the reply box) when presenting any code/data here.
Joined: 08 May 2006 Posts: 1205 Location: Dublin, Ireland
Quote:
I have tried Include and Omit but they are not working properly.
They are working properly, just not giving you the desired result.
Have you tried using JOINKEYS ? What are the conditions for omitting records from dataset 1 ? Can you give a sample of inputs and expected output (using code tags)?
Here, for each account number, for position no 8, if we have 'C0' and '3' or '4' at 10th position, we don't need the relevant record from file 1 but all records beside those from File 1.
Joined: 15 Aug 2015 Posts: 1334 Location: Bamberg, Germany
Repeat from the beginning. Post (using code tags) what your input and desired output is. If you expect help, provide proper input. That is simple. All of us are volunteers.
Please, delete stupid attachment from the first post.
It is impossible to read the whole topic, because of this!
I am not able to delete the attachment.
I am attaching the scenario here again for reference.
-------------------------------------------------------------------------------------------------------------------------------------------------
I have 2 files. For the specific condition match in 2nd file, I need to skip the relevant primary key details from file 1 as well in the output file but all records besides skipped records from file 1 must be present in output file.
I have tried Include and Omit but they are not working properly.
In file 2, we need to match 2 conditions and based on that records must be skipped from file 1.
Below is the logic i have used -
I even tried the Include instead of Omit but its not giving the desired result.
Here, for each account number, for position no 8, if we have 'C0' and '3' or '4' at 10th position, we don't need the relevant record from file 1 but all records beside those from File 1.
I did not get where to include this below statement,
INCLUDE COND=(8,2,CH,EQ,C'C0',AND,10,1,SS,EQ,C'34') ?
I tried it this way but the output file is then empty,
//SYSIN DD *
OPTION COPY
JOINKEYS F1=F1,FIELDS=(1,7,A)
JOINKEYS F2=F2,FIELDS=(1,7,A)
INCLUDE COND=(8,2,CH,EQ,C'C0',AND,10,1,SS,EQ,C'34')
JOIN UNPAIRED,F1,ONLY
REFORMAT FIELDS=(F1:1,459),FILL=C''