>What guarantees uniqueness other than STCT(E)? Does the Sysplex Timer/ETR >guarantee >uniqueness across the plex? > >And monotonicity is a harsher constraint. In the Bad Old Days when each CPU >had its own >TOD and uniqueness was achieved by putting the CPU ID in the TOD programmable >field >I wondered hereabouts whether a later transaction on a lower CPU could get >lower >timestamp than an earlier transaction on a higher CPU.
There is an entire sub-section in the PoOps in the Control chapter (SA22-7832-13, pp. 4-51 et al., starting most of the way down the second column of that page) about the monotonicity guarantees for STCK{E/F}, even on multiple CPU's. I commend it to your reading. What I would prefer to find in this case is an existing OS-supplied service subroutine to return a monotonically increasing time value independent of the language of the calling routine. A service (e.g., named counters, etc.) would, as you correctly point out, suffer in terms of performance. I can personally provide a truly efficient assembler subroutine using STCK{E} to guarantee monotonicity and even return the STCK{E} condition code as an integer return code, but I am looking for a perhaps slightly (but not enormously) less efficient solution that has the benefit of avoiding a z/OS shop needing to maintain a user-land assembler subroutine, no matter how simple and straight-forward an assembler solution may be. Alternatively, providing other HLL's with easy, compiler-supported access to the C/C++ "builtin" instruction functions for STCK{E} (and all the others as well; after all, a programmer can't have too many tools available) would likely (but not necessarily) be relatively more efficient than the usual implementation of HLL- or LE- or Unix-supplied service subroutine functions and their environmentally-enforced baggage. Peter ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN