The example I tried to go through provided the sort workfile as:
ENVIRONMENT DIVISION.
SELECT WORKFILE ASSIGN TO WORK.TMP.
SELECT WORKFILE ASSIGN TO WORK.TMP.
But in case of mainframe where does WORK.TMP reside? I mean we generally use a JCL to call files for input/output. But how can we call WORK.TMP if it is not to be called using a DD statement in the run-time JCL?