Page 1 of 1

Issue in sending an Email using IEBGENR

PostPosted: Tue Nov 11, 2014 4:54 pm
by PA2405
Hi,
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??

Thanks !!!

Re: Issue in sending an Email using IEBGENR

PostPosted: Tue Nov 11, 2014 5:20 pm
by Robert Sample
Experiment with various options. Your problem could be a missing blank line. However, based upon what you have posted nobody can say for sure.

And note that IEBGENER is a program to copy data; it does not have anything to do with emails (other than allowing you to copy your email text to SMTP).

Re: Issue in sending an Email using IEBGENR

PostPosted: Tue Nov 11, 2014 8:48 pm
by PA2405
Hi, I found the issue.
Issue is with the SORTOUT generated. In the first byte of the file it is giving '1' (I think that is too identify header). This '1' can only see in the edit option, in Browse it is not visible. I think because SORT automatically inserts it. This first byte is somewhat internal to machine i guess. So in my SORTOUT file both first two records have this '1' (for other records its value is spaces, and when I remove '1' from the second record manually I got the expected results)and because of that only I think those are getting appended.

Now If anybody know How can I avoid this '1' in the SORT job for the second record??

Thanks,

Re: Issue in sending an Email using IEBGENR

PostPosted: Tue Nov 11, 2014 9:29 pm
by prino
The '1' is a ASA carriage control character, and you can see them in Browse if you give the command "display cc"

Re: Issue in sending an Email using IEBGENR

PostPosted: Tue Nov 11, 2014 11:03 pm
by BillyBoyo
On your OUTFIL you need to specify REMOVECC if you don't want the Carriage Control characters. HEADER1/2/3 and TRAILER1/2/3 are "reporting functions" so naturally cause the production of carriage control characters unless you tell it otherwise.

Re: Issue in sending an Email using IEBGENR

PostPosted: Wed Nov 12, 2014 7:54 pm
by PA2405
Hi, Remove CC worked.
Thank you very much !!!

Re: Issue in sending an Email using IEBGENR

PostPosted: Wed Nov 12, 2014 8:29 pm
by Terry Heinze
prino wrote:... you can see them in Browse if you give the command "display cc"

Thanks for that info -- never knew about "display cc" and the other options of display.