IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Mailing return code as part of e-mail


IBM Mainframe Forums -> JCL & VSAM
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
ssowmya

New User


Joined: 10 Oct 2006
Posts: 40

PostPosted: Mon Aug 27, 2007 3:15 pm
Reply with quote

Hi

My requirement is to include a step in JCL which will mail the return code of the previous step. Could any one please let me know if this is possible...Can the return code from previous step be mailed in the next step?

Please do help...

Thanks
Sowmya
Back to top
View user's profile Send private message
shreevamsi

Active User


Joined: 23 Feb 2006
Posts: 305
Location: Hyderabad,India

PostPosted: Mon Aug 27, 2007 3:26 pm
Reply with quote

hi,

If there are limited return codes(say 2) expected...it wasn't a bad idea to repeat the Email step twice and based on the return code, you can execute the step.

~Vamsi
Back to top
View user's profile Send private message
ssowmya

New User


Joined: 10 Oct 2006
Posts: 40

PostPosted: Mon Aug 27, 2007 4:00 pm
Reply with quote

I need to mail all cases except when the return code is zero.
Back to top
View user's profile Send private message
stodolas

Active Member


Joined: 13 Jun 2007
Posts: 632
Location: Wisconsin

PostPosted: Mon Aug 27, 2007 5:29 pm
Reply with quote

If you want to mail the actual return code you will need to put it out to a file or something. Most emailers use instream data for the message and this can't be over ridden with parms.
Back to top
View user's profile Send private message
superk

Global Moderator


Joined: 26 Apr 2004
Posts: 4652
Location: Raleigh, NC, USA

PostPosted: Mon Aug 27, 2007 5:38 pm
Reply with quote

Sowmya, do you know REXX? If so, you can search the forums for an exec named "GETRC" that will allow you to capture the return-code for each previous step of the job from the job's JSCB control blocks. You can then modify this exec as needed to generate the email output as needed for your site.
Back to top
View user's profile Send private message
ssowmya

New User


Joined: 10 Oct 2006
Posts: 40

PostPosted: Tue Aug 28, 2007 8:43 am
Reply with quote

Hi

Thank U very much...It worked!!!

Regards
Sowmya
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> JCL & VSAM

 


Similar Topics
Topic Forum Replies
No new posts run rexx code with jcl CLIST & REXX 15
No new posts Compile rexx code with jcl CLIST & REXX 6
No new posts Return codes-Normal & Abnormal te... JCL & VSAM 7
No new posts REXX code to expand copybook in a cob... CLIST & REXX 2
No new posts VSAM return code 23 - for a Random read COBOL Programming 4
Search our Forums:

Back to Top