I have a requirement to check dates in two files and abend if not equal.
I have done it in two steps , Can anyone help me to do this in one step.
As I have multiple files , so lesser the steps in the jcl would be good.
You know that you will be sorting, by default, your two input files?
That's a lot of effort to just find two records to check.
Plus, I'm still saying it would be very easy to get a "false match" with your sort cards. OK, your data may preclude that, but you are doing multiple files. I don't like the thought of a bad solution replicating. It is bad, becuase when it works it works by accident rather than design, and when it doesn't it doesn't.
yes no matching record other than first one.
thanks, i got the expected result with NULLOFL and NULLOUT.
You shouldn't be developing a solution that there are no matches except on the first record. As Bill mentioned, you are using joinkeys without limiting the number of records to match. Joinkeys runs 2 subtasks and assuming you have 1 million records in each file , you are wasting a lot of resources. Also there is a chance of "false match".
Use the following DFSORT JCL which will limit the number of records the subtasks read and match. You don't need another step to check for the return code and abend. You can do it all in a single step.