<?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: Matching year with marital status in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Matching-year-with-marital-status/m-p/104357#M29159</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Status=ifc(vvaluex("M_"||put(year_purchase, 4.))=1, "Married", "Divorced");&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 12 Jun 2013 19:56:35 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2013-06-12T19:56:35Z</dc:date>
    <item>
      <title>Matching year with marital status</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Matching-year-with-marital-status/m-p/104354#M29156</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This follows from a question I'd posted earlier. My data looks like this, each person's purchase of a particular product at a given year...and his/her marital status over the years (Married or Divorced). I need a single column that will give me the marital status according to year of purchase. So for person 1, the STATUS should be Married, person 2 Married, person 3 Divorced etc.&lt;/P&gt;&lt;P&gt;How can I get at this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="0" cellpadding="0" cellspacing="0" height="192" jive-data-cell="{&amp;quot;color&amp;quot;:&amp;quot;#575757&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;left&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;NaN&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;transparent&amp;quot;,&amp;quot;fontFamily&amp;quot;:&amp;quot;arial,helvetica,sans-serif&amp;quot;}" jive-data-header="{&amp;quot;color&amp;quot;:&amp;quot;#FFFFFF&amp;quot;,&amp;quot;backgroundColor&amp;quot;:&amp;quot;#6690BC&amp;quot;,&amp;quot;textAlign&amp;quot;:&amp;quot;center&amp;quot;,&amp;quot;padding&amp;quot;:&amp;quot;2&amp;quot;}" style="width: 765px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="border: 0px solid black;" width="64"&gt; Person&lt;/TD&gt;&lt;TD class="xl69" style="border: 0px solid black; border-left: none;" width="64"&gt;Year of purchase&lt;/TD&gt;&lt;TD class="xl69" style="border: 0px solid black; border-left: none;" width="64"&gt;M_2009&lt;/TD&gt;&lt;TD class="xl69" style="border: 0px solid black; border-left: none;" width="64"&gt;M_2010&lt;/TD&gt;&lt;TD class="xl69" style="border: 0px solid black; border-left: none;" width="64"&gt;M_2011&lt;/TD&gt;&lt;TD class="xl69" style="border: 0px solid black; border-left: none;" width="64"&gt;M_2012&lt;/TD&gt;&lt;TD class="xl69" style="border: 0px solid black; border-left: none;" width="64"&gt;D_2009&lt;/TD&gt;&lt;TD class="xl69" style="border: 0px solid black; border-left: none;" width="64"&gt;D_2010&lt;/TD&gt;&lt;TD class="xl69" style="border: 0px solid black; border-left: none;" width="64"&gt;D_2011&lt;/TD&gt;&lt;TD class="xl69" style="border: 0px solid black; border-left: none;" width="64"&gt;D_2012&lt;/TD&gt;&lt;TD class="xl69" style="border: 0px solid black; border-left: none;" width="74"&gt;STATUS&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="border: 0px solid black; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2009&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;Married&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="border: 0px solid black; border-top: none;"&gt;2&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2012&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;Married&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="border: 0px solid black; border-top: none;"&gt;3&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2012&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;Divorced&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="border: 0px solid black; border-top: none;"&gt;4&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="border: 0px solid black; border-top: none;"&gt;5&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2009&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="border: 0px solid black; border-top: none;"&gt;6&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2010&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD class="xl69" height="20" style="border: 0px solid black; border-top: none;"&gt;7&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;2011&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;1&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;0&lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt; &lt;/TD&gt;&lt;TD class="xl70" style="border: 0px solid black; border-left: none; border-top: none;"&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 18:22:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Matching-year-with-marital-status/m-p/104354#M29156</guid>
      <dc:creator>spg</dc:creator>
      <dc:date>2013-06-12T18:22:18Z</dc:date>
    </item>
    <item>
      <title>Re: Matching year with marital status</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Matching-year-with-marital-status/m-p/104355#M29157</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try the vvaluex function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 18:36:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Matching-year-with-marital-status/m-p/104355#M29157</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-06-12T18:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Matching year with marital status</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Matching-year-with-marital-status/m-p/104356#M29158</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Untested, but it should be working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data want;&lt;/P&gt;&lt;P&gt;set have;&lt;/P&gt;&lt;P&gt;array marr {2009:2012} M_2009 - M_2012;&lt;/P&gt;&lt;P&gt;length status $ 8;&lt;/P&gt;&lt;P&gt;if marr{year}=1 then status='Married';&lt;/P&gt;&lt;P&gt;else status='Divorced';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;I guess if I were looking for job security, I might code this after the LENGTH statement:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;status=substr('DivorcedMarried ', 1 + marr{year}*8, 8);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All the code does assume that Year is always within range, always takes on the right value, and that the Divorced/Married pairs are always the opposite of one another for any given year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 19:42:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Matching-year-with-marital-status/m-p/104356#M29158</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2013-06-12T19:42:44Z</dc:date>
    </item>
    <item>
      <title>Re: Matching year with marital status</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Matching-year-with-marital-status/m-p/104357#M29159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; set have;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Status=ifc(vvaluex("M_"||put(year_purchase, 4.))=1, "Married", "Divorced");&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Jun 2013 19:56:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Matching-year-with-marital-status/m-p/104357#M29159</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2013-06-12T19:56:35Z</dc:date>
    </item>
  </channel>
</rss>

