So far as I can see, there is not a SAS-like common internal date format that
can be used to compare dates, which leads me to believe that I've got to
parse these dates and do it the hard way -- year to year, month to month,
etc. As I'm a newbie in REXX, I could be totally wrong.
Any thoughts on how I might do this in REXX would be appreciated.
-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own
>I am trying to compare the current date with a range of dates -- ie,
>current date is 4/13/99, and the range is 4/10/99 - 4/30/99; question: is
>the current date in the range.
Use the date conversion capabilities of the DATE built-in function
available in the recent releases of TSO/E. For example,
DATE('B','04/13/99','U')
returns the number of days since the virtual origin of our calendar. Once
you've converted the two dates to a number of days, it's easy to compare
them. Make sure you provide the input date in the proper format, the DATE
function is quite touchy on this subject.
Gilbert Saint-flour <g...@ibm.net>
I have this code in a REXX exec.
" PriSDate=word(PriRec,1)
PriSCnt=DATE('B',PriSDate,'U') "
The intent is to convert PriSDate, a character date value from record PriRec,
into a number which can be used to compare the date with another date. When I
run the code across 90 or so MVS ESA images, about half work. The other have
return this:
99 +++ PriSCnt=DATE('B',date())
IRX0040I Error running MVSCALL, line 99: Incorrect call to routine
***
Any hints on what might be causing this problem would be most appreciated.
As a side note, I am using the 'Rexx in the TSO Environment' and Ranade's
'Programming In Rexx' books as my primary manuals. Neither mentions the
ability to have multiple parms for the DATE function -- only one. If anyone
happens to know of a manual which talks about this expanded parameter list
ability, I'd appreciate learning of it.
Thank you.
Regards, Ron MacRae.
bill...@my-dejanews.com wrote in message
<7g596o$h0u$1...@nnrp1.dejanews.com>...
>I have this code in a REXX exec.
>
>" PriSDate=word(PriRec,1)
> PriSCnt=DATE('B',PriSDate,'U') "