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

Accessing SAR thru REXX code


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

New User


Joined: 02 Jun 2008
Posts: 48
Location: India

PostPosted: Wed Jun 26, 2013 12:33 pm
Reply with quote

Hello,

I have requirement to access SAR thru REXX code.

Code:

OPT = "M;S;0;"                                           
ADDRESS ISPEXEC "SELECT PGM(ISPSTRT) SUSPEND PARM(&OPT)"


Above is the code i written for moving to SAR thru REXX code but i was not able to pass the job name thru above same code .. can anyone help me here please.. how to pass the job name.. ?

Thanks.
Back to top
View user's profile Send private message
Pandora-Box

Global Moderator


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

PostPosted: Wed Jun 26, 2013 12:54 pm
Reply with quote

Could you please eloborate on your requirement ?

Let us know what needs to be done accessing SAR
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed Jun 26, 2013 12:56 pm
Reply with quote

What must you do using REXX that you can not do any other way ?

What are you trying to do, if you give us information we might be able to help.

Do not CA supply a REXX interface - detailed in the manuals ?
Back to top
View user's profile Send private message
sant532

New User


Joined: 02 Jun 2008
Posts: 48
Location: India

PostPosted: Wed Jun 26, 2013 1:12 pm
Reply with quote

Code:

OPT = "M;S;0;ABCDEF"                                   
ADDRESS ISPEXEC "SELECT PGM(ISPSTRT) SUSPEND PARM(&OPT)"


ABCDEF -- is my job name.

When i submitt the code Control is moving new panel at SAR screen..below


Code:

CA View ALL -- Primary Selection for LSAR.SARJI003 ------------ Invalid command
Command ===> ABCDEF                                                           
                                                                               
Sysout ID     ===> *                                                           
                                                                               
Selection Criteria:                                                           
   Generation ===> *                     (*, ALL, specific (n), relative (-n),
                                          range (n:m or -n:m))                 


ABCDEF (job name) should come on Sysout ID not on Command line.

So looks like one TAB should enter before job name so that Cursor will come on Sysout ID..

My expected result is below.
Code:

CA View ALL -- Primary Selection for LSAR.SARJI003 ------------ Invalid command
Command ===>                                                                   
                                                                               
Sysout ID     ===> ABCDEF                                                     
                                                                               
Selection Criteria:                                                           
   Generation ===> *                     (*, ALL, specific (n), relative (-n),
                                          range (n:m or -n:m))                 
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed Jun 26, 2013 1:22 pm
Reply with quote

Have you tried setting the variable name used in the panel to the desired value.

But you have still not answered the question about CA providing the REXX interface already.
Back to top
View user's profile Send private message
sant532

New User


Joined: 02 Jun 2008
Posts: 48
Location: India

PostPosted: Wed Jun 26, 2013 2:24 pm
Reply with quote

Hello,

Sorry i am not aware how to do "setting the variable name used in the panel to the desired value. "
And i am not new to REXX code..

Not sure about CA even..

Thanks.
Back to top
View user's profile Send private message
sant532

New User


Joined: 02 Jun 2008
Posts: 48
Location: India

PostPosted: Wed Jun 26, 2013 2:37 pm
Reply with quote

Sorry.. I am new to REXX code ....
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Wed Jun 26, 2013 2:43 pm
Reply with quote

Actually, looking at the way the application is launched, I can't see an easy way to pass the required parm without access to the product manuals.

Maybe a batch option is available.

As we don't have the product, I can't see the manuals.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


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

PostPosted: Wed Jun 26, 2013 2:48 pm
Reply with quote

Sant532,
Try this,

Code:
OPT = "M;S;0;=S ABCDEF"                                           
ADDRESS ISPEXEC "SELECT PGM(ISPSTRT) SUSPEND PARM(&OPT)"


in the above case,
ABCDEF is the jobname/report name, you can pass wild cards as well like ABCDEF*

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

