Page 2 of 3

Re: Trigger a mail when abend occurs

PostPosted: Wed Oct 12, 2011 12:31 pm
by Samrita S
HI,
Can I know how to read a member in the dataset using a rexx. I am really new to rexx. So I don't know how it. please can you provide me an output for this.

Also, here I need to read a member in a dataset and process the return code of that member using rexx

Thanks,
Samrita

Re: Trigger a mail when abend occurs

PostPosted: Wed Oct 12, 2011 12:59 pm
by BillyBoyo
Samrita S wrote:Hi,

Actuallay I didn't get your point. Are you asking about the way all the jobs are getting submitted at a time. THen its like: 1 job triggers next job and thesecond job triggers the third. For that we have coded a submit step at the end of each job which get submitted depending upon the condition parameter of the previous step.


Wow. No Scheduler. Your organisation is having a lot of "low-utilisation" of your machine by not having one, but not my problem.

The simplest thing might be to put the e-mail in all the jobs. Stop one moment. Check first that you have e-mail. If you have no scheduler....

Re: Trigger a mail when abend occurs

PostPosted: Wed Oct 12, 2011 3:33 pm
by enrico-sorichetti
Yup Frank I found the option
Thanks for the guidance

since You found out how to start a new topic ( You told so )
why do You keep appending unrelated questions to existing topics,
You will lose lots of chances of getting answers

Also, here I need to read a member in a dataset and process the return code of that member using rexx

clear as mud
what in &heaven/&hell is the return code of a member of a PDS

Re: Trigger a mail when abend occurs

PostPosted: Wed Oct 12, 2011 3:38 pm
by BillyBoyo
Or is it the same topic with incorrect terminology. The "member" is the output from a completed job and the "return code" is the completion code to identify failures and send the e-mail..,

Re: Trigger a mail when abend occurs

PostPosted: Wed Oct 12, 2011 3:47 pm
by enrico-sorichetti
OK for the beginners forum, OK for the language barrier, ...
but sometimes the people asking for help should realize that they are just posting horse manure
and should not wonder about the unpleasant comments they receive

Can I know how to read a member in the dataset using a rexx. I am really new to rexx. So I don't know how it. please can you provide me an output for this.

honestly I do not see how the above statement relates to return code checking :D

Re: Trigger a mail when abend occurs

PostPosted: Wed Oct 12, 2011 4:03 pm
by BillyBoyo
"I have my JES Log or Messages in some sort of system we call "Savers". Is it possible use rexx to read the output from there and then find, within the output, the completion code for the job, so I can send an e-mail if necessary".

I think it would be quicker and more reliable to do a once-off to automate the update of the JCL to send the e-mail rather than kicking-off the next job (if I understood that bit correctly).

Or to install a scheduler and get more out of your machine and has a happy by-product potentially the ability for it to send e-mails, whatever, in failure situations.

As a work-around, prevail upon the OPS to send an e-mail?

Re: Trigger a mail when abend occurs

PostPosted: Wed Oct 12, 2011 4:48 pm
by Robert Sample
Samrita S, the bottom line:

1) unless you talk to your site support group and find out for sure that your mainframe is set up to do email (and if they don't have a job scheduler, it is quite possible that SMTP is not available), you do not even know if email is possible from your mainframe.

2) $AVRS is a vendor package. The file format is proprietary material to the vendor. You are not going to be able to use REXX -- or any other language -- to read the file and do what you want because the vendor won't tell you how the file is laid out so you have no idea where the data you need is located.

If you are unable -- or unwilling -- to use your site support group (the people who know your system better than anyone on this forum), it is most likely you are going to have a difficult (but not long) career in IT. Based on what you've posted so far, the only way to achieve your goal will be to modify the production jobs to include a conditionally executed step.

Re: Trigger a mail when abend occurs

PostPosted: Thu Oct 13, 2011 12:57 pm
by expat
Samrita S wrote:Can I know how to read a member in the dataset using a rexx. I am really new to rexx. So I don't know how it. please can you provide me an output for this.
Also, here I need to read a member in a dataset and process the return code of that member using rexx

Excuse me, but when did a HELP forum become a forum for providing training that your company should give you before allocating you tasks :evil:

Re: Trigger a mail when abend occurs

PostPosted: Thu Oct 13, 2011 6:57 pm
by Maxime B
As everybody said before you, you don't have to change all the jobs to add a step for a return code validation. Schedulers can be used to automatically raise a flag (i.e. raise a alarm, call the support team, send an email, etc.) when an abend occurs. That is why you should contact the scheduling team and see with them what can be done.¸

Edit: oops, I missed the second page before posting. =/

Re: Trigger a mail when abend occurs

PostPosted: Thu Oct 13, 2011 7:23 pm
by NicC
If whatever submits the next job is something like a rexx program which takes the next jobname as an argument so that you only have the one program catering for all your submits then you should be able to amend it to work along the lines of:
If job OK
Then submit nextjob
Else do email stuff

I am not sure how you would go about checking the job OK bit - but it probably means reading various manuals - possibly chasing a control block or two.
No JCL changes just one program to be changed - well, practically re-written.
But it depends on how you do this next job submission