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
 

 

Rexx Interface with SAr

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CA Products
View previous topic :: :: View next topic  
Author Message
thesumitk

Active User


Joined: 24 May 2013
Posts: 129
Location: INDIA

PostPosted: Sat Jun 29, 2013 4:59 pm    Post subject: Rexx Interface with SAr
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

Moderator


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

PostPosted: Sat Jun 29, 2013 5:14 pm    Post subject:
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: 129
Location: INDIA

PostPosted: Mon Jul 01, 2013 12:18 pm    Post subject:
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: 1445
Location: Azeroth

PostPosted: Mon Jul 01, 2013 2:40 pm    Post subject:
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 : http://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: 129
Location: INDIA

PostPosted: Mon Jul 01, 2013 2:59 pm    Post subject:
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: 1445
Location: Azeroth

PostPosted: Mon Jul 01, 2013 4:46 pm    Post subject:
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: 129
Location: INDIA

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

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

I was trying to access it at ftp://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: 7914
Location: Bellevue, IA

PostPosted: Mon Jul 01, 2013 6:39 pm    Post subject:
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: 1445
Location: Azeroth

PostPosted: Mon Jul 01, 2013 6:49 pm    Post subject:
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
https://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    IBMMAINFRAMES.com Support Forums -> CA Products All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
This topic is locked: you cannot edit posts or make replies. Rexx to create GDG by scanning JJ result krish.deepu CLIST & REXX 5 Tue Oct 25, 2016 5:32 pm
No new posts Replace repeated JCL with looping REXX prino CLIST & REXX 3 Thu Oct 13, 2016 5:30 am
This topic is locked: you cannot edit posts or make replies. Need to code a Rexx PGM sundaram.naveen CLIST & REXX 18 Thu Oct 06, 2016 6:45 pm
No new posts Interface from Mainframe to Confluenc... hblun CLIST & REXX 4 Tue Sep 20, 2016 5:47 pm


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