I have a requirement. I need to compare the dates in a dataset (i.e. the records that fall between the current date and current date+16 days) and extract those records.
I'm stucking at how to get current date+16 day.
Please let me know if it possible. I'm using INCLUDE OPTION.
Joined: 15 Feb 2005 Posts: 7129 Location: San Jose, CA
DFSORT doesn't have a built-in function for relative dates, but you can use REXX to create a DFSORT symbol for the relative date that you can use. For an example, see:
I'm not a REXX expert, so I can't tell you how to do it for different types of dates, but I'm sure one of the REXX experts could if you don't know how to do it yourself.
Here is what you are looking for.
I modified the rexx from
search390.techtarget.com/tip/1,289483,sid10_gci817030,00.html
to your specific need.
Play with ADD_DAYS to do your own tests.
I have coded some SAY in the rexx to check the result.
At this time DATE rexx function in MVS (and VM) can't do that as easily as shown in the Frank's smart trick.
So, that's why I was late to reply to your need : I have opened 2 PMR (?) to suggest the rexx team to implement this.
I wait for the feedback if they accept or not to extend that 'new' functions in VM & MVS.
say "Standard Date: "DATE("S",Julian_Date,"J")
say "european Date: "DATE("E",Julian_Date,"J")
say "USA Date : "DATE("U",Julian_Date,"J")
say "Julian Date : "Julian_Date