<?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 assign &amp;quot;All' in the blank cell for different variables (race, age, sex, risk)? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-assign-quot-All-in-the-blank-cell-for-different-variables/m-p/259756#M50292</link>
    <description>Or use formats, that wouldn't require any data updates.</description>
    <pubDate>Tue, 29 Mar 2016 16:01:47 GMT</pubDate>
    <dc:creator>LinusH</dc:creator>
    <dc:date>2016-03-29T16:01:47Z</dc:date>
    <item>
      <title>How to assign "All' in the blank cell for different variables (race, age, sex, risk)?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-assign-quot-All-in-the-blank-cell-for-different-variables/m-p/259744#M50286</link>
      <description>&lt;P&gt;Hello:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to&amp;nbsp;assign "All' in the blank cell for different variables (race, age, sex, risk)?&amp;nbsp; I wrote the code below, however it didn't work.&amp;nbsp; Any idea how?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; X=RISK; &lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#0000ff" face="Courier New" size="2"&gt;%let&lt;/FONT&gt;&lt;FONT face="Courier New" size="2"&gt; X=AGE;&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;%let&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; X=SEX;&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;%let&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; X=RACE;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;data&lt;/STRONG&gt;&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; A;&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;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; &amp;amp;X=&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;" "&lt;/FONT&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; &amp;amp;X=&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;"All"&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="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;FONT color="#000080" face="Courier New" size="2"&gt;&lt;STRONG&gt;run&lt;/STRONG&gt;&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 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>Tue, 29 Mar 2016 15:43:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-assign-quot-All-in-the-blank-cell-for-different-variables/m-p/259744#M50286</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2016-03-29T15:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign "All' in the blank cell for different variables (race, age, sex, risk)?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-assign-quot-All-in-the-blank-cell-for-different-variables/m-p/259745#M50287</link>
      <description>&lt;P&gt;Check what your code will resolve to:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data A;
SET B;
If RACE=" " then RACE="All";
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;I'm guessing that's not what you want?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not to sound like a broken record, but you probably don't need a macro here either.&lt;/P&gt;
&lt;P&gt;Post what your data looks like and what you're trying to achieve.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 15:47:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-assign-quot-All-in-the-blank-cell-for-different-variables/m-p/259745#M50287</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-29T15:47:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign "All' in the blank cell for different variables (race, age, sex, risk)?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-assign-quot-All-in-the-blank-cell-for-different-variables/m-p/259751#M50289</link>
      <description>&lt;P&gt;I'm guessing that this may be what you want:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data a;
   set b;
   array x Risk Age Sex Race;
   /* since you attempting to assign a value of "All" I have to assume the above variables are all character*/
   do i = 1 to dim(r);
      If missing(r[i]) then r[i] = 'All';
   end;
   drop i;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;But&amp;nbsp; if this a data set to export and look like a report then I suggest it is often better to just use a report procedure.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you have summary rows in data then you are asking for confusion is someone else uses the data set. Or if you have it around long enough to forget the summary.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 15:54:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-assign-quot-All-in-the-blank-cell-for-different-variables/m-p/259751#M50289</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2016-03-29T15:54:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign "All' in the blank cell for different variables (race, age, sex, risk)?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-assign-quot-All-in-the-blank-cell-for-different-variables/m-p/259756#M50292</link>
      <description>Or use formats, that wouldn't require any data updates.</description>
      <pubDate>Tue, 29 Mar 2016 16:01:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-assign-quot-All-in-the-blank-cell-for-different-variables/m-p/259756#M50292</guid>
      <dc:creator>LinusH</dc:creator>
      <dc:date>2016-03-29T16:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign "All' in the blank cell for different variables (race, age, sex, risk)?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-assign-quot-All-in-the-blank-cell-for-different-variables/m-p/259775#M50301</link>
      <description>&lt;P&gt;Thanks for the great suggestion, it works! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 16:40:53 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-assign-quot-All-in-the-blank-cell-for-different-variables/m-p/259775#M50301</guid>
      <dc:creator>ybz12003</dc:creator>
      <dc:date>2016-03-29T16:40:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to assign "All' in the blank cell for different variables (race, age, sex, risk)?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-assign-quot-All-in-the-blank-cell-for-different-variables/m-p/259777#M50302</link>
      <description>&lt;P&gt;You may also want to back up a step - depending on how you're calculating things you may be able to avoid the missing in the first place.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Mar 2016 16:42:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-assign-quot-All-in-the-blank-cell-for-different-variables/m-p/259777#M50302</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2016-03-29T16:42:25Z</dc:date>
    </item>
  </channel>
</rss>

