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

how to plan and use sysrexx?


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

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Thu Jun 17, 2010 2:03 pm
Reply with quote

'WTO' and 'WTOR' can write msg to syslog,they are netview commands.
Back to top
View user's profile Send private message
PeterHolland

Global Moderator


Joined: 27 Oct 2009
Posts: 2481
Location: Netherlands, Amstelveen

PostPosted: Thu Jun 17, 2010 2:32 pm
Reply with quote

Quote:

my requirement is that a simply pgm can write some self-defined messages which are not highlight to syslog and master console.

Routing and descriptor codes will take care of that.

Quote:

to syslog and master console.


define your message in MPF to be trapped with AUTO(YES)

Quote:

Then some concernful jobs can invoke this pgm to give alarms once abends occured


Your netview automation table entry for this message could trigger
a simple rexx that can submit your concernful jobs
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Thu Jun 17, 2010 9:00 pm
Reply with quote

Hi,PeterHolland

I'm afraid you are misunderstanding my requirements.

I need the pgm to monitor the concernful jobs.

if the jobs abend,the pgm will write a self-defined msg to syslog.
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Thu Jun 17, 2010 11:25 pm
Reply with quote

Can you elaborate on what you mean by 'monitor'?

And what problem prevents you from using system rexx? I thought you would issue a "D A,L" command and then to examine the results to make sure that your STC's are listed there.

An alternate approach is to use SDSF DA command and make sure your STCs are there.
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Fri Jun 18, 2010 7:12 am
Reply with quote

Hello Pedro

The jobs I have to monitor run very frequently,about 10 times a day.It is ok to check the jobs' status by SDSF,but laborious.

What I need is an automatic process which can monitor the jobs and will be triggered if error occured.

after self-defined msg written to syslog, netview MPF will trap this msg,like PeterHolland says.
Back to top
View user's profile Send private message
enrico-sorichetti

Superior Member


Joined: 14 Mar 2007
Posts: 10873
Location: italy

PostPosted: Fri Jun 18, 2010 7:56 am
Reply with quote

Quote:
Then some concernful jobs can invoke this pgm to give alarms once abends occured.

no need to reinvent the wheel

this task can be better done using Your scheduler facilities ...
for abends or chosen return codes it is perfectly capable of

sending alarms directly or
scheduling a job to send alarms

no need to have an initiator sitting there doing nothing ,
or have the scheduler schedule at interval a job todo the checking

anyway if You are unwilling to use Your scheduler facilities
the most reasonable tool would be a batch execution of SDSF

a quick and dirty search for ibm redbooks sdsf rexx will take You

to
www.redbooks.ibm.com/abstracts/sg247419.html

and a click on the additional material link
to
www.redbooks.ibm.com/redbooks/SG247419/

were You can download the sources of the samples
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Sat Jun 19, 2010 9:09 pm
Reply with quote

hi,enrico-sorichetti

thanks for ur constructive reminder.

it is a good method to check concernful jobs' status by sdsf rexx.

but the customer emphasize to write msg to syslog.sometimes the customer not only controls project result,but steps and detail.
Back to top
View user's profile Send private message
Steve Coalbran

New User


Joined: 01 Feb 2007
Posts: 89
Location: Stockholm, Sweden

PostPosted: Sun Jun 20, 2010 5:41 pm
Reply with quote

dick scherrer wrote:
Hello,

Have you asked the system support people?

Will this command find the routine if you run it in your online tso session? It might not work properly, but if it runs and fails, you know it is "there".

I haven't touched sysrexx at all before, but I tried this on my DEMO machine and get the same error message.
I guess this means that it requires some other installation on TSO.
I do have the SYS1.PARMLIB(AXR00) member I see.
Did anyone have this running successfully on TSO? icon_confused.gif
Back to top
View user's profile Send private message
Pedro

Global Moderator


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

PostPosted: Sun Jun 20, 2010 8:49 pm
Reply with quote

It does not run on your TSO session. It runs in its own address space. If you want it to do TSO stuff, it will be run differently than without.
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Tue Jun 22, 2010 12:12 pm
Reply with quote

The further research:

I found system rexx script can be invoked as a console command by rexx.

As mentioned above,the command 'rexx1ahello' can be invoked in rexx

/*REXX*/
"CONSPROF SOLDISP(NO) SOLNUM(8000) UNSOLDISPLAY(NO)"
'CONSOLE ACTIVATE NAME(TBSM01)'
CMD ='REXX1AHELLO'
MSG = "TBSM"
"CONSOLE SYSCMD("CMD") CART("MSG")"
RTMSG.0 = 0
GETCODE = GETMSG('RTMSG.','SOL',,,20)
IF GETCODE = 0 & RTMSG.0 <> 0 THEN
DO I = 1 TO RTMSG.0
SAY RTMSG.I
END
'CONSOLE DEACTIVATE'
EXIT

Then batch job excute this rexx,the output will write to syslog.

it is successfully in my work environment,but failed in my hercules.

the error msg is 'IEE345I MODIFY AUTHORITY INVALID, FAILED BY MVS'

My userid has the console and opercmds cmd authorization.and cmd REXX1AHELLO excuted successfully in sdsf

I don't know what the reason is ....
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Tue Jun 22, 2010 3:42 pm
Reply with quote

We had a similar problem on a test system we fixed it with the following
RDEFINE OPERCMDS MVS.MCSOPER.* UACC(NONE)
PERMIT MVS.MCSOPER.* CLASS(OPERCMDS) ID(ANYNAME) ACCESS(READ)
Apparently our user was authorised but the commmand did not run in our address space but in the Console address space or so I was led to believe.
Back to top
View user's profile Send private message
Victor Niu

New User


Joined: 11 Mar 2010
Posts: 59
Location: China,Shanghai

PostPosted: Thu Jun 24, 2010 10:25 am
Reply with quote

have a try,the same problem

4 profiles in class opercmds

MVS.DISPLAY.* (G)
MVS.MCSOPER.* (G)
MVS.MODIFY.* (G)
** (G)

my id has alter authorization for the 4 profiles.
Back to top
View user's profile Send private message
nevilh

Active User


Joined: 01 Sep 2006
Posts: 262

PostPosted: Thu Jun 24, 2010 4:09 pm
Reply with quote

If I read the docs correctly (no gurantee) the command will not be issued from your address space so it makes no difference that you are authorised . Can you change the UACC to read or authorise your consoleid for read access on the profiles. If this does not work I have no more ideas....you will have to find someone who understands RACF
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 Goto page 1, 2  Next

 


Similar Topics
Topic Forum Replies
No new posts current batch plan DB2 3
No new posts Log an Plan name/id or Job Id using D... DB2 1
No new posts Usage/Utiliy of Plan in DB2 DB2 4
No new posts How do I define a DB2 plan for a web ... CICS 5
No new posts Finding the plan when code compiled u... DB2 2
Search our Forums:

Back to Top