<?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: Input function Help in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Input-function-Help/m-p/379165#M91232</link>
    <description>&lt;P&gt;Before any programming takes place, it is up to you to decide what you would like the result to be.&amp;nbsp; For example, you might decide that when CHECKNAME is "0-1_check" that CHECKNAME1 should be 1.&amp;nbsp; There is nothing that SAS does on its own to make those decisions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With just a few possible values for CHECKNAME, it might be as simple as this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;if checkname='0-1_check' then checkname1=1;&lt;/P&gt;
&lt;P&gt;else if checkname='1-2_check' then checkname1=2;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there are many possible values to translate, you might need to create a rule that describes the outcome, instead of a list of values.&amp;nbsp; But it all starts with you making the decisions about what the result should look like.&lt;/P&gt;</description>
    <pubDate>Tue, 25 Jul 2017 18:27:54 GMT</pubDate>
    <dc:creator>Astounding</dc:creator>
    <dc:date>2017-07-25T18:27:54Z</dc:date>
    <item>
      <title>Input function Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-function-Help/m-p/379159#M91228</link>
      <description>&lt;P&gt;How to convert the variable checkname from character to numeric?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Given data&lt;/P&gt;&lt;P&gt;Checkname&lt;BR /&gt;0-1_check&lt;BR /&gt;1-2_check&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;data want ;&lt;BR /&gt;set have;&lt;BR /&gt;checkname1=input(checkname,best12.);&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Getting missing value(Period)&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 17:57:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-function-Help/m-p/379159#M91228</guid>
      <dc:creator>Kalai2008</dc:creator>
      <dc:date>2017-07-25T17:57:02Z</dc:date>
    </item>
    <item>
      <title>Re: Input function Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-function-Help/m-p/379161#M91229</link>
      <description>&lt;P&gt;A numeric variable in SAS can not contain characters.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 17:59:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-function-Help/m-p/379161#M91229</guid>
      <dc:creator>PeterClemmensen</dc:creator>
      <dc:date>2017-07-25T17:59:03Z</dc:date>
    </item>
    <item>
      <title>Re: Input function Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-function-Help/m-p/379165#M91232</link>
      <description>&lt;P&gt;Before any programming takes place, it is up to you to decide what you would like the result to be.&amp;nbsp; For example, you might decide that when CHECKNAME is "0-1_check" that CHECKNAME1 should be 1.&amp;nbsp; There is nothing that SAS does on its own to make those decisions.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;With just a few possible values for CHECKNAME, it might be as simple as this:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data want;&lt;/P&gt;
&lt;P&gt;set have;&lt;/P&gt;
&lt;P&gt;if checkname='0-1_check' then checkname1=1;&lt;/P&gt;
&lt;P&gt;else if checkname='1-2_check' then checkname1=2;&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If there are many possible values to translate, you might need to create a rule that describes the outcome, instead of a list of values.&amp;nbsp; But it all starts with you making the decisions about what the result should look like.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 18:27:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-function-Help/m-p/379165#M91232</guid>
      <dc:creator>Astounding</dc:creator>
      <dc:date>2017-07-25T18:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Input function Help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Input-function-Help/m-p/379180#M91239</link>
      <description>&lt;P&gt;You are Right, (but it is already created by another user.)&lt;/P&gt;&lt;P&gt;Thank you , I will try renaming the variable.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 19:19:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Input-function-Help/m-p/379180#M91239</guid>
      <dc:creator>Kalai2008</dc:creator>
      <dc:date>2017-07-25T19:19:04Z</dc:date>
    </item>
  </channel>
</rss>

