Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups 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 Date and time format in CICS Chandru3183 CICS 2 Sat Mar 18, 2017 12:46 pm
No new posts How to get current date -1 and curren... murali.andaluri DFSORT/ICETOOL 3 Wed Mar 08, 2017 2:09 pm
No new posts SQL query not working in Cobol program. CuriousMainframer COBOL Programming 14 Wed Feb 22, 2017 5:56 pm
No new posts Execute TSO ACF commands from COBOL-I... supreethi.srid TSO/ISPF 0 Tue Feb 21, 2017 5:19 pm
No new posts Mainframe Interview Questions CICS,CO... akshathan Mainframe Interview Questions 6 Thu Feb 09, 2017 6:38 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us