For an example i have used only one output file below,
This isn't very helpful. Show a better example of your input file and more than one output file.
It's not clear if you have one input file (with the header and data records) or two input files (one with the header and another with the data records).
You need to make that clear.
How are you splitting the files?
DATASORT operates on input files that already have a HEADER and/or TRAILER record. It doesn't really look like that's your situation, so you need to describe more clearly what your situation is - that is, what files you're using for the header, input and output and what they contain.
Also, it doesn't look like you have a trailer record, so why are you using TRAILER?
Basically, you need to explain more clearly what exactly it is you're trying to do.
Joined: 22 Jan 2008 Posts: 117 Location: Liberty city
I apologise for the shortly explained. The required detail as follows
Basically my input file is an extract file. Using that file i am splitting up the output files to an of 28 no of files. After splitting up the files i want to insert an HEADER which is present in another single file which also has the same LRECL of Splitted output files.
I am splitting up the files using below,
And i would like to add the header and sort the records in all the 28 splitted output files by adding the new step below the split step.
As you said, i havent used TRAILER in the file. I will remove it.