<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: DCL Question in Operating System - OpenVMS</title>
    <link>https://community.hpe.com/t5/operating-system-openvms/dcl-question/m-p/4178602#M89415</link>
    <description>&lt;!--!*#--&gt;How about something simple like:&lt;BR /&gt;&lt;BR /&gt;$ day = f$cvtime(,,"DAY")&lt;BR /&gt;$ week = (day-1)/7 + 1&lt;BR /&gt;&lt;BR /&gt;Which returns the week number for the current day.  If you want the week number for the upcoming Thursday if today is not Thurdsay then just add a loop.&lt;BR /&gt;&lt;BR /&gt;$ I = -1&lt;BR /&gt;$LP:&lt;BR /&gt;$ I = I+1&lt;BR /&gt;$ DATE = F$CVTIME("+''I'-","ABSOLUTE","DATE")&lt;BR /&gt;$ IF F$CVTIME(DATE,,"WEEKDAY").NES."Thursday" THEN -&lt;BR /&gt;$  GOTO LP&lt;BR /&gt;$ DAY = F$CVTIME(DATE,,"DAY")&lt;BR /&gt;$ WEEK = (DAY-1)/7 + 1 &lt;BR /&gt;</description>
    <pubDate>Fri, 11 Apr 2008 17:03:29 GMT</pubDate>
    <dc:creator>Jess Goodman</dc:creator>
    <dc:date>2008-04-11T17:03:29Z</dc:date>
    <item>
      <title>DCL Question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-question/m-p/4178598#M89411</link>
      <description>How can I use DCL to deternmine the current Thursday is which week number of the month?</description>
      <pubDate>Fri, 11 Apr 2008 16:26:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-question/m-p/4178598#M89411</guid>
      <dc:creator>Gilbert Pereira</dc:creator>
      <dc:date>2008-04-11T16:26:58Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-question/m-p/4178599#M89412</link>
      <description>You want to know if it is the first, second, third, fourth, or fifth Thursday of the month, correct?</description>
      <pubDate>Fri, 11 Apr 2008 16:33:33 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-question/m-p/4178599#M89412</guid>
      <dc:creator>Homer Shoemaker</dc:creator>
      <dc:date>2008-04-11T16:33:33Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-question/m-p/4178600#M89413</link>
      <description>Yes that is correct</description>
      <pubDate>Fri, 11 Apr 2008 16:34:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-question/m-p/4178600#M89413</guid>
      <dc:creator>Gilbert Pereira</dc:creator>
      <dc:date>2008-04-11T16:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-question/m-p/4178601#M89414</link>
      <description>&lt;!--!*#--&gt;Just do a quick loop subtracting weeks (7 days) untill teh month changes:&lt;BR /&gt;&lt;BR /&gt;$ week = 0&lt;BR /&gt;$ this_month = f$cvtime(,,"MONTH")&lt;BR /&gt;$loop:&lt;BR /&gt;$ week = week + 1&lt;BR /&gt;$ days = week * 7&lt;BR /&gt;$ if this_month.eqs.f$cvtime("-''days'-",,"MONTH") then goto loop&lt;BR /&gt;$ write sys$output "Today is ", f$cvtime(,,"WEEKDAY"), " number : ", week&lt;BR /&gt;$ exit&lt;BR /&gt;&lt;BR /&gt;hth,&lt;BR /&gt;Hein.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Apr 2008 17:02:48 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-question/m-p/4178601#M89414</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2008-04-11T17:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-question/m-p/4178602#M89415</link>
      <description>&lt;!--!*#--&gt;How about something simple like:&lt;BR /&gt;&lt;BR /&gt;$ day = f$cvtime(,,"DAY")&lt;BR /&gt;$ week = (day-1)/7 + 1&lt;BR /&gt;&lt;BR /&gt;Which returns the week number for the current day.  If you want the week number for the upcoming Thursday if today is not Thurdsay then just add a loop.&lt;BR /&gt;&lt;BR /&gt;$ I = -1&lt;BR /&gt;$LP:&lt;BR /&gt;$ I = I+1&lt;BR /&gt;$ DATE = F$CVTIME("+''I'-","ABSOLUTE","DATE")&lt;BR /&gt;$ IF F$CVTIME(DATE,,"WEEKDAY").NES."Thursday" THEN -&lt;BR /&gt;$  GOTO LP&lt;BR /&gt;$ DAY = F$CVTIME(DATE,,"DAY")&lt;BR /&gt;$ WEEK = (DAY-1)/7 + 1 &lt;BR /&gt;</description>
      <pubDate>Fri, 11 Apr 2008 17:03:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-question/m-p/4178602#M89415</guid>
      <dc:creator>Jess Goodman</dc:creator>
      <dc:date>2008-04-11T17:03:29Z</dc:date>
    </item>
    <item>
      <title>Re: DCL Question</title>
      <link>https://community.hpe.com/t5/operating-system-openvms/dcl-question/m-p/4178603#M89416</link>
      <description>&lt;!--!*#--&gt;Oops, I was thinking of something more elaborate, counting up or down to deal with months.&lt;BR /&gt;&lt;BR /&gt;if it is Thursday, then current Thursday is of course simply&lt;BR /&gt;&lt;BR /&gt;write sys$output f$cvtime(,,"DAY")+6)/7&lt;BR /&gt;&lt;BR /&gt;The "next Thursday" is:&lt;BR /&gt;&lt;BR /&gt;$ days_till_next_thursday = f$loc(f$ext(0,2,f$cvt(,,"WEEKDAY")),"xxWeTuMoSuSaFrTu")/2&lt;BR /&gt;$ write sys$output "Next Thursday is Thursday number : ", -&lt;BR /&gt; (6+f$cvt("+''days_till_next_thursday'-",,"DAY"))/7&lt;BR /&gt;Next Thursday is Thursday number : 3&lt;BR /&gt;&lt;BR /&gt;Drop the "xx" depending on how you want to deal with cotay being a Thursday or not.&lt;BR /&gt;&lt;BR /&gt;Hein.&lt;BR /&gt;</description>
      <pubDate>Fri, 11 Apr 2008 17:28:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-openvms/dcl-question/m-p/4178603#M89416</guid>
      <dc:creator>Hein van den Heuvel</dc:creator>
      <dc:date>2008-04-11T17:28:45Z</dc:date>
    </item>
  </channel>
</rss>

