Given the following MOVE statement MOVE FUNCTION CURRENTDATE
Given the following MOVE statement: MOVE FUNCTION CURRENT-DATE TO WS - DATE - AND - TIME Code a DATA DIVISION entry for WS-DATE-AND-TIME such would be easy for you to be able to refer to the Year, Month, Day, Hours and Minutes in your PROCEDURE DIVISION code.
Solution
The above given will come under the COBOL Intrinsic Functions.
The newest version of the COBOL, generically called 20x, includes the collection of built-in, or intrinsic functions.
Probably the most useful intrinsic function is CURRENT-DATE which is a replacement for ACCEPT DATE and ACCEPT TIME, CURRENT-DATE is a Y2K-complaint, having 4-digit year. This function returns a 20-character alphanumeric field which is laid out as follows.:
So by using the above you not only get the time down to the millisecond, but you can also get the differnece between your time and the Greenwich Mean Time.
