Re: Date manipulation

From: Binyamin Dissen (postingid_at_dissensoftware.com)
Date: 12/29/03


Date: Mon, 29 Dec 2003 22:55:41 +0200

On Mon, 29 Dec 2003 20:39:56 GMT "Judson McClendon" <judmc@sunvaley0.com>
wrote:

:>"Howard Brazee" <howard@brazee.net> wrote:

:>> "Judson McClendon" <judmc@sunvaley0.com> wrote:

:>> > If that code is in a transaction routine that is called 1000 times a second,
:>> > the overhead isn't 'nothing'. And what about turning over midnight after
:>> > the first call and before the last call? Remember Murphy's Law. :-)

:>> But you will notice that the code said:
:>> DISPLAY 'SIPR702 BEGAN ' FUNCTION CURRENT-DATE (5:2)
:>> '/' FUNCTION CURRENT-DATE (7:2)
:>> '/' FUNCTION CURRENT-DATE (1:4)
:>> ' ' FUNCTION CURRENT-DATE (09:2) hour
:>> ':' FUNCTION CURRENT-DATE (11:2)
:>> ':' FUNCTION CURRENT-DATE (13:2).

:>> Saying when a program starts doesn't happen 1000 times a second.

:>True. But saying when a transaction began processing might. ;-)

:>> I was under the impression that this gets converted into one call though.

:>I would think this should be the case, even if COBOL standards do not
:>dictate it. A compiler would be pretty inept not to detect and optimize
:>such a pattern. :-)

REXX has a requirement/definition that all TIME/DATE based functions in one
statement will all use the same clock value, even if the statement is complex
enough to require much time between the separate function calls.

Does COBOL?

--
Binyamin Dissen <bdissen@dissensoftware.com>
http://www.dissensoftware.com
Director, Dissen Software, Bar & Grill - Israel