<?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: Create new variable in dataset in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-dataset/m-p/520219#M3986</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/227522"&gt;@sasnewbie5&lt;/a&gt;&amp;nbsp;. Please look into this video, it may be a good reference point for importing external data into SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://video.sas.com/detail/video/4573016758001/creating-a-sas-table-from-a-csv-file" target="_blank"&gt;https://video.sas.com/detail/video/4573016758001/creating-a-sas-table-from-a-csv-file&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 11 Dec 2018 01:46:41 GMT</pubDate>
    <dc:creator>r_behata</dc:creator>
    <dc:date>2018-12-11T01:46:41Z</dc:date>
    <item>
      <title>Create new variable in dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-dataset/m-p/520215#M3982</link>
      <description>&lt;P&gt;I need to create a new variable that contains the first and last name from my dataset. The code I have is as follows:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data hw9.combo;
	infile "/folders/myfolders/hw9/combo";
	input name = firstname + lastname;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;I get the following errors when trying to run it:&lt;/P&gt;&lt;DIV class="sasNote"&gt;&lt;STRONG&gt;NOTE: Variable lastname is uninitialized.&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&lt;STRONG&gt;ERROR: Physical file does not exist, /folders/myfolders/hw9/combo.&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV class="sasError"&gt;Can anyone help me resolve this? I'm using SAS university edition, which is why I did the file location that way.&lt;/DIV&gt;</description>
      <pubDate>Tue, 11 Dec 2018 01:13:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-dataset/m-p/520215#M3982</guid>
      <dc:creator>sasnewbie5</dc:creator>
      <dc:date>2018-12-11T01:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create new variable in dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-dataset/m-p/520219#M3986</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/227522"&gt;@sasnewbie5&lt;/a&gt;&amp;nbsp;. Please look into this video, it may be a good reference point for importing external data into SAS.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://video.sas.com/detail/video/4573016758001/creating-a-sas-table-from-a-csv-file" target="_blank"&gt;https://video.sas.com/detail/video/4573016758001/creating-a-sas-table-from-a-csv-file&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 01:46:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-dataset/m-p/520219#M3986</guid>
      <dc:creator>r_behata</dc:creator>
      <dc:date>2018-12-11T01:46:41Z</dc:date>
    </item>
    <item>
      <title>Re: Create new variable in dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-dataset/m-p/520230#M3991</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/227522"&gt;@sasnewbie5&lt;/a&gt; wrote&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token procnames"&gt;data&lt;/SPAN&gt;&lt;SPAN&gt; hw9&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;.&lt;/SPAN&gt;&lt;SPAN&gt;combo&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token statement"&gt;infile&lt;/SPAN&gt; &lt;SPAN class="token string"&gt;"/folders/myfolders/hw9/combo"&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token keyword"&gt;input&lt;/SPAN&gt;&lt;SPAN&gt; name &lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;=&lt;/SPAN&gt;&lt;SPAN&gt; f&lt;/SPAN&gt;&lt;SPAN&gt;irstname &lt;/SPAN&gt;&lt;SPAN class="token operator"&gt;+&lt;/SPAN&gt;&lt;SPAN&gt; lastname&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN class="token procnames"&gt;run&lt;/SPAN&gt;&lt;SPAN class="token punctuation"&gt;;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;we don't add character variables.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;one way to create a new variable name would be&lt;/P&gt;
&lt;P&gt;name = firstname || ' ' || lastname;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 03:26:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-dataset/m-p/520230#M3991</guid>
      <dc:creator>VDD</dc:creator>
      <dc:date>2018-12-11T03:26:21Z</dc:date>
    </item>
    <item>
      <title>Re: Create new variable in dataset</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-dataset/m-p/520444#M4028</link>
      <description>&lt;P&gt;First thing will be to get the name of the file to read correct.&lt;/P&gt;
&lt;P&gt;Second while + is acceptable on an input statement it is used to move a read pointer. The = would not be.&lt;/P&gt;
&lt;P&gt;Read the variables then manipulate them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 11 Dec 2018 17:08:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Create-new-variable-in-dataset/m-p/520444#M4028</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2018-12-11T17:08:28Z</dc:date>
    </item>
  </channel>
</rss>

