I am writing a COBOL program for sorting a file. In normal condition if we copy 1 file to other file then we use 2 DD stmt but in sorting we have to use 3 files . So what to do woth DD stmt ? Do we need to have one more dd stmt for sorting ? OR is there any other way to do this ?
If you are using SORT in COBOL you will have to declare 3 files.
INFILE, OUTFILE and WORKFILE.
There should be FD entries for INFILE and OUTFILE and SD entry for WORKFILE.
As you will be using 3 files the corresponding DD statements should be there in your JCL.