On Tue, 12 Jan 2021 22:53:02 +0200, Itschak Mugzach wrote:.
>
>I tested that there already. My rexx returns a different time. I noticed
>that they only use the first four bytes. The code snip I gave is from the
>TOD IPCS rexx.
> 
Regina gives me:
502 $ date
Tue Jan 12 15:59:30 MST 2021
503 $  rxx "numeric digits 20; say d2x( (  time( 'T' ) - date( 'T', 
'1900-01-01', 'I' ) ) %1.048576 )"
D91C6646

Pasting into  http://www.longpelaexpertise.com/toolsTOD.php sez
TOD: (STCK): x" D91C6646 00000000 "
UTC Date and Time (Date + HH:MM:SS): 12-Jan-2021 15:59:31
UNIX Date/Time: 1610467171 

What was the output of your:
>>     Say 'STCK HEX VALUE ' c2x(tod)
>>     tod=C2D(tod)
>>     Say 'STCK DEC VALUE ' tod
???

>> -----Original Message-----
>> From: Itschak Mugzach
>> Sent: Tuesday, January 12, 2021 10:00 AM
>>
>> This is the STCK value: D91B6D3EF6430440 (I have it in hex in variable TOD)
>> Converted to decimal  : 15644217847788536896
>> Actual dat eof run is : Yesterday
>> the code:
>> /* rexx */
>>     NUMERIC DIGITS 20
>>     RC = SYSCALLS('ON')
>>     ADDRESS SYSCALL  'TIME'
>>     Say 'Current date is' retval
>>
>>     TOD = 'R _ 6   '
>>     Say 'STCK HEX VALUE ' c2x(tod)
>>     tod=C2D(tod)
>>     Say 'STCK DEC VALUE ' tod
>>     tod=Trunc(tod/4096)
>>     microsec=tod//1000000
>>     seconds=Trunc(tod/1000000)
>>     Say 'Seocnds =' Seconds
>>     xxx = 70 * 3600 * 24 * 365
>>     Say 'diff=' xxx
>>     Say Seconds - xxx
>>     SAY '2ND DIF = ' SECONDS - XXX - RETVAL

-- gil

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN

Reply via email to