Unfortunately, I lost contact with Salvador after his email address changed. I have the code and am willing to share it. Let me know OFF-LIST if you want a copy.
Hope This Helps,
Rob
-----Original Message-----
From: Lindy Mayfield <Lindy.M...@SSF.SAS.COM>
To: TSO-...@VM.MARIST.EDU
Sent: Tue, 11 Apr 2006 22:59:12 +0300
Subject: Can a Rexx exec running as STC respond to Stop or Modify?
I have a Rexx exec running as an STC. I was wondering if there is there any
way, like with a SIGNAL ON ... or some other way to have my exec respond to a
STOP or MODIFY command?
For example, I have a simple Rexx exec running as a TCP/IP daemon. I can make a
tcp/ip connection to it and give it a cancel command, but I wondered if there
was a way to make the exec know when it received a STOP or MODIFY command.
I think probably not, but one never knows. I've found that more times than not,
with MVS, there is almost always a way. (-:
Thanks!
Lindy
P.S.
Just to be clear, my setup is pretty simple:
STC:
//DAEMON EXEC PGM=IKJEFT01,DYNAMNBR=50
//SYSPRINT DD SYSOUT=*
//SYSOUT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSPROC DD DISP=SHR,DSN=MY.REXX
//SYSTSIN DD DISP=SHR,DSN=MY.REXX(DAEMON)
And SYSTSIN:
%DAEMON port=1964
And the Rexx itself is just regular Rexx sockets stuff.
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX
----------------------------------------------------------------------
For TSO-REXX subscribe / signoff / archive access instructions,
send email to LIST...@VM.MARIST.EDU with the message: INFO TSO-REXX
The solution was pretty simple after a nice bit of learning:
000045 cib_ptr = get_ptr(cscx_ptr,'c')
000046 if cib_ptr = '00000000' then
000047 cib_verb = 'NO CIB'
000048 else
000049 do
000050 do while get_ptr(cib_ptr,'0') <> '00000000'
000051 cib_ptr = get_ptr(cib_ptr,'0')
000052 end
000053 cib_verb = get_data(cib_ptr,'4','1')
000054 if cib_verb = '04'x then
000055 cib_verb = 'START'
000056 if cib_verb = '08'x then
000057 cib_verb = 'STC COMMUNICATION'
000058 if cib_verb = '44'x then
000059 cib_verb = 'MODIFY'
000060 if cib_verb = '40'x then
000061 cib_verb = 'STOP'
000062 if cib_verb = '0C'x then
000063 cib_verb = 'MOUNT'
000064 end
000065 exit cib_verb
I only needed to add three lines, 50-52, to get it to work. So I can now capture the STOP command which is really all I wanted.
Funny thing I haven't understood yet, is when I do a MODIFY I get this in the log:
F EURSTC8,KITTY
IEE342I MODIFY REJECTED-TASK BUSY
I'll be looking up that error as soon as I fix up my STOP logic. (-:
Lindy
-----Original Message-----
From: TSO REXX Discussion List [mailto:TSO-...@VM.MARIST.EDU] On Behalf Of Vitonis, Anthony J
Sent: Thursday, April 13, 2006 1:18 AM
To: TSO-...@VM.MARIST.EDU
Subject: Re: [TSO-REXX] Can a Rexx exec running as STC respond to Stop or Modify?
Lucky for you, John's exec puts the first CIB address in a variable
called cib_ptr. Maybe you could run the CIB chain by calling his
get_ptr routine in a loop until you find a CIBNEXT field of zero.
(Two disclaimers: 1. I know you want to use this as an opportunity to
learn, so I'm trying to lead you to the answer instead of giving it to
you outright. 2. I'm not testing my own suggestions, so I may be
sending you on a wild goose chase anyway.)
Regards,
John K
CSC
Lindy Mayfield
<Lindy.Mayfield@S
SF.SAS.COM> To
Sent by: TSO REXX TSO-...@VM.MARIST.EDU
Discussion List cc
<TSO-...@VM.MARI
ST.EDU> Subject
Re: [TSO-REXX] Can a Rexx exec
running as STC respond to Stop or
04/13/2006 03:48 Modify?
AM
Please respond to
TSO REXX
Discussion List
<TSO-...@VM.MARI
ST.EDU>