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



IBM's flagship sort product DFSORT for sorting, merging, copying, data manipulation and reporting. Includes ICETOOL and ICEGENER

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

Postby enrico-sorichetti » Tue Dec 15, 2015 4:45 pm

say date("b")
say date("b","00010101","s")
say date("b","16000101","s")

say date("s",584387,"b")
cheers
enrico
When I tell somebody to RTFM or STFW I usually have the page open in another tab/window of my browser,
so that I am sure that the information requested can be reached with a very small effort
enrico-sorichetti
Global moderator
 
Posts: 2643
Joined: Fri Apr 18, 2008 11:25 pm
Has thanked: 0 time
Been thanked: 130 times

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

 

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

Postby NicC » Tue Dec 15, 2015 7:35 pm

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
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 2690
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisys (almost)
Has thanked: 4 times
Been thanked: 105 times

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

Postby Akatsukami » Tue Dec 15, 2015 7:54 pm

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.
"You have sat too long for any good you have been doing lately ... Depart, I say; and let us have done with you. In the name of God, go!" -- what I say to a junior programmer at least once a day
User avatar
Akatsukami
Global moderator
 
Posts: 1053
Joined: Sat Oct 16, 2010 2:31 am
Location: Bloomington, IL
Has thanked: 6 times
Been thanked: 51 times

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

Postby BillyBoyo » Tue Dec 15, 2015 8:41 pm

Ah, but that one is the other way around.

There are some algorithms: http://mathforum.org/library/drmath/view/51907.html
BillyBoyo
Global moderator
 
Posts: 3804
Joined: Tue Jan 25, 2011 12:02 am
Has thanked: 22 times
Been thanked: 264 times

Previous

Return to DFSORT/ICETOOL/ICEGENER

 


  • Related topics
    Replies
    Views
    Last post