View previous topic :: View next topic
|
Author |
Message |
ashimprodhan
New User
Joined: 08 Dec 2006 Posts: 12 Location: Kolkata
|
|
|
|
Hi Team,
I am using C~CICS, How can I retrieve the time in millisecond level in C language. Please give some examples/ inbuilt functions.
Regrads,
Ashim |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Code: |
EXEC CICS ASKTIME ABSTIME(field)
EXEC CICS FORMATTIME ABSTIME(field) |
|
|
Back to top |
|
|
Terry Heinze
JCL Moderator
Joined: 14 Jul 2008 Posts: 1249 Location: Richfield, MN, USA
|
|
|
|
I think Ashim is seeking the C equivalent of the CICS functions. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
In C, use EXEC CICS ASKTIME ABSTIME(field) to return the 8-byte unsigned character variable field. Call a COBOL or Assembler subroutine that takes this packed decimal field and unpacks it into a 15-byte unsigned character field (which is PIC 9(15) in COBOL). The EXEC CICS FORMATTIME formats the hours, minutes, and seconds. The returned value from the subroutine call provides the milliseconds. However, be aware that the milliseconds are rounded to the nearest 10 (i.e., hundredths of a second) by CICS. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
If your C~CICS program is LE enabled, then issue a call to the LE Callable Service routine "CEELOCT", which will return the current-date as an 8-byte value of CCYYMMDD and the current-time as a 9-Byte value of HHMMSSTHM, with the last 3-Bytes representing tenths, hundreths and milliseconds.
Regards, |
|
Back to top |
|
|
|