Created on May 15, 2021, 5:34 a.m. - by Jack, Peter
I want to add header detail in the output file using SORT utility
You need to give us more information like lrecl, recfm of the input and output file.
Anyhow, what i can suggest you is, instead of creating new sort step to add header detail. you can modify the existing COBOL program to add header details on the output file.
Thanks Srinivasan. This file is not created by cobol program. we are receiving this file from the upstream distributed application via NDM transmission.
Jack, You can add a Header by using the HEADER1 command in the SORT utility
see this example code,
//STEP EXEC PGM=SORT
//SORTIN DD DSN=input file
//SORTOUT DD DSN=output file
//SYSOUT DD SYSOUT=*
//SYSIN DD *