<?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: Recoding blank responses in a string of similar variables - help needed in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Recoding-blank-responses-in-a-string-of-similar-variables-help/m-p/665089#M198791</link>
    <description>&lt;P&gt;Thank you very much.&amp;nbsp; It worked.&amp;nbsp; Not sure if I will keep blanks or recode to another value, so I just used 5 as an example.&lt;/P&gt;</description>
    <pubDate>Thu, 25 Jun 2020 17:36:29 GMT</pubDate>
    <dc:creator>Bluekeys49</dc:creator>
    <dc:date>2020-06-25T17:36:29Z</dc:date>
    <item>
      <title>Recoding blank responses in a string of similar variables - help needed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recoding-blank-responses-in-a-string-of-similar-variables-help/m-p/664636#M198594</link>
      <description>&lt;P&gt;I have 30 survey variables, named AB_1, AB_2, AB,_3,...,AB_30.&amp;nbsp; Most of these variables contain a survey response, either answer choice A, B, or C.&amp;nbsp; In some cases, the responses are blank.&amp;nbsp; How do I change all blank responses to a code of 5?&amp;nbsp; I know there has to be as shorter way rather than me coding out&lt;/P&gt;&lt;P&gt;if AB_1 = ' ' then AB_1 = '5';&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: inherit; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 1.7142; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;if AB_2 = ' ' then AB_2 = '5';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: inherit; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 1.7142; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;if AB_3 = ' ' then AB_3 = '5';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: inherit; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 1.7142; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: inherit; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 1.7142; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: inherit; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 1.7142; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;if AB_30 = ' ' then AB_30 = '5';&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: #ffffff; color: #333333; cursor: text; font-family: inherit; font-size: 16px; font-style: normal; font-variant: normal; font-weight: 300; letter-spacing: normal; line-height: 1.7142; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;Thanks for any help!&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 14:01:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recoding-blank-responses-in-a-string-of-similar-variables-help/m-p/664636#M198594</guid>
      <dc:creator>Bluekeys49</dc:creator>
      <dc:date>2020-06-24T14:01:32Z</dc:date>
    </item>
    <item>
      <title>Re: Recoding blank responses in a string of similar variables - help needed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recoding-blank-responses-in-a-string-of-similar-variables-help/m-p/664639#M198595</link>
      <description>&lt;P&gt;This is a job for an ARRAY.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
    set have;
    array ar ar_1-ar_30;
    do i=1 to dim(ar);
        if ar(i)=' ' then ar(i)='5';
    end;
    drop i;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Although, I do feel the need to ask — why do you need to do this? What can you do with a &lt;FONT face="courier new,courier"&gt;'5'&lt;/FONT&gt; that you can't do with a &lt;FONT face="courier new,courier"&gt;' '&lt;/FONT&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 24 Jun 2020 16:26:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recoding-blank-responses-in-a-string-of-similar-variables-help/m-p/664639#M198595</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2020-06-24T16:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Recoding blank responses in a string of similar variables - help needed</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Recoding-blank-responses-in-a-string-of-similar-variables-help/m-p/665089#M198791</link>
      <description>&lt;P&gt;Thank you very much.&amp;nbsp; It worked.&amp;nbsp; Not sure if I will keep blanks or recode to another value, so I just used 5 as an example.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jun 2020 17:36:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Recoding-blank-responses-in-a-string-of-similar-variables-help/m-p/665089#M198791</guid>
      <dc:creator>Bluekeys49</dc:creator>
      <dc:date>2020-06-25T17:36:29Z</dc:date>
    </item>
  </channel>
</rss>

