I am writing records to a file with time component being part of key and uniquely identifying records (rest of key being same for multiple records).
Using 'EXEC CICS ASKTIME' , i am able to get time in millisecond granularity.
But due to fast cpu processing, multiple 'CICS ASKTIME' commands are giving same time. This results in 'DUPREC' error when writing to file.
Can I get time in Microsecond granularity in cobol program?
Joined: 23 Mar 2007 Posts: 149 Location: Ottawa Canada
Without DB2 here is one way to do it using the asm macro TIME...
* if we needed more resolution than microseconds we could use the
* STCKE instruction. Microseconds are good enough here, so we use
* the TIME macro, since it does some nice formatting for us.
We have a common subroutine that calls the Assembler.