Hi Sail,

Have you considered if you absolutely need to obtain this lock and if so
what change can you make to your application to avoid the need?   There
are IBM services that require you to obtain a particular lock but I have
seen cases where code is obtaining a lock and it doesn't behave as
expected or was not needed.  It is an area in which your use of the
facility does introduce potential bottlenecks and increases the
criticality of the code and it's recovery routines.  As a Rule of Thumb
try to avoid obtaining locks unless you must, if you must keep the path
where you hold the lock as short as you can, provide recovery to insure
lock release in the event there is an abend or unexpected termination of
your task.  It is also a good idea to use the RELATED= option to help
document the SETLOCK and provide plenty of clear comments explain why
the lock is being obtained and all the expectations about the
environment.                        

The higher up the lock hierarchy you go the less desirable your
application and not z/OS obtaining the lock becomes. Just something to
consider.

        Best Regards, 

                Sam Knutson, GEICO 
                Performance and Availability Management 
                mailto:[EMAIL PROTECTED] 
                (office)  301.986.3574 

"Think big, act bold, start simple, grow fast..."

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
Behalf Of Sail Kim
Sent: Tuesday, August 22, 2006 3:25 PM
To: [email protected]
Subject: Re: SETLOCK TEST question please

> btw: There was a time in ancient MVS history when the Class Locks Held

> field could be used for direct comparison to determine whether there 
> were any higher locks held than the lock in question. That was all 
> redesigned who-knows-when, so there is now no easy way (i.e., IBM 
> programming interface) to see the lock hierarchy.

I seem to remember that too.

I just wrote a small program to test the case. First, I obtained CPU
lock and tested for the CMS and got the lock available condition. I
then, obtained TRACE and then SRM lock and tested for the CMS and again
got the lock available condition. I was expecting what Binyamin was
expecting due to the lock system being hierarchical.

I didn't want to get the hierarchy violation by obtaining  a lower one
while higher one is held which will be abend073. My little test is
telling me that I just can't ask for the CMS lock by testing CMS lock
only. However, many other higher locks are not documented except in the
SETLOCK macro itself.

What one must do to safely obtain the CMS or higher lock then release
it? 

Sail Kim
Vanguard Research Institute, Inc.

PLEASE JOIN US AT OUR 21st ANNUAL
ENTERPRISE/RACF SECURITY TRAINING
CONFERENCE AND EXPOSITION!
June 10 - June 14, 2007
St. Louis, Missouri
Register Today www.go2vanguard.com/expo

thinkSecurity
thinkVanguard
====================
This email/fax message is for the sole use of the intended
recipient(s) and may contain confidential and privileged information.
Any unauthorized review, use, disclosure or distribution of this
email/fax is prohibited. If you are not the intended recipient, please
destroy all paper and electronic copies of the original message.

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