Page 2 of 2

Re: How to convert today's system date in to DDDDD format by

PostPosted: Tue Dec 15, 2015 4:45 pm
by enrico-sorichetti
say date("b")
say date("b","00010101","s")
say date("b","16000101","s")

say date("s",584387,"b")

Re: How to convert today's system date in to DDDDD format by

PostPosted: Tue Dec 15, 2015 7:35 pm
by NicC
If MVS Rexx has had the date processing enhancements:

get base date (todays_base_date = date('b'))
take 400 days off (todays_base_date_minus_400 = bdate - 400)
get base date of 1/1/1600 (base_date_1600 = date('b','16000101','s'))
target_date = todays_base=date_minus_400 - base_date_1600

and whatever other process you need

Re: How to convert today's system date in to DDDDD format by

PostPosted: Tue Dec 15, 2015 7:54 pm
by Akatsukami
gauravnnl wrote:Hi All,

I want to know, how to convert today's system date(YYYYMMDD) in DDDDD format by JCL/Sort card. My requirement is to delete records from the file which have transaction date older than 400 days from today's day, but transaction date is in DDDDD format.

There is a solution given to a very similar problem on our sister forum.

Re: How to convert today's system date in to DDDDD format by

PostPosted: Tue Dec 15, 2015 8:41 pm
by BillyBoyo
Ah, but that one is the other way around.

There are some algorithms: http://mathforum.org/library/drmath/view/51907.html