View previous topic :: View next topic
|
Author |
Message |
go4salu
New User
Joined: 12 Jan 2006 Posts: 11
|
|
|
|
I've to update a VSAM file for Time of day field. Can anybody help me out in understanding TIME-OF-DAY and how to calculate it and use it in COBOL program.
Regards
Shail |
|
Back to top |
|
|
murmohk1
Senior Member
Joined: 29 Jun 2006 Posts: 1436 Location: Bangalore,India
|
|
|
|
Shail,
Quote: |
Can anybody help me out in understanding TIME-OF-DAY |
We dont know your 'project terms'. How do you expect others to help? Speak with your peers.
Quote: |
how to calculate it and use it in COBOL program. |
May be you can use TIME funciton. |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
VS COBOL supports TIME-OF-DAY special register which Enterprise COBOL does not support. It is not project specific term.
And there is no TIME function as Murali says.
FUNCTION CURRENT-DATE will give the time also.
Code: |
For VS COBOL
MOVE TIME-OF-DAY to x(06)variable
For Enterprise cobol
MOVE FUNCTION CURRENT-DATE(9:6) to variable. |
Format is HH:MM:SS, this should help you. Please let me know if you need anything else. |
|
Back to top |
|
|
go4salu
New User
Joined: 12 Jan 2006 Posts: 11
|
|
|
|
Thanks for your comments but the problem is the TIME-OF-DAY should be 8 byte comp field, which must have micro seconds with no. of days hours, minutes and seconds.
Can you please enlighten on this. Thanks. |
|
Back to top |
|
|
agkshirsagar
Active Member
Joined: 27 Feb 2007 Posts: 691 Location: Earth
|
|
|
|
go4salu,
you did not tell which COBOL you are using. But still see this link. |
|
Back to top |
|
|
|