HP3000-L Archives

November 2008, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Matthew Perdue <[log in to unmask]>
Reply To:
Matthew Perdue <[log in to unmask]>
Date:
Sat, 15 Nov 2008 17:03:27 -0600
Content-Type:
text/plain
Parts/Attachments:
text/plain (107 lines)
Quoting Roy Brown (in part):

"The current working ratio is that what it takes the HP3000 two minutes to
generate, it takes Oracle an hour to digest."

Isn't it sweet....

"But the surprising limitation that I hit with MPE/iX, which Linux and even
Windows brush off effortlessly, was trying to run a system across several
timezones, and have everyone see everything in their local time.

Even using Hourglass or something similar - which shouldn't be needed for
this anyway - I was never able to figure out how it could be done.

I could get close, within an application that I could change the code of,
but I couldn't get all the way there.

I eventually concluded it was impossible to do with MPE :-( "

Not true, there is a way. There's always a way. :)

A|PUB.SYS:SHOWTIME
SAT, NOV 15, 2008,  4:50 PM
[^^^notice the system local time]

A|PUB.SYS:SHOWVAR TZ
TZ = CST6CDT
[time zone variable set for time zone where the system is located]

A|PUB.SYS:RUN SHOWCLKS.PUBXL.TELESUP

SHOWCLKS/XL  A.10.00
DEBUG/iX C.45.05

HPDEBUG Intrinsic at: 206.00007258 PROGRAM+$198
PRIV=$3 := $0

  *************************************************************
  ***                                                       ***
  ***   Greenwich Mean Time : SAT, NOV 15, 2008, 10:50 PM   ***
  ***   GMT/MPE offset      : -6:00:00                      ***
  ***   MPE System Time     : SAT, NOV 15, 2008,  4:50 PM   ***
  ***                                                       ***
  *************************************************************

                 **** C Library Information ****

        Current value of Time Zone(TZ) variable : CST6CDT
        CTIME function return :  Sat Nov 15 16:50:26 2008

END OF PROGRAM
[notice the system time is still the local system time, and the function
CTIME returns the time based upon the setting of the TZ variable... (you'll
see it change in the following example) ]

A|PUB.SYS:SETVAR TZ "PST8PDT"
[change the time zone variable to Pacific]

A|PUB.SYS:SHOWTIME
SAT, NOV 15, 2008,  4:50 PM
[notice the system time is still the local time, it hasn't changed]

A|PUB.SYS:RUN SHOWCLKS.PUBXL.TELESUP

SHOWCLKS/XL  A.10.00
DEBUG/iX C.45.05

HPDEBUG Intrinsic at: 206.00007258 PROGRAM+$198
PRIV=$3 := $0

  *************************************************************
  ***                                                       ***
  ***   Greenwich Mean Time : SAT, NOV 15, 2008, 10:50 PM   ***
  ***   GMT/MPE offset      : -6:00:00                      ***
  ***   MPE System Time     : SAT, NOV 15, 2008,  4:50 PM   ***
  ***                                                       ***
  *************************************************************

                 **** C Library Information ****

        Current value of Time Zone(TZ) variable : PST8PDT
        CTIME function return :  Sat Nov 15 14:50:48 2008

END OF PROGRAM
[AHA! Notice the CTIME function returns the Pacific time according to the
setting in the TZ variable, but no other users are affected as system local
time remains the same]

A|PUB.SYS:SHOWVAR TZ
TZ = PST8PDT
[yep, TZ variable set to Pacific]

A|PUB.SYS:SETVAR TZ "CST6CDT"
[reset TZ variable to system local time zone]

Each session or job can set their own instance of the time zone variable TZ
(which must be "TZ" as that's what the CTIME function looks for) without
affecting other users and jobs. The users's job or session program can then
call the C library functions to determine the time.

Voila! Everybody has the time according to their own time zone settings!

Now wasn't that easy.... :)

* To join/leave the list, search archives, change list settings, *
* etc., please visit http://raven.utc.edu/archives/hp3000-l.html *

ATOM RSS1 RSS2