Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

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

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: How to pass a value at runtime from JCL to REXX program?
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: 8593
Location: Back in jolly old England

PostPosted: Fri Sep 05, 2008 7:12 pm    Post subject:
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

Senior Member


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

PostPosted: Fri Sep 05, 2008 10:46 pm    Post subject: Reply to: How to pass a value at runtime from JCL to REXX pr
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    Post subject: Re: Reply to: How to pass a value at runtime from JCL to REX
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: 8593
Location: Back in jolly old England

PostPosted: Sat Sep 06, 2008 2:59 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> CLIST & REXX All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
This topic is locked: you cannot edit posts or make replies. Need help on If condition continuatio... ashok_uddaraju CLIST & REXX 4 Fri May 19, 2017 8:55 am
No new posts IMS T-Pipe queue counts in a COBOL Pr... Siva NKK Kothamasu IMS DB/DC 0 Tue May 09, 2017 6:31 pm
No new posts Running an REXX EXEC implicitly sho7hills CLIST & REXX 3 Thu Apr 20, 2017 8:14 am
No new posts Need help in REXX CALL program Raje1002 CLIST & REXX 5 Wed Apr 19, 2017 11:18 pm
No new posts REXX cdoe to purge a JOB from spool a... Sulabh Agrawal CLIST & REXX 11 Thu Mar 09, 2017 11:36 am


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us