"It needs redesign for use in CICS, IMS and most z/OS components."

The time in CICS can be gotten in C very easily:

"EXEC CICS ASKTIME ABSTIME(utime)"

C       char data_area[8];


ABSTIME(data-area) Specifies the data area for the number of milliseconds
since 00:00 on 1 January 1900, which is known as absolute time. The time is
taken from the system time-of-day clock, adjusted for leap seconds and to
apply the local timezone offset (including daylight saving time), truncated
to the millisecond, and returned as a packed decimal of length 8 bytes.

You can then get the time in any format:

EXEC CICS FORMATTIME ABSTIME(utime)
          DATESEP('-') DDMMYY(date)
          TIME(time) TIMESEP(':')


Joe

On Sat, Aug 17, 2019 at 11:05 PM Paul Gilmartin <
0000000433f07816-dmarc-requ...@listserv.ua.edu> wrote:

> On Sat, 17 Aug 2019 23:43:34 +0000, Jon Perryman wrote:
>
> > If time were as simple to solve as UTC and a 1 byte UTC offset, then
> this problem would have been solved a long time ago. As I said before,
> everyone assumes the time zone is fixed. What happens when the time zone is
> at the time the data is reference instead of created.
> >
> This is addressed by:   https://www.iana.org/time-zones
>
> >As for localtime better than the z/OS implementation, that's silly.
> First, bad is still bad. Second, C local time is a language feature instead
> of OS feature.
> >
> Only because you call it so.  The TIME macro is a language (HLASM) feature
> instead of OS feature.
>
> Third, it was designed around a specific Unix feature (environment
> variables). It needs redesign for use in CICS, IMS and most z/OS
> components.
> >
> There are other ways to pass such a parameter.  It could be a PARMLIB
> entry.
>
> -- gil
>
> ----------------------------------------------------------------------
> For IBM-MAIN subscribe / signoff / archive access instructions,
> send email to lists...@listserv.ua.edu with the message: INFO IBM-MAIN
>

----------------------------------------------------------------------
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