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

Rexx Interface with SAr


IBM Mainframe Forums -> CA Products
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
thesumitk

Active User


Joined: 24 May 2013
Posts: 156
Location: INDIA

PostPosted: Sat Jun 29, 2013 4:59 pm
Reply with quote

Hi ,

I am in process to automate one manual process which we do each day , We takes a rport from Sar (run time of few jobs) and report them in to an email.. I am trying to run a Rexx code whihc would do this automatically ..
I see one post from SANT532 , he mentioned the below code can invoke sar
Code:
OPT = "M;SAR;=S XXXXXXXX"                                     
ADDRESS ISPEXEC "SELECT PGM(ISPSTRT) SUSPEND PARM(&OPT)"     
ADDRESS TSO                                                   

This code is working fine and invoking the sar screen but then it needs a PF3 to come back to rexx control again...
I need to take the run time of the jobs and I will chek in Rexx if the run time is for today's run or not, there after send an email with details of all the jobs.


Please help me getting the values from SAR panel..
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


Joined: 07 Sep 2006
Posts: 1592
Location: Andromeda Galaxy

PostPosted: Sat Jun 29, 2013 5:14 pm
Reply with quote

Why not call SAR through Jcl?
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 156
Location: INDIA

PostPosted: Mon Jul 01, 2013 12:18 pm
Reply with quote

I dont know if I Can get a report for the current day job by JCL ,, I need to provide the genrations or JOBID in JCL which will call SAR ..

I am not sure if there is a way to achieve this thru JCL?

My Requirement is below

I need to check jobs A,B,C,D,E,F have run today or not .. OR.. I take the data from SAR for the current sysout of any job and check in my rexx program for verification...

PLease suggest
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Mon Jul 01, 2013 2:40 pm
Reply with quote

thesumitk,

I once had a same requirement and was not having access to SMF. so I followed the below steps.

1. extract job log from SAR using SARBCH utility. example : www.ibmmainframes.com/viewtopic.php?t=10356&highlight=sarbch

2. Process the extracted job log using REXX or SAS or any other language.

3. We had RACF, so got the job start date from ICH70001I message in joblog. Job start time from $HASP373 message, and job end time from $HASP395.

4. Use the start/end date and time do your processing.

Hope it helps.
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 156
Location: INDIA

PostPosted: Mon Jul 01, 2013 2:59 pm
Reply with quote

Hi Vasanthz

Thanks for the information!!!

Would you be able to tell me If I can extract only the current record from SAR for My job

For Example .. If job A runs daily at 10:00 Am and I am runing my SAR extract today after completion of job A .. Can I tell my extract job to Fetch only the record for today's run of JOB A?

Thanks in Advance !!
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Mon Jul 01, 2013 4:46 pm
Reply with quote

Hello,
the /PRINT or /LOAD by default would select the most recent run of the job, "that is archived in SAR".

If your job runs at 10:00 AM and if SAR has archived that job in its database then by default GEN=-0 and it chooses the most recent entry for that job.

For some reason if your daily job does not run at 10:00 AM and you to submit SARBCH at say 10:30 AM then SARBCH would get you previous day's run of the job.

If you want conditional processing based on archive date, look at the output returned by /LIST command, and then build your /LOAD or /PRINT statements from /LIST output.

For more info on SARBCH look at Ca-View reference guide
Chapter 10: Batch Processing.
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 156
Location: INDIA

PostPosted: Mon Jul 01, 2013 6:32 pm
Reply with quote

Thanks
Can you please share CA-View refrence guide or its link

I was trying to access it at ftp.ca.com/pub/view/manuals/VIE20OS7.pdf but not able to due to access issue




Thanks
Back to top
View user's profile Send private message
Robert Sample

Global Moderator


Joined: 06 Jun 2008
Posts: 8697
Location: Dubuque, Iowa, USA

PostPosted: Mon Jul 01, 2013 6:39 pm
Reply with quote

If your site is authorized to use CA-View, then you have access to the manauls -- via hard copy, or via internal web site, or via logging into the CA support web site. As these manuals are copyright by CA, nobody on this forum can provide you the manuals nor a link to them.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


Joined: 28 Aug 2007
Posts: 1742
Location: Tirupur, India

PostPosted: Mon Jul 01, 2013 6:49 pm
Reply with quote

Hello,
As Robert said, we cannot share the documentation as it is copyrighted.

Its no big deal to download the manual yourself from
support.ca.com
Go there, register for a free user ID and access the manuals to Ca-View.
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 -> CA Products

 


Similar Topics
Topic Forum Replies
No new posts Compile Several JCL JOB Through one r... CLIST & REXX 4
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
No new posts run rexx code with jcl CLIST & REXX 15
Search our Forums:

Back to Top