pearl wrote:[... Yes. Is it wrong to do so?
Actually, yes. You specify DISP=(NEW,CATLG) on your SORTOUT DD statement. What happens depends on whether the output data set is SMS managed or not.
If the output data set is SMS managed, the system will want to catalog the data set immediately. It can't do this because it has the same name as another data set, so the allocation will be aborted and the step won't run.
Now if the data set is not SMS managed, the data set will be allocated but not cataloged - yet - and the step will run. When the step completes, the system will attempt to catalog the data set. It can't because the name already exists in the catalog. The system will leave the uncataloged data set where it is, write a diagnostic message and continue.
Which action is the "best" action is debatable. The not SMS approach permits the step to run, but you have this uncataloged data set that must be manually corrected. Sadly, the need to correct the situation is frequently not done. The SMS approach does not leave an orphaned data set behind, but the job must be corrected before it can be run. Your call, not mine.