--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.14.9/216 - Release Date: 12/29/2005
if isitup('CICSPROD') = 0 then
do "up" stuff
else
do "down" stuff
call isitup 'CICSPROD'
if result = 0 then
do "up" stuff
else
do "down" stuff
Address space found RC=0
Address space not found RC=12
/*********************************************************************/
/* REXX */
/*********************************************************************/
/* Purpose: Walk the ASVT/ASCB looking for an address space by name */
/*-------------------------------------------------------------------*/
/* Syntax: isitup asname */
/*-------------------------------------------------------------------*/
/* Parms: asname - the address space being looked for */
/*********************************************************************/
/* Change Log */
/* */
/* Author Date Reason */
/* -------- --------- ----------------------------------------- */
/* R. Zenuk Feb 2001 Initial Creation */
/* */
/*********************************************************************/
/* Accept the address space name to look for */
/*********************************************************************/
arg asname
if asname = '' then asname = userid()
/*********************************************************************/
/* Chain from the psa to the asvt and run the ascb chain */
/*********************************************************************/
psa = ptr(16)
asvt = ptr(psa+556)+512
asvtmaxu = ptr(asvt+4)
/*********************************************************************/
/* Using asvtmaxu loop through all active address spaces */
/*********************************************************************/
do i=0 to asvtmaxu - 1
ascb = stg(asvt+16+i*4,4)
/*********************************************************************/
/* Is this an active ascb? */
/*********************************************************************/
if bitand(ascb,'80000000'x) = '00000000'x then
do
ascb = c2d(ascb)
job = stg(ptr(ascb+172),8)
stc = stg(ptr(ascb+176),8)
/*********************************************************************/
/* if we find the desired address space name exit with RC=0 */
/*********************************************************************/
if stc = asname | job = asname then
exit(0)
end
end
/*********************************************************************/
/* We did not find the desired address space name */
/*********************************************************************/
exit(12)
/*********************************************************************/
/* Return a pointer */
/*********************************************************************/
ptr: return c2d(storage(d2x(arg(1)),4))
/*********************************************************************/
/* Return storage */
/*********************************************************************/
stg: return storage(d2x(arg(1)),arg(2))
Hope This Helps,
Rob
In a message dated 12/30/2005 11:51:21 AM US Mountain Standard Time,
This approach may well be overkill for your particular needs though.
As an aside, I don't know if anyone here has had the pleasure to deal with
ops/mvs, but it is one amazing peice of software. When you combine rexx,
ispf, and ops automation, you have a hell of a set of tools for playing
with a mainframe.
(I'm in no way affiliated with ca and have no vested interest in promoting
it. My opinions are my own.)
Robin Murray
Tel: (902) 453-7300 x4177
Cell: (902) 430-0637
"Daryl Wells (FWD)" <da...@FLORIDA-WEBDESIGN.COM>
Sent by: ISPF discussion list <ISP...@listserv.nd.edu>
12/30/2005 02:21 PM
Please respond to ISPF discussion list
To: ISP...@listserv.nd.edu
cc:
Subject: To check is a CICS region is up via TSO ISPF
Not tested:
/* REXX */
trace
parse upper arg region
dummy = outtrap("STEM.")
address "TSO" "STATUS" region
if index(stem.1,"EXECUTING") > 0 then say region "is up"
else say region "is down"
-teD
Me? A skeptic? I trust you have proof!
Andy (070 340 4569)
Rob Zenuk <Robz...@AOL.COM>
Sent by: ISPF discussion list <ISP...@listserv.nd.edu>
30-12-2005 20:25
Please respond to
ISPF discussion list <ISP...@listserv.nd.edu>
Subject
Re: To check is a CICS region is up via TSO ISPF
Robin Ryerse
-----Original Message-----
From: ISPF discussion list [mailto:ISP...@listserv.nd.edu] On Behalf Of
Ted MacNEIL
Sent: December 31, 2005 9:17 AM
To: ISP...@listserv.nd.edu
Subject: Re: To check is a CICS region is up via TSO ISPF
>Does anyone have a simple way of checking from ISPF is a CICS region is
De gustibus non disputandem est.