How include time & date in the report generation in cobol programing?

Showing Answers 1 - 6 of 6 Answers

gowda

  • Aug 5th, 2005
 

this can be done in 2 ways, 1 is u can enter the date by user itself or u can excpet date form system into requried formate date/time variable, then u can get time and day into ur report generation file

  Was this answer useful?  Yes

The current method supported by most compiles is to use code like the following: 

MOVE FUNCTION CURRENT-DATE TO SOME-FIELD.

This will place the system timestamp in CCYYMMDDHHMMSSmmmmmmm format into SOME-FIELD.

  Was this answer useful?  Yes

kalone

  • May 19th, 2011
 

There are 2 methods to include Time and date :

1.  Move FUNCTION CURRENT-DATE  to WS-Timestmp.

2a. Accept WS-timestmp  from DATE .
2b. Accept WS-timestmp  from TIME .

   

  Was this answer useful?  Yes

1) Get the current date using MOVE FUNCTION CURRENT-DATE (1:8) TO WS-DATE
2) Get the current time using MOVE FUNCTION CURRENT-DATE (9:6) TO WS-TIME

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions