W dniu 09.11.2025 o 23:34, Jon Perryman pisze:
On Thu, 6 Nov 2025 17:08:19 -0600, Mark Charles <[email protected]> 
wrote:

Here is how I did this some 30 years ago.  I bet it will still work:

ALLOC FI(IWASUSED) DA('SYS1.IWASUSED') MOD
OPENFILE IWASUSED OUTPUT
SET IWASUSED = &STR(&SYSDATE &SYSTIME &JOBN &PROC &TYPE &DSN)
PUTFILE IWASUSED
CLOSFILE IWASUSED
FREE FI(IWASUSED)
Be aware this logic doesn't do any serialization and has the potential to miss 
a couple of procs.

I don't think so. Caution: it is NOT a proclib, it is different dataset called IWASUSED. It does provide serialization. However it requires TSO step. IMHO suitable for vast majority of procs.
Risks to consider:
1. Integrity of IWASUSED. IMHO irrelevant and potential loss is marginal. BTW: it can be different dataset per each PROC or PDSE with separate members.
2. Contention. It can be a problem, however separate datasets solve it.

--
Radoslaw Skorupka
Lodz, Poland

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to