Assuming that you do need the CMS lock, then it does not matter whether 
you get the local lock of home (LOCAL lock) or the local lock of your 
primary or secondary space (CML, if not equal to home). The LOCAL lock is 
easier, as it does not require you to identify which ASCB.

Do note the caveat that the exit routine may be entered locked. If it 
does, the main thing is that you must not release a lock held by your 
caller, and also that SETLOCK might not like attempting to obtain a CML if 
you already hold a local, for example. Thus you would want to use SETLOCK 
TEST,TYPE=ALOCAL,...  to determine if a local lock is held and if so not 
get a local lock (and not release it later). And SETLOCK TEST,TYPE=CMS to 
determine if the CMS lock is held and if so not get it (and not release it 
later).

You may invoke SETLOCK in AR ASC mode, provided that (as it true in 
general for all macros) you have informed the macro of this via SYSSTATE 
ASCENV=AR. If you look at the expansion, you will see that it issues SAC 
to primary ASC mode before branching to the service, and SAC back to AR 
ASC mode after returning.

Peter Relson
z/OS Core Technology Design

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

Reply via email to