The problem is with the (year/4)  it should be (year//4) 

That is 

5 *-* day = (year + (year // 4) + jday) // 7
  >V>   "2003"                              
  >V>   "2003"                              
  >L>   "4"                                 
  >O>   "3"                                 
  >O>   "2006"                              
  >V>   "147"                               
  >O>   "2153"                              
  >L>   "7"                                 
  >O>   "4"                                 

Kenneth Leidner
Imagination is more important than knowledge.

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of Baraniecki, Ray
Sent: Thursday, May 26, 2005 3:09 PM
To: [email protected]
Subject: Rexx Question

I am performing the following instructions "
If year > "1900" Then year = year - 1
day = (year + (year / 4) + jday) // 7" in the hope of receiving an
answer ranging from 1 through 7. 
When the year = 2004 and the julian day = 147 I get a result of 4.75. I
was expecting an answer of 4 which would indicate Wednesday.

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to