[comp.lang.asm370] Getting the Current time upto the hundredth of second

DRS@IBRDVM1.BITNET (04/13/91)

   I am trying to get the current time  under VM/CMS. I used the TIME
macro in OSMACRO MACLIB to get time upto hudredths of a second. But
I am getting 00 for the hundredths part. Do you have a solution ? or
do you know what is wrong in SVC 11 under CMS session. Here is my
program


         START 0                                RETURNS TIME IN
         STM   14,12,12(13)                      HH.MM.SS.hh. (12CHARS)
BASE     BALR  12,0
         USING *,12
         L     3,0(0,1)                         LOAD ADDR OF ARG IN R3
         TIME  DEC
         ST    0,SOURCE
         MVO   WKAREA,SOURCE
         ED    PATTERN,WKAREA
         MVC   0(12,3),PATTERN+1
         LM    14,12,12(13)
         BR    14
         DS    0D
SOURCE   DS    F
WKAREA   DS    PL5'0'
PATTERN  DC    XL13'402120204B20204B20204B2020'
         END

phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN) (04/13/91)

DRS@IBRDVM1.BITNET writes:

>   I am trying to get the current time  under VM/CMS. I used the TIME
>macro in OSMACRO MACLIB to get time upto hudredths of a second. But
>I am getting 00 for the hundredths part. Do you have a solution ? or

Just use the TIME macro to figure out the zone offset.  Use the STCK
instruction to get the current time.  Be sure you can handle that RARE
case of the hour boundary crossing between TIME and STCK when trying
to differentiate the time zone.
-- 
 /***************************************************************************\
/ Phil Howard -- KA9WGN -- phil@ux1.cso.uiuc.edu   |  Guns don't aim guns at  \
\ Lietuva laisva -- Brivu Latviju -- Eesti vabaks  |  people; CRIMINALS do!!  /
 \***************************************************************************/

news@ucf1vm.BITNET (04/13/91)

DRS@IBRDVM1.BITNET writes:

>   I am trying to get the current time  under VM/CMS. I used the TIME
>macro in OSMACRO MACLIB to get time upto hudredths of a second. But
>I am getting 00 for the hundredths part. Do you have a solution ? or

Just use the TIME macro to figure out the zone offset.  Use the STCK
instruction to get the current time.  Be sure you can handle that RARE
case of the hour boundary crossing between TIME and STCK when trying
to differentiate the time zone.
--
 /***************************************************************************\
/ Phil Howard -- KA9WGN -- phil@ux1.cso.uiuc.edu   |  Guns don't aim guns at  \
\ Lietuva laisva -- Brivu Latviju -- Eesti vabaks  |  people; CRIMINALS do!!  /
 \***************************************************************************/