Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

To check is a CICS region is up via TSO ISPF

319 views
Skip to first unread message

Daryl Wells , FWD

unread,
Dec 30, 2005, 1:25:14 PM12/30/05
to
Does anyone have a simple way of checking from ISPF is a CICS region is up?

Gary Green

unread,
Dec 30, 2005, 1:40:04 PM12/30/05
to
The easiest way would be to use SDSF. If not that, then a simple Status
command of the CICS region job name...


--
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

Daryl Wells , FWD

unread,
Dec 30, 2005, 1:53:54 PM12/30/05
to
I stated the question wrong. I am executing a REXX exec that must check to
see if a CICS region is up. If the region is up, then the REXX will submit
a job to start a transaction in that region.

Rob Zenuk

unread,
Dec 30, 2005, 2:30:05 PM12/30/05
to
Here is a REXX EXEC called ISITUP that will look for a specific address
space. You can use it as a function or a call.

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,

Robin Murray

unread,
Dec 30, 2005, 2:59:37 PM12/30/05
to
If you have ca's ops/mvs automation package (or a reasonable facsimile),
you could easily set a global variable when the "control is being given to
cics" message is issued, and set it back when the termination message is
issued. Your ops/rexx could simply query the ops variable and submit the
job based on that. This has the added advantage of only submitting the job
when the region is actually initialized, not when it merely has an address
space.

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

Ted MacNEIL

unread,
Dec 31, 2005, 9:23:19 AM12/31/05
to
>Does anyone have a simple way of checking from ISPF is a CICS region is up?


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 Corpes

unread,
Jan 2, 2006, 7:30:00 AM1/2/06
to
Although i prefer Rob's solution ,, and will now start using it (Thanks
Rob), currently, i check for enqueus on the CICS load libraries using the
QUERYENQ ISPF routine to determine if a region is active.

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>


To
ISP...@listserv.nd.edu
cc

Subject
Re: To check is a CICS region is up via TSO ISPF

Ryerse, Robin

unread,
Jan 3, 2006, 8:33:10 AM1/3/06
to
Ted: I would not promote use of Non-SAA functions. The preferred
function is WORDPOS for this situation.


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

Ted MacNEIL

unread,
Jan 3, 2006, 10:42:31 AM1/3/06
to
>Ted: I would not promote use of Non-SAA
functions. The preferred
>function is WORDPOS for this situation.

De gustibus non disputandem est.

0 new messages