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
*| **Itschak Mugzach | Director | SecuriTeam Software **|** IronSphere
Platform* *|* *Information Security Continuous Monitoring for Z/OS, zLinux
and IBM I **| *
*|* *Email**: [email protected] **|* *Mob**: +972 522 986404 **|*
*Skype**: ItschakMugzach **|* *Web**: www.Securiteam.co.il **|*
On Tue, Jan 12, 2021 at 7:30 PM Seymour J Metz <[email protected]> wrote:
> 409600 will give you units of 10 ms. Is that really what you want?
>
>
> --
> Shmuel (Seymour J.) Metz
> http://mason.gmu.edu/~smetz3
>
> ________________________________________
> From: IBM Mainframe Discussion List [[email protected]] on behalf
> of Itschak Mugzach [[email protected]]
> Sent: Tuesday, January 12, 2021 12:19 PM
> To: [email protected]
> Subject: Re: STCK and epoch time
>
> Paul,
>
> So if I ignore leap seconds, Can I just divide the number by 409600 and
> subtruct 1.1.1970-1.1.1900?
>
> *| **Itschak Mugzach | Director | SecuriTeam Software **|** IronSphere
> Platform* *|* *Information Security Continuous Monitoring for Z/OS, zLinux
> and IBM I **| *
>
> *|* *Email**: [email protected] **|* *Mob**: +972 522 986404 **|*
> *Skype**: ItschakMugzach **|* *Web**:
> http://secure-web.cisco.com/1L852dJoPXmqKt9ESjpybzsrC6kwCrmelHuY9TPZ6FI1UhWGxaTPRmDMPbv2-J-TuNYR19i6Etk0RoqzBfZLQdQtLviWwwBp8h9N4dDQB8A3EYjz9KKOqUnYbzA7gaNnoYO2QfsLXZEtnUlTJRXD0XDjWu63swogFiPD2kMAZ3JuBQaB5QMgq6ez7eOinZRRxlKKgcL_TnDcJbNi4LeM2hMtheU40OhWYMuPWP1WVeMCRcujHG9YP8bNig6miEen_MPWOkmLAWIUE_y1DiNulpfiKwSNgfGdpd4e1JXrM8nF-uSVh4vBU9A6-GSINEcDfR1D_BjfuPVtcl86DWYoDhc5NnvCbr2SlwtU_sZGrTobUpcBKotsb_8is79X7TY6ISxy2KRLlqDdGOkhH0qHDMlQjNd0ViYcltcvCTHTEJWaRSHpwx1hRx5cjiLjiqAHA/http%3A%2F%2Fwww.Securiteam.co.il
> **|*
>
>
>
>
>
> On Tue, Jan 12, 2021 at 7:09 PM Paul Gilmartin <
> [email protected]> wrote:
>
> > On Tue, 12 Jan 2021 16:30:52 +0000, Seymour J Metz wrote:
> >
> > >The TOD clock is just a counter; what you get out of it depends on what
> > you put into it. There is a convention in PoOps, but if you want the
> > correct time and date it is much easier to use system services than to do
> > the adjustments yourself.
> > >
> > >MVS does not use the same epoch as Eunix. Unix System Services will
> > adjust the epoch properly.
> > >
> > UNIX counts seconds, excluding leap seconds, starting 1970-01-01t00:00:00
> > MVS counts microseconds/4096, including leap seconds, starting
> > 1900-01-01t00:00:10.
> >
> > >________________________________________
> > >From: ITschak Mugzach
> > >Sent: Tuesday, January 12, 2021 10:36 AM
> > >
> > >How exactly STCK (not STCKE) stores the time? I took the value (8 bytes)
> > >and converted it to decimal 10 characters. I expect it to be the same as
> > >the EPOCH time returned by USS time call. However the returned value is
> > July
> > >29, 2019 (have a time from yesterday). I know there is a macro to do it,
> > >but I want to keep the correct epoch time.
> > >
> > I'm mystified (unless it's a coding error) by the 6-month error. Show
> > your code.
> >
> > -- gil
> >
> > ----------------------------------------------------------------------
> > For IBM-MAIN subscribe / signoff / archive access instructions,
> > send email to [email protected] with the message: INFO IBM-MAIN
> >
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO IBM-MAIN
>
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN