COBOL Manual for TNS/E Programs (H06.08+, J06.03+)
Example 186 CURRENT-DATE Function
Code:
DISPLAY FUNCTION CURRENT-DATE
Output:
1997041116522224-0700
The date in Example 186 is April 11, 1997 (19970411). The time is 16:52:22.24 or 4:52:22.24
PM (16522224), which is 7 hours behind Greenwich mean time (-0700).
DATE-OF-INTEGER Function
DATE-OF-INTEGER, an integer function, converts a date in the Gregorian calendar from integer
date form to standard date form (YYYYMMDD ).
argument
is a positive integer that represents a number of days since December 31, 1600, in the
Gregorian calendar.
The returned value is of the form YYYYMMDD, where YYYY represents the year in the Gregorian
calendar, MM represents the month of that year, and DD represents the day of that month.
Example 187 DATE-OF-INTEGER Function
Code:
DISPLAY FUNCTION DATE-OF-INTEGER (1)
DISPLAY FUNCTION DATE-OF-INTEGER (365)
DISPLAY FUNCTION DATE-OF-INTEGER (36500)
DISPLAY FUNCTION DATE-OF-INTEGER (12345)
DISPLAY FUNCTION DATE-OF-INTEGER (100000)
Output:
16010101
16011231
17001207
16341019
18741016
DAY-OF-INTEGER Function
DAY-OF-INTEGER, an integer function, converts a date in the Gregorian calendar from integer
date form to Julian date form (YYYYDDD ).
argument
is a positive integer that represents a number of days since December 31, 1600, in the
Gregorian calendar.
The returned value is of the form YYYYDDD, where YYYY represents the year in the Gregorian
calendar and DDD represents the day of that year.
DATE-OF-INTEGER Function 665










