Quantcast
Channel: IBM Mainframe Computers Forums
Viewing all articles
Browse latest Browse all 9405

CICS :: RE: Get system time in micro second or clock uint.

$
0
0
Author: steve-myers
Subject: Re: Reply to: Get system time in micro second or clock uint.
Posted: Wed Sep 07, 2016 7:02 pm (GMT 5.5)

Bill O'Boyle wrote:
Take a look at the TIME Macro (LINKAGE=SYSTEM) using the MIC (Microseconds) keyword.

You can then return the binary-value 'as-is' or convert this binary-doubleword to a PL16 packed-decimal value, using the 'CVDG' (Convert Decimal Grande) instruction, with the doubleword loaded into a grande-register beforehand via a 'LG' (Load Grande) instruction.

This type of sub-program can be used in both Batch and CICS. But, ensure you're passing re-entrant storage from the COBOL caller so that it remains re-entrant, which is a requirement in CICS.

HTH....

MVS Programming Assembler Services Reference ... wrote:
MIC returns the time of day in microseconds. The value is returned as 8 bytes of information where bit 51 is equivalent to one microsecond.

I think both Mr. O'Boyle and I goofed. I think we both thought TIME MIC returned the TOD clock with micro seconds in bit 63. Oops. Then I thought to actually test this, and the TIME MIC value was, well, rather low! Then I actually RTFM!

On the other hand, the time will always be positive, so the CVDG instruction will produce a positive 16 byte packed decimal number. It's just not what we thought.


Viewing all articles
Browse latest Browse all 9405

Trending Articles