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 IEW2456E error when link-editing a C ... Senthilraj JCL & VSAM 0 Fri Oct 13, 2017 3:12 pm
This topic is locked: you cannot edit posts or make replies. 00D3003B - time outs in DB2 when invo... chavinash2004 DB2 2 Mon Oct 09, 2017 4:39 pm
No new posts VSAM RLS Wait time blayek JCL & VSAM 2 Mon Oct 02, 2017 9:05 pm
No new posts Assembler Macro Copybook converted to... Ziquilix PL/I & Assembler 4 Tue Sep 26, 2017 3:07 am
No new posts Comparing 2 Files using Current time arunsoods SYNCSORT 9 Fri Sep 22, 2017 6:00 pm

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