View previous topic :: View next topic
|
Author |
Message |
tusharguptait
New User
Joined: 15 Feb 2006 Posts: 32
|
|
|
|
Hi,
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?
Thanks
TG. |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Tushar,
Go thru manual/qw for more info -
Quote: |
ASKTIME
Request current date and time of day.
+------------------------------------------------------------------------+
¦ ¦
¦ ¦
¦ >>--ASKTIME--------------------------------------------------------->< ¦
¦ +-ABSTIME(data-area)-+ ¦
¦ This command is threadsafe. ¦
¦ ¦
+------------------------------------------------------------------------+ |
|
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
In fact you have DB2, you could use CurentTimestamp.
Regards, Umeysan |
|
Back to top |
|
|
TG Murphy
Active User
Joined: 23 Mar 2007 Posts: 148 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.
*
TIME DEC,RATICKWA,LINKAGE=SYSTEM,
MF=(E,LIST1MAC),DATETYPE=YYYYMMDD
We have a common subroutine that calls the Assembler. |
|
Back to top |
|
|
|