It looks like it is an attempt to eliminate records where either of two variables' value is already included in the output data.
Notice how it waits to save the values until after the possible DELETE statements.
The SORT will impact which of the possible duplicates is kept since the first a value is seen the observations is kept (output) and later ones are deleted.
You could simplify the data step code.
DATA OUT.REQ_1_9_F_AMT_MATCH_V2;
SET OUT.REQ_1_9_F_AMT_MATCH;
ARRAY id_one{40000} _temporary_;
ARRAY id_two{40000} _temporary_;
if CCS_DR_IDX in id_one then delete;
if TXN_IDX in id_two then delete;
id_one{_n_}=CCS_DR_IDX;
id_two{_n_}=TXN_IDX;
run;
If there are a lot of re-used codes then you could reduce the size of the arrays by keeping your own counter as the index to the array. That way the arrays just need to be large enough to match the size of the output dataset, and not the size of the input dataset.
DATA OUT.REQ_1_9_F_AMT_MATCH_V2;
SET OUT.REQ_1_9_F_AMT_MATCH;
ARRAY id_one{40000} _temporary_;
ARRAY id_two{40000} _temporary_;
if CCS_DR_IDX in id_one then delete;
if TXN_IDX in id_two then delete;
i+1;
id_one{i}=CCS_DR_IDX;
id_two{i}=TXN_IDX;
drop i;
run;
But you could also just use hashes instead of arrays and possible increase the speed and the size of datasets it could handle.