> -----Original Message-----
> From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On
> Behalf Of Thomas Berg
> Sent: Saturday, October 28, 2006 11:17 AM
> To: [email protected]
> Subject: Re: Why would Rexx Date/Time be different from ASCBEWST
> Date/Time?
> 
> ======  Paul Gilmartin  ======  wrote    2006-10-25 17:43:
> > In a recent note, Lindy Mayfield said:
> >
> >> Date:         Wed, 25 Oct 2006 16:47:00 +0200
> >>
> >> date=DATE(U)
> >> time=TIME()
> >>     ...
> >> Say 'Rexx Date/Time:' date time
> >>
> > Do not do this.  There's a (small) chance that the date will change
> > between the two calls, and the result printed will be in error
> > by 24 hours; a nasty bug for being almost impossible to reproduce.
> > Rather, do:
> >
> >   Say 'Rexx Date/Time:' DATE(U) TIME()
> >
> > I recognize this is a one-off, but as mentioned recently in these
> > lists, one-time code has a nasty habit of creeping into production,
> > as do careless habits practiced in one-time code.
> >
> > -- gil
> 
> There is still a small(er) chance that the date changes between the
> resolution of the Date() function and the resolution of the Time()
> function.  (AFAIK)
> Haven't found a really "clean" solution to this problem.  Anyone ?
> 
> Thomas Berg

Could you get the date before and after getting the time. Then
check the two dates for a match? If mismatch, then loop back and
try again.

Jeffrey D. Smith
Principal Product Architect
Farsight Systems Corporation
700 KEN PRATT BLVD. #204-159
LONGMONT, CO 80501-6452
303-774-9381 direct
303-484-6170 FAX
http://www.farsight-systems.com/
comments are invited on my encryption project

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to