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
 

 

Accessing SAR thru REXX code

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> CLIST & REXX
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    Post subject: Accessing SAR thru REXX code
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

Moderator


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

PostPosted: Wed Jun 26, 2013 12:54 pm    Post subject:
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: 8593
Location: Back in jolly old England

PostPosted: Wed Jun 26, 2013 12:56 pm    Post subject:
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    Post subject: Reply to: Accessing SAR thru REXX code
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: 8593
Location: Back in jolly old England

PostPosted: Wed Jun 26, 2013 1:22 pm    Post subject:
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    Post subject: Reply to: Accessing SAR thru REXX code
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    Post subject: Reply to: Accessing SAR thru REXX code
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: 8593
Location: Back in jolly old England

PostPosted: Wed Jun 26, 2013 2:43 pm    Post subject:
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: 1445
Location: Azeroth

PostPosted: Wed Jun 26, 2013 2:48 pm    Post subject:
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    Post subject: Reply to: Accessing SAR thru REXX code
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: 1445
Location: Azeroth

PostPosted: Wed Jun 26, 2013 6:52 pm    Post subject:
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    Post subject: Reply to: Accessing SAR thru REXX code
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: 8593
Location: Back in jolly old England

PostPosted: Thu Jun 27, 2013 2:16 pm    Post subject:
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: 129
Location: INDIA

PostPosted: Sat Jun 29, 2013 2:58 pm    Post subject:
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    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
No new posts PL/I code tuning/Performance improvement Virendra Shambharkar PL/I & Assembler 4 Mon Dec 05, 2016 11:57 am
No new posts What is the code in CLIST to enable t... jackzhang75 CLIST & REXX 1 Fri Dec 02, 2016 3:02 am
No new posts IDEAL - Code Retrieval yugendran CA Products 0 Fri Nov 25, 2016 3:27 pm
No new posts What is the command to check MODE of ... rohanthengal CLIST & REXX 6 Fri Nov 18, 2016 1:48 pm
No new posts Access SQLCA fields inside a stored p... gangapd DB2 4 Thu Oct 27, 2016 10:20 am


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