IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

Wat is TIME-OF-DAY and how to use it in COBOL?


IBM Mainframe Forums -> COBOL Programming
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
go4salu

New User


Joined: 12 Jan 2006
Posts: 11

PostPosted: Thu Dec 06, 2007 2:47 pm
Reply with quote

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
View user's profile Send private message
murmohk1

Senior Member


Joined: 29 Jun 2006
Posts: 1436
Location: Bangalore,India

PostPosted: Thu Dec 06, 2007 2:55 pm
Reply with quote

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
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Thu Dec 06, 2007 4:51 pm
Reply with quote

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
View user's profile Send private message
go4salu

New User


Joined: 12 Jan 2006
Posts: 11

PostPosted: Thu Dec 06, 2007 5:01 pm
Reply with quote

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
View user's profile Send private message
agkshirsagar

Active Member


Joined: 27 Feb 2007
Posts: 691
Location: Earth

PostPosted: Thu Dec 06, 2007 7:02 pm
Reply with quote

go4salu,
you did not tell which COBOL you are using. But still see this link.
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> COBOL Programming

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts COBOL -Linkage Section-Case Sensitive COBOL Programming 1
No new posts COBOL ZOS Web Enablement Toolkit HTTP... COBOL Programming 0
No new posts Calling DFSORT from Cobol, using OUTF... DFSORT/ICETOOL 5
No new posts Generate random number from range of ... COBOL Programming 3
Search our Forums:

Back to Top