I have two steps in my jcl One is sort and one is sending email job as attachement.
In my first step I am filtering some records from SORTIN file and in SORTOUT I am reformatting the record and adding the HEADER to it using OUTFIL.
In second step I am sending this file, as an attachment, in email. Email and attachment are getting sent successfully. But the attachement which I am receving has the first record of the file is appended to the header.
In SORTOUT File header and record are correctly created, only when I send an email in attachment it is appending.
If I remove the header, then it works fine. But I need header as part of my requirement.
Can anyone suggest what can I do to solve this issue??