Issue in sending an Email using IEBGENR



Post anything related to mainframes (IBM & UNISYS) if not fit in any of the above categories

Issue in sending an Email using IEBGENR

Postby PA2405 » Tue Nov 11, 2014 4:54 pm

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 !!!
PA2405
 
Posts: 9
Joined: Mon Oct 27, 2014 9:12 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Issue in sending an Email using IEBGENR

Postby Robert Sample » Tue Nov 11, 2014 5:20 pm

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).
Robert Sample
Global moderator
 
Posts: 3720
Joined: Sat Dec 19, 2009 8:32 pm
Location: Dubuque, Iowa, USA
Has thanked: 1 time
Been thanked: 279 times

Re: Issue in sending an Email using IEBGENR

Postby PA2405 » Tue Nov 11, 2014 8:48 pm

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,
PA2405
 
Posts: 9
Joined: Mon Oct 27, 2014 9:12 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Issue in sending an Email using IEBGENR

Postby prino » Tue Nov 11, 2014 9:29 pm

The '1' is a ASA carriage control character, and you can see them in Browse if you give the command "display cc"
Robert AH Prins
robert.ah.prins @ the.17+Gb.Google thingy

These users thanked the author prino for the post (total 2):
BillyBoyo (Wed Nov 12, 2014 9:52 pm) • Terry Heinze (Wed Nov 12, 2014 8:27 pm)
User avatar
prino
 
Posts: 641
Joined: Wed Mar 11, 2009 12:22 am
Location: Vilnius, Lithuania
Has thanked: 3 times
Been thanked: 29 times

Re: Issue in sending an Email using IEBGENR

Postby BillyBoyo » Tue Nov 11, 2014 11:03 pm

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.
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 265 times

Re: Issue in sending an Email using IEBGENR

Postby PA2405 » Wed Nov 12, 2014 7:54 pm

Hi, Remove CC worked.
Thank you very much !!!
PA2405
 
Posts: 9
Joined: Mon Oct 27, 2014 9:12 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Issue in sending an Email using IEBGENR

Postby Terry Heinze » Wed Nov 12, 2014 8:29 pm

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.
.... Terry
Terry Heinze
 
Posts: 239
Joined: Wed Dec 04, 2013 11:08 pm
Location: Richfield, MN, USA
Has thanked: 12 times
Been thanked: 11 times


Return to All other Mainframe Topics

 


  • Related topics
    Replies
    Views
    Last post