New User


Joined: 02 Jun 2008
Posts: 48
Location: India

PostPosted: Wed Jun 26, 2013 3:29 pm
Reply with quote

Hello Vasanth.S

Thanks for your post..it really helpful.now i am able to Achieve above mentioned part with the code as you said


Code:

OPT = "M;S;0;=S DSAMAP02;"                               
ADDRESS ISPEXEC "SELECT PGM(ISPSTRT) SUSPEND PARM(&OPT)"


result screen is below
Code:

 Command ===>                                                  Scroll ===> CSR 
                                                                               
 Sel  Sysout ID    Jobname  Jobid    Arch Date  Time  Loc    Lines  Pages Xcode
 ==>  DSAMAP02     *        *        *          *     *    *       *      *     
      DSAMAP02     DSAMAP02 JOB36005 05/31/2013 13:15 PTAP     833      7       
      DSAMAP02     DSAMAP02 JOB35142 05/31/2013 12:58 PTAP     834      7       
      DSAMAP02     DSAMAP02 JOB45961 05/30/2013 14:26 PTAP     834      7       
 ******************************* Bottom of Data ********************************


now i wanna try to browse the job details in SAR like below

Code:

 Command ===>                                                  Scroll ===> CSR 
                                                                               
 Sel  Sysout ID    Jobname  Jobid    Arch Date  Time  Loc    Lines  Pages Xcode
 ==>  DSAMAP02     *        *        *          *     *    *       *      *     
 S    DSAMAP02     DSAMAP02 JOB36005 05/31/2013 13:15 PTMP     833      7       
      DSAMAP02     DSAMAP02 JOB35142 05/31/2013 12:58 PTAP     834      7       


By typing 'S' infornt of Sysout ID i need to browse the job details and find a string in the job details..

Can you help on this also..please..

your help is appreciated ..it is awesome..


Thanks.
Back to top
View user's profile Send private message
vasanthz

Global Moderator


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

PostPosted: Wed Jun 26, 2013 6:52 pm
Reply with quote

Hello sant532,
I do not know of a way to accomplish what you ask for.

If you could explain your requirement in detail then we maybe able to help.
for example "i want to fetch the ICH3000I message from job log of a job called ABCDEFGH that is in SAR. It can be in batch or online" a explanation of this type would get you alternate ways of getting what you want.
Back to top
View user's profile Send private message
sant532

New User


Joined: 02 Jun 2008
Posts: 48
Location: India

PostPosted: Thu Jun 27, 2013 2:11 pm
Reply with quote

Hello Vasanth,

Thanks for your responses..

Actually my Main requirement is ...

In project monthly once i need to extract the info from SAR for set of Daily jobs for all the runs of that month and paste them into Excel sheet..

It is taking lots of efforts do manually .. So now i am thinking to do it automated thru Rexx code.. like below..

Mention all the required job names into input file.. so that my rexx code will access the required info from SAR (like Total CPU time / elapsed time...) for each of the job and write into output file so that i can down load from mainframe to Excel later..

I hope my requirement is clear for you now..

Thanks.
Back to top
View user's profile Send private message
expat

Global Moderator


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

PostPosted: Thu Jun 27, 2013 2:16 pm
Reply with quote

That information would be more accurately shown in the SMF data collected by the operating system.

The information that you require is almost certainly already available through your performance and capacity planning teams.

Perhaps a little chat with them before reinventing the wheel.
Back to top
View user's profile Send private message
thesumitk

Active User


Joined: 24 May 2013
Posts: 156
Location: INDIA

PostPosted: Sat Jun 29, 2013 2:58 pm
Reply with quote

Hello Sant532,

Would you be able to explain if you got your requirement done by this rexx program?

I am also in same need what you were trying to do .. will you mind if I ask you to share the code here for me .. I have to fetch the completion time of sevral jobs from SAR and report them each day ..

Thanks in Advance !!
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 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