Thanks David, I missed that entirely since it was not present in the last V2.5 documentation that I downloaded. I will have to download the whole doc package again and review it. Did they also provide a callable Unix Services function that implements the function?
One issue of course is the lack of sufficient example code for how COBOL can call the C/C++ library routines. Peter From: IBM Mainframe Discussion List <IBM-MAIN@LISTSERV.UA.EDU> On Behalf Of David Crayford Sent: Monday, February 19, 2024 3:41 AM To: IBM-MAIN@LISTSERV.UA.EDU Subject: Re: Nanosecond resolution timestamps for HLL's? clock_gettime() was added to z/OS https://urldefense.com/v3/__https://www.ibm.com/docs/en/zos/2.5.0?topic=functions-clock-gettime-retrieve-time-specified-clock__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!L0Vqx6BX9GMMzLWErht-01oUNYtt7s2SHOcZxlJcuM4li7nA9JPGeWdh2e-bNNJLh31i6F-lcoOqspbZ5_19ujb23o38l_3l5l86Bk-g$<https://urldefense.com/v3/__https:/www.ibm.com/docs/en/zos/2.5.0?topic=functions-clock-gettime-retrieve-time-specified-clock__;!!Ebr-cpPeAnfNniQ8HSAI-g_K5b7VKg!L0Vqx6BX9GMMzLWErht-01oUNYtt7s2SHOcZxlJcuM4li7nA9JPGeWdh2e-bNNJLh31i6F-lcoOqspbZ5_19ujb23o38l_3l5l86Bk-g$>. It's my understanding it was a requirement for the clang stuff. You may be able to call the RTL. On Mon, Feb 19, 2024 at 8:23 AM Peter Farley < 0000031df298a9da-dmarc-requ...@listserv.ua.edu<mailto:0000031df298a9da-dmarc-requ...@listserv.ua.edu>> wrote: > I have been reviewing all the documentation I can find to provide > nano-second resolution timestamps from a calling HLL batch program. STCK > and STCKE instructions of course provide this (and more) resolution, but > using them from any HLL besides C/C++ requires an assembler subroutine > (however simple that may be for those of us who are already comfortable in > assembler). In shops where any new assembler functionality is proscribed > or strongly discouraged can't or would strongly prefer not to use assembler > for this functionality. > > The only HLL-callable function already provided in z/OS that I can find > that provides anything near that resolution is the LE Callable Services > function CEEGMT, but two calls to that service from a COBOL program in a > row separated by only a few calculations and a DISPLAY to SYSOUT produce > identical values. This is not good enough for high-volume processing > needs. Every request for a time value needs to generate a new higher value. > > Is there any other place I am not yet looking which provides nano-second > resolution like STCK/STCKE and the linux function clock_gettime() besides > an assembler invocation of STCK/STCKE? z/OS Unix has not yet implemented > the clock_gettime() function anyway, so that is off the table. The calling > HLL here will be COBOL, so the C/C++ builtin functions "__stck" and > "__stcke" are not available. Would that they were, but they are not at > this time. (Maybe that calls for a new "idea" to IBM . . . ?) > > HTH for any pointers or RTFM you can provide. > > Peter -- This message and any attachments are intended only for the use of the addressee and may contain information that is privileged and confidential. If the reader of the message is not the intended recipient or an authorized representative of the intended recipient, you are hereby notified that any dissemination of this communication is strictly prohibited. If you have received this communication in error, please notify us immediately by e-mail and delete the message and any attachments from your system. ---------------------------------------------------------------------- For IBM-MAIN subscribe / signoff / archive access instructions, send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN