In
<e46b4df55a5e8746855078ae31f1b180338e974...@fspas01ev010.fspa.myntet.se>,
on 02/09/2010
   at 04:49 PM, Thomas Berg <[email protected]> said:

>As I'm playing a bit with an ENQ-function, I wonder how ENQ's work when
>doing dynamic allocation.

The same as any other ENQ or RESERVE, except that you're not the one
issuing it.

>Normally - as I understand - an ENQ is always released when the
>(sub)task terminates (or doing DEQ). 

An ENQ is release when the task owning the resource terminates. For an
unprivileged caller, that's the task issuing the ENQ. DYNALLOC is a
privileged caller, so it is more complicated.

>But if You e g do an allocation in the same rexx its ENQ is kept thru
>the entire TSO session or until You free the dataset.

More or less, except that an allocation might be marked not in use, which
is sort of intermediate between allocated and unallocated.

>Does this mean that the ENQ in this case is assigned to the main task
>(TSO) or is there another mechanism in work ?

The ENQ is assigned to the Initiator task for the jobstep; that's the
login task for foreground TSO.

-- 
     Shmuel (Seymour J.) Metz, SysProg and JOAT
     ISO position; see <http://patriot.net/~shmuel/resume/brief.html> 
We don't care. We don't have to care, we're Congress.
(S877: The Shut up and Eat Your spam act of 2003)

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to