<?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: identifying a particular type of value in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/identifying-a-particular-type-of-value/m-p/275696#M55150</link>
    <description>&lt;P&gt;Thankx for reaching out.&lt;/P&gt;&lt;P&gt;The data looks like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;trta_1 trta_2 trta_3 ,trtb_1 trtb_2 &amp;nbsp;trtb_3 wher trta and trtb are different drugs&lt;/P&gt;&lt;P&gt;&amp;nbsp;trta_1 and trta _2 are two different time points of the same drug.&lt;/P&gt;&lt;P&gt;trta_3 will be the sum of same drug at the different&amp;nbsp;&amp;nbsp;time point.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;trta_1 trta_2 trta_3 &amp;nbsp; &amp;nbsp;trtb_1 trtb_2 &amp;nbsp;trtb_3&lt;/P&gt;&lt;P&gt;1/5 &amp;nbsp; &amp;nbsp; 0/5 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1/5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7/5 &amp;nbsp; &amp;nbsp; &amp;nbsp;0/5 &amp;nbsp; &amp;nbsp; 7/5&lt;/P&gt;</description>
    <pubDate>Tue, 07 Jun 2016 14:58:29 GMT</pubDate>
    <dc:creator>sasq</dc:creator>
    <dc:date>2016-06-07T14:58:29Z</dc:date>
    <item>
      <title>identifying a particular type of value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identifying-a-particular-type-of-value/m-p/272452#M54190</link>
      <description>&lt;P&gt;I have various values for different variables in mutiple rows and columns showing 0/2 or 0/3 or 0/4 and so on ..&lt;/P&gt;&lt;P&gt;I have a total of 7 columns depicting treatmentand they have&amp;nbsp;values like "0/some numeral"&lt;/P&gt;&lt;P&gt;I was to assign these values a "0" value. Can anyone please tell me how do i do this?&lt;/P&gt;&lt;P&gt;I can try to use index but for multiple row and multiple column it is not reading.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 15:58:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identifying-a-particular-type-of-value/m-p/272452#M54190</guid>
      <dc:creator>sasq</dc:creator>
      <dc:date>2016-05-23T15:58:44Z</dc:date>
    </item>
    <item>
      <title>Re: identifying a particular type of value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identifying-a-particular-type-of-value/m-p/272453#M54191</link>
      <description>Test if the first position is a 0 then assign it to 0.&lt;BR /&gt;You can use an array to reuse that code.</description>
      <pubDate>Mon, 23 May 2016 16:01:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identifying-a-particular-type-of-value/m-p/272453#M54191</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-05-23T16:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: identifying a particular type of value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identifying-a-particular-type-of-value/m-p/272458#M54195</link>
      <description>&lt;P&gt;Thankx for the responce. It is not the first position. &amp;nbsp;i have 200 rows and 7 columns and these values come randomly as 0/some numeral.. So i do not know how to assign them in such scenario.&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 16:18:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identifying-a-particular-type-of-value/m-p/272458#M54195</guid>
      <dc:creator>sasq</dc:creator>
      <dc:date>2016-05-23T16:18:57Z</dc:date>
    </item>
    <item>
      <title>Re: identifying a particular type of value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identifying-a-particular-type-of-value/m-p/272489#M54206</link>
      <description>&lt;P&gt;Show some example data and the desired result.&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 17:38:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identifying-a-particular-type-of-value/m-p/272489#M54206</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-05-23T17:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: identifying a particular type of value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identifying-a-particular-type-of-value/m-p/272496#M54209</link>
      <description>&lt;P&gt;Well, you don't tell us the names of the variables, so I will call them COL1 through COL7.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is the way you would correct a single variable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if col1 =: '0/' then co1='0';&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This assumes that '0/' would appear at the beginning of the variable's value.&amp;nbsp; If that's not the case, it can be done but becomes more complex.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To apply the same logic to all 7 variables, you would use an array:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;array cols {7} col1-col7;&lt;/P&gt;
&lt;P&gt;do _n_=1 to 7;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; if cols{_n_} =: '0/' then cols{_n_} = '0';&lt;/P&gt;
&lt;P&gt;end;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Good luck.&lt;/P&gt;</description>
      <pubDate>Mon, 23 May 2016 18:12:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identifying-a-particular-type-of-value/m-p/272496#M54209</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2016-05-23T18:12:08Z</dc:date>
    </item>
    <item>
      <title>Re: identifying a particular type of value</title>
      <link>https://communities.sas.com/t5/SAS-Programming/identifying-a-particular-type-of-value/m-p/275696#M55150</link>
      <description>&lt;P&gt;Thankx for reaching out.&lt;/P&gt;&lt;P&gt;The data looks like&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;trta_1 trta_2 trta_3 ,trtb_1 trtb_2 &amp;nbsp;trtb_3 wher trta and trtb are different drugs&lt;/P&gt;&lt;P&gt;&amp;nbsp;trta_1 and trta _2 are two different time points of the same drug.&lt;/P&gt;&lt;P&gt;trta_3 will be the sum of same drug at the different&amp;nbsp;&amp;nbsp;time point.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;trta_1 trta_2 trta_3 &amp;nbsp; &amp;nbsp;trtb_1 trtb_2 &amp;nbsp;trtb_3&lt;/P&gt;&lt;P&gt;1/5 &amp;nbsp; &amp;nbsp; 0/5 &amp;nbsp; &amp;nbsp; &amp;nbsp; 1/5 &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;7/5 &amp;nbsp; &amp;nbsp; &amp;nbsp;0/5 &amp;nbsp; &amp;nbsp; 7/5&lt;/P&gt;</description>
      <pubDate>Tue, 07 Jun 2016 14:58:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/identifying-a-particular-type-of-value/m-p/275696#M55150</guid>
      <dc:creator>sasq</dc:creator>
      <dc:date>2016-06-07T14:58:29Z</dc:date>
    </item>
  </channel>
</rss>

