I'm just adding an STAE recovery rtn in case of an abend leave the word busy
-----Mensagem original----- De: João Reginato <jb.regin...@gmail.com> Enviada em: domingo, 8 de dezembro de 2024 15:45 Para: 'IBM Mainframe Assembler List' <ASSEMBLER-LIST@LISTSERV.UGA.EDU> Assunto: RES: RES: SETLOCK OBTAIN CML/CMS Prioridade: Baixa Yes, CS is sufice for me Thanks -----Mensagem original----- De: IBM Mainframe Assembler List <ASSEMBLER-LIST@LISTSERV.UGA.EDU> Em nome de Peter Relson Enviada em: domingo, 8 de dezembro de 2024 10:26 Para: ASSEMBLER-LIST@LISTSERV.UGA.EDU Assunto: Re: RES: SETLOCK OBTAIN CML/CMS 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