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

How to pass a value at runtime from JCL to REXX program?


IBM Mainframe Forums -> CLIST & REXX
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
Siva219734

New User


Joined: 27 Jul 2008
Posts: 5
Location: Mumbai

PostPosted: Fri Sep 05, 2008 7:06 pm
Reply with quote

Hi All,

I am in process of automating the job failure notifications through an email when a job fails, Based on the condition given at that step, like ( If STEPNAME.RC >0) Then it will execute a REXX program which will extract the details of the following logs from the JES2 SPOOL.

1. JESMSG
2. JESYSMSG
3. STEPNAME.SYSPRINT

Here, I want to pass the above info(JESMSG, JESYSMSG, STEPNAME.SYSPRINT etc.. ) from the JCL to the REXX program at run time. Then the REXX program will extract the data from the above logs and store it in a temporary dataset. Then this dataset is used to send an email to us.

request your help on how to pass the above info(JESMSG, JESYSMSG, STEPNAME.SYSPRINT etc.. ) to REXX program as a input.

Thanks in anticipation.

Regards,
Siva Kumar Reddy.
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Fri Sep 05, 2008 7:12 pm
Reply with quote

I would look through the JESMSGLG output to get the stepname that failed. Then use the REXX routine to go to the appropriate sysout segment once the failing step has been identified.
Back to top
View user's profile Send private message
Pedro

Global Moderator


Joined: 01 Sep 2006
Posts: 2547
Location: Silicon Valley

PostPosted: Fri Sep 05, 2008 10:46 pm
Reply with quote

Quote:
I want to pass the above info(JESMSG, JESYSMSG, STEPNAME.SYSPRINT etc.. ) from the JCL to the REXX program at run time.


I do not think you want to pass the info. The REXX program should figure out the jobname and jobnumber then use SDSF to get the information.
Back to top
View user's profile Send private message
Siva219734

New User


Joined: 27 Jul 2008
Posts: 5
Location: Mumbai

PostPosted: Sat Sep 06, 2008 11:20 am
Reply with quote

Pedro wrote:
Quote:
I want to pass the above info(JESMSG, JESYSMSG, STEPNAME.SYSPRINT etc.. ) from the JCL to the REXX program at run time.


I do not think you want to pass the info. The REXX program should figure out the jobname and jobnumber then use SDSF to get the information.


Hi,

Thanks for you reply.

Can you please provide me the REXX program which extracts the SDSF details for a job when it abends.. like the SYSPRINT of that step where it failed.

Many Thanks,
Siva Kumar Reddy
Back to top
View user's profile Send private message
expat

Global Moderator


Joined: 14 Mar 2007
Posts: 8797
Location: Welsh Wales

PostPosted: Sat Sep 06, 2008 2:59 pm
Reply with quote

This appears to be a popular topic, and has been discussed many times with examples.

Please feel free to use the search button at the yop of the page.
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 -> CLIST & REXX

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
No new posts Using API Gateway from CICS program CICS 0
No new posts Running REXX through JOB CLIST & REXX 13
No new posts Error to read log with rexx CLIST & REXX 11
No new posts isfline didnt work in rexx at z/OS ve... CLIST & REXX 7
Search our Forums:

Back to Top