HP3000-L Archives

March 2001, Week 5

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:
Shawn Gordon <[log in to unmask]>
Reply To:
Shawn Gordon <[log in to unmask]>
Date:
Thu, 29 Mar 2001 08:46:32 -0800
Content-Type:
text/plain
Parts/Attachments:
text/plain (39 lines)
I was just running some tests for a friend of mine and ran across the
strangest thing.  In COBOL you can return the date making use of the  value
in the TZ variable by saying         MOVE FUNCTION CURRENT-DATE TO
FULL-CURRENT-DATE
where FULL-CURRENT-DATE is defined as

  01 FULL-CURRENT-DATE.
     03 F-DATE.
        05 F-YEAR       PIC 9(4).
        05 F-MONTH      PIC 99.
        05 F-DAY        PIC 99.
     03 F-TIME.
        05 C-HOUR       PIC 99.
        05 C-MINUTES    PIC 99.
        05 C-SECONDS    PIC 99.
        05 C-SEC-HUND   PIC 99.
     03 C-TIME-DIFF.
        05 C-GMT-DIR    PIC X.
        05 C-HOUR       PIC 99.
        05 C-MINUTES    PIC 99.

The issue comes up with the C-TIME-DIFF segment, this displays the actual
offset and if it is + or -.  If you have a program loop and change the
value of TZ within the program, everything will come back correctly
*except* for C-TIME-DIFF which will always contain the value from when the
program started.  If you exit and run again, then C-TIME-DIFF will have the
correct value.

This would seem to be a bug.  I'm wondering if anyone knows anything about it.


Regards,

Shawn Gordon
President
theKompany.com
www.thekompany.com
949-713-3276

ATOM RSS1 RSS2