<?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: How to add next content based on defined variable? in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-add-next-content-based-on-defined-variable/m-p/263328#M7247</link>
    <description>&lt;P&gt;Just a&amp;nbsp;conditional assignment and an explicit output in a data step-&lt;/P&gt;</description>
    <pubDate>Tue, 12 Apr 2016 20:02:53 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2016-04-12T20:02:53Z</dc:date>
    <item>
      <title>How to add next content based on defined variable?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-add-next-content-based-on-defined-variable/m-p/263322#M7245</link>
      <description>&lt;P&gt;Hello, all:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My oringinal data set has "MSM" in variable&amp;nbsp;"Risk" corespored to "Man" in variable "Race".&amp;nbsp;&amp;nbsp; Now,&amp;nbsp;I would like to add one more&amp;nbsp;"All" in variable "Race" when there are either "MSM" or "MSM-B" in variable "Risk".&amp;nbsp; The final format example is shown below.&amp;nbsp; How to approach this?&amp;nbsp; Please help.&amp;nbsp; Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oringinal format:&lt;/P&gt;&lt;P&gt;Risk&amp;nbsp; Race&lt;/P&gt;&lt;P&gt;MSM&amp;nbsp; Man&lt;/P&gt;&lt;P&gt;MSM-B&amp;nbsp; Man&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Final format:&lt;/P&gt;&lt;P&gt;Risk&amp;nbsp; Race&lt;/P&gt;&lt;P&gt;MSM&amp;nbsp; All&lt;/P&gt;&lt;P&gt;MSM&amp;nbsp; Man&lt;/P&gt;&lt;P&gt;MSM-B&amp;nbsp; All&lt;/P&gt;&lt;P&gt;MSM-B&amp;nbsp; Man&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 19:43:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-add-next-content-based-on-defined-variable/m-p/263322#M7245</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2016-04-12T19:43:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to add next content based on defined variable?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-add-next-content-based-on-defined-variable/m-p/263328#M7247</link>
      <description>&lt;P&gt;Just a&amp;nbsp;conditional assignment and an explicit output in a data step-&lt;/P&gt;</description>
      <pubDate>Tue, 12 Apr 2016 20:02:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-add-next-content-based-on-defined-variable/m-p/263328#M7247</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-04-12T20:02:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to add next content based on defined variable?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/How-to-add-next-content-based-on-defined-variable/m-p/263503#M7250</link>
      <description>&lt;P&gt;I wrote the code below&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;Data&lt;/STRONG&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; A;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;set&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; B;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;if&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; RISK in (&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'MSM'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;, &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'MSM-B'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;) &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;then&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt; RACE=&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;&lt;FONT color="#800080" face="Courier New" size="2"&gt;'Man'&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;run&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;I got the result for replacing the "All" with "Man".&amp;nbsp; However, I couldn't get extra line for "All".&amp;nbsp; How to get "All" and "Man" together to corresponded to "MSM" and "MSM-B"?&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Oringinal format:&lt;/P&gt;&lt;P&gt;Risk&amp;nbsp; Race&lt;/P&gt;&lt;P&gt;MSM&amp;nbsp; All&lt;/P&gt;&lt;P&gt;MSM-B&amp;nbsp; All&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My&amp;nbsp;SAS format:&lt;/P&gt;&lt;P&gt;Risk&amp;nbsp; Race&lt;/P&gt;&lt;P&gt;MSM&amp;nbsp; Man&lt;/P&gt;&lt;P&gt;MSM-B&amp;nbsp; Man&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;The final format I would like to modify is:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Risk&amp;nbsp; Race&lt;/P&gt;&lt;P&gt;MSM&amp;nbsp; All&lt;/P&gt;&lt;P&gt;MSM&amp;nbsp; Man&lt;/P&gt;&lt;P&gt;MSM-B&amp;nbsp; All&lt;/P&gt;&lt;P&gt;MSM-B&amp;nbsp; Man&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New" size="2"&gt;&lt;FONT face="Courier New" size="2"&gt;&amp;nbsp;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Apr 2016 13:35:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/How-to-add-next-content-based-on-defined-variable/m-p/263503#M7250</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2016-04-13T13:35:52Z</dc:date>
    </item>
  </channel>
</rss>

