Re: Metal C using Z/OS macros in C macros

2020-01-19 Thread David Crayford
Excellent answer! I use a double for convenience as it's a simpler interface than using a timespec struct. nanoSleep(0.5); // sleep for half a second On 2020-01-20 9:11 AM, retired mainframer wrote: Since period is a double, it is reasonable to assume that it has a non-zero fractional part.

Re: Metal C using Z/OS macros in C macros

2020-01-19 Thread Peter Bishop
Thanks, Retired Mainframer, makes eminent sense now you explain it. cheers, Peter On Sun, 19 Jan 2020 17:11:57 -0800, retired mainframer wrote: >Since period is a double, it is reasonable to assume that it has a non-zero >fractional part. When its value is stored in secs, the fractional part

Tape Problem

2020-01-19 Thread Sam Golob
Hi Folks,     I once wrote a package to audit tape differences between the IBM 3494 VTS and CA-1.  It is on CBT Tape File 519. www.cbttape.org  CBT file.  It converts the tape inventory of CA-1 and the VTS to a common format, and compares them, reporting discrepancies.  Hope it helps.  This s

Re: Metal C using Z/OS macros in C macros

2020-01-19 Thread retired mainframer
Since period is a double, it is reasonable to assume that it has a non-zero fractional part. When its value is stored in secs, the fractional part is truncated (the entire value is converted to integer). So if period contained 5.12, sec will contain 5. When an arithmetic operator operates on

Re: Metal C using Z/OS macros in C macros

2020-01-19 Thread Peter Bishop
Hi David, Thanks for sharing this snippet. I'm not a C person, so I have a dumb question: how does the value of microSecs not equal zero? From my naive view it would seem to be the difference between two things that are the same, with period having been equated to secs in the previous stat

CBT File 120 - a new article -please look

2020-01-19 Thread Sam Golob
Hi Folks,     I just wrote another article for the "system doctors" about how to alter, cancel, or change the status of jobs, when necessary, and when the IBM methods might not be working for you.  It's nice to have a tool in your pocket when you need it.     This article, together with the

Re: Metal C using Z/OS macros in C macros

2020-01-19 Thread David Crayford
The XLC compiler supports named operands in __asm blocks which are much easier to understand. /** Constant for TOD clock unit for a second */ static const uint64_t TOD_TIME_SEC = 0xF424LLU; int nanoSleep(double period) {   int rc;   int secs = period;   double microSecs = period - secs;   u