>> Is my understanding correct.

No, not really. I however imagine some such scenario: your TCB code starts 
(directly or indirectly) an SRB. It then WAITs for completion of this 
processing. Something like VTAM fast path for example. The SRB runs and POSTs 
the waiting TCB which is then dispatchable. The SRB has control of a CPU and 
wants to pass that to the TCB code, which it does using TCTL. This causes the 
SRB to terminate and the TCB code (after WAIT) is dispatched directly, without 
further waiting for the dispatcher to get around to it (after the SRB has 
otherwise terminated). Of course, the TCB might possibly already have been 
dispatched, in which case the SRB just terminates. I guess that's the kind of 
situation the function is provided for. Or there's RESUME RETURN=N for the TCB 
RB which will make the RB dispatchable first (in fact the RESUME RETURN=N 
function jumps to the TCTL exit in the MVS code, it's pretty much the same 
function). That's if one's up to playing with things like that.

-----Ursprüngliche Nachricht-----
Von: IBM Mainframe Assembler List [mailto:[email protected]] Im 
Auftrag von [email protected]
Gesendet: Sonntag, 24. Februar 2013 15:57
An: [email protected]
Betreff: Re: AW: Curosity Question About TCTL

Let me see If I understand this.

Lets Say I Attach a Task (TCB) - the program (RB) associated with that TCB runs 
and ends. The TCB is not detached.

At some undertimed time latter an SRB is scheduled into this address space.
The SRB Issues TCTL with/to the TCB.
So Do I understand that the program (RB) will be re-executed Again ?

Is my understanding correct.

Paul D'Angelo


---------- Original Message ----------
From: David Stokes <[email protected]>
To: [email protected]
Subject: AW: Curosity Question About TCTL
Date: Sat, 23 Feb 2013 17:48:23 +0000

The TCTL or RESUME kicks off the TCB code without it having to wait for the 
usual scheduling, as long as it is dispatchable. What the TCB code does then is 
up to it.

>>When the resumed routine finishes executing under the TCB should it re-enter 
>>the WAIT state again ?

No, but it presumably will at some point or terminate.

-----Ursprüngliche Nachricht-----
Von: IBM Mainframe Assembler List [mailto:[email protected]] Im 
Auftrag von [email protected]
Gesendet: Freitag, 22. Februar 2013 17:31
An: [email protected]
Betreff: Curosity Question About TCTL

I was reading about Scheduling SRBs using IEAMSCHD and discovered the TCTL 
macro.

The TCTL (transfer control) macro allows an SRB routine to exit from its 
processing and to pass control to a task with minimal system overhead. When an 
SRB specifies RESUME RETURN=N, control transfers to the resumed TCB. Control 
then passes to the top RB on the TCB/RB chain, but only if the system 
determines that the RB is dispatchable.

Again this is a curosity question and I have nop real reason to use TCTL.
Am I to understand that the TCB needs to be in a WAIT state ?

When the resumed routine finishes executing under the TCB should it re-enter 
the WAIT state again ?

Its not clear to me how this facility should work.

Can Some one explain the mechanics behind using TCTL and the target Task 
Control Block.

Paul D'Angelo
---------------

Reply via email to