It sounds like the question about CML lock was because the OP thought they 
needed the CMS lock and, in order to get the CMS lock, you do need a local lock.
But "a local lock" does not need to be a CML lock.

Usually, one just gets the LOCAL lock (the use of caps as in "LOCAL" here is 
the convention for indicating the local lock of the home address space).
That is simple and requires no bind to some other address space: SETLOCK 
OBTAIN,TYPE=LOCAL (often with MODE=UNCOND, often with REGS=USE).
And it is no problem to do this PASN <> HASN.

If you can accomplish your serialization without getting an ENQ or a system 
lock (whether by CS, CSG, CDS, CDSG, PLO, or whatever), that is usually a good 
choice.

You cannot properly implement a "free queue" (as described in the principles of 
operation) with CS. You at least need CDS in order also to provide a sequence 
number.
But if what you're talking about is (for example) a queue of work elements 
added to by multiple work units and consumed as a whole by a single work unit, 
CS can suffice.

Peter Relson
z/OS Core Technology Design

Reply via email to