Adding a new Sort workfile in z/OS COBOL sort program
Posted: Sat Jan 28, 2012 3:02 pm
I'm a new mainframe developer and wish to create a sort program in COBOL. But unfortunately I don't have a clue of how to add a sorting workfile to the COBOL code in the environment division. Kindly help me find a solution to the same.
The example I tried to go through provided the sort workfile as:
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?
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?