Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Profile Log in to check your private messages Log in
 
Wat is TIME-OF-DAY and how to use it in COBOL?

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> COBOL Programming
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    Post subject: Wat is TIME-OF-DAY and how to use it in COBOL?
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: 1439
Location: Bangalore,India

PostPosted: Thu Dec 06, 2007 2:55 pm    Post subject:
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: 686
Location: Earth

PostPosted: Thu Dec 06, 2007 4:51 pm    Post subject:
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    Post subject: Reply to: Wat is TIME-OF-DAY and how to use it in COBOL?
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: 686
Location: Earth

PostPosted: Thu Dec 06, 2007 7:02 pm    Post subject:
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    IBMMAINFRAMES.com Support Forums -> COBOL Programming All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts How to display offset thru cobol prog... tvinodkumar7 CICS 2 Sun Apr 22, 2018 8:42 pm
No new posts Linkage editor is part of COBOL, z/OS... ankit.jain COBOL Programming 4 Fri Apr 20, 2018 4:17 pm
This topic is locked: you cannot edit posts or make replies. Difference between EQUAL and EQUAL TO... jithinraghavan COBOL Programming 3 Thu Apr 19, 2018 2:22 am
No new posts Call COBOL or PLI with a click from w... vaibhav gs All Other Mainframe Topics 1 Mon Apr 16, 2018 7:29 pm
No new posts COBOL MVS options BiswajitDG COBOL Programming 8 Fri Apr 06, 2018 12:35 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us