On Mon, 21 Apr 2025 21:00:06 -0700, Tom Brennan wrote: >Rexx is a great option if possible. The program I coded (in ASM) >probably had some overlap with your Rexx such as conversion, date >subtraction, adding days, leap year, etc. > >The folks who wrote the C function strftime() did a good job in my >opinion, using %x variables to return various conversions. > And it's timezone savvy; on Linux, at least, in a user-friendly format: 526 $ TZ=Pacific/Apia date Wed Apr 23 03:47:29 AM +13 2025 527 $ 527 $ TZ=Pacific/Pago_Pago date Tue Apr 22 03:47:37 AM SST 2025
REXX, to its credit: <https://www.ibm.com/docs/en/zos/2.4.0?topic=functions-date> Note: The first call to DATE or TIME in one clause causes a time stamp to be made that is then used for all calls to these functions in that clause. Therefore, multiple calls to any of the DATE or TIME functions or both in a single expression or clause are guaranteed to be consistent with each other. I once wondered here whether there is any similar guarantee of concurrency for references to the dynamic system symbols, &HHMMSS and &YYMMDD. An expert (Peter R., IIRC) said, "No." That's a deficiency that should be addressed lest, with minuscule odds, a 23:59:59 inconsistency be observed. Likewise, the TIME macro must access ETOD, CVTLDTO, and CVTLSO. Are those accesses guaranteed to appear concurrent? It's of no help that STCK serializes with respect to storage accesses. Regrettably, REXX TIME() has no third option. -- gil ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO IBM-MAIN
