<?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: Adding new varibale in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Adding-new-varibale/m-p/50460#M13784</link>
    <description>Share info about what you would like the end result to look like - multiple observations and variables, multiple variables and one observation.  Do you want the "employ" order to be sorted, based on some component of a SAS variable or just based on the raw input occurrences?&lt;BR /&gt;
&lt;BR /&gt;
Consider using PROC TRANSPOSE if you want to have one observation in total and a unique SAS variable employee1 through employee## for each unique value.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Tue, 30 Sep 2008 14:08:55 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2008-09-30T14:08:55Z</dc:date>
    <item>
      <title>Adding new varibale</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Adding-new-varibale/m-p/50458#M13782</link>
      <description>i have a data set &lt;BR /&gt;
data i;&lt;BR /&gt;
input x;&lt;BR /&gt;
cards;&lt;BR /&gt;
7&lt;BR /&gt;
8&lt;BR /&gt;
9&lt;BR /&gt;
10&lt;BR /&gt;
11&lt;BR /&gt;
run;&lt;BR /&gt;
&lt;BR /&gt;
now i want a new variable to be addeed the variable name should be employ and the observations should be employee1,employee2,employee3,employee4,employee5.</description>
      <pubDate>Tue, 30 Sep 2008 04:47:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Adding-new-varibale/m-p/50458#M13782</guid>
      <dc:creator>R_Win</dc:creator>
      <dc:date>2008-09-30T04:47:37Z</dc:date>
    </item>
    <item>
      <title>Re: Adding new varibale</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Adding-new-varibale/m-p/50459#M13783</link>
      <description>It is not necessary to open a second thread for the same topic.&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?threadID=3901&amp;amp;tstart=15" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?threadID=3901&amp;amp;tstart=15&lt;/A&gt;&lt;BR /&gt;
&lt;BR /&gt;
Does the number in "employee1" depend on&lt;BR /&gt;
a) the number of the current obersavtion,&lt;BR /&gt;
b) any other variable in that oberservation?&lt;BR /&gt;
&lt;BR /&gt;
One possible solution:&lt;BR /&gt;
[pre]&lt;BR /&gt;
data work.extended;&lt;BR /&gt;
  set i;&lt;BR /&gt;
  length employ $ 15; /* defines a character-variable, with enough space for 15 chars */&lt;BR /&gt;
  employ = cat('employee', _n_); /* _n_ = the number of the current obersvation */&lt;BR /&gt;
run;&lt;BR /&gt;
[/pre]</description>
      <pubDate>Tue, 30 Sep 2008 06:34:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Adding-new-varibale/m-p/50459#M13783</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2008-09-30T06:34:01Z</dc:date>
    </item>
    <item>
      <title>Re: Adding new varibale</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Adding-new-varibale/m-p/50460#M13784</link>
      <description>Share info about what you would like the end result to look like - multiple observations and variables, multiple variables and one observation.  Do you want the "employ" order to be sorted, based on some component of a SAS variable or just based on the raw input occurrences?&lt;BR /&gt;
&lt;BR /&gt;
Consider using PROC TRANSPOSE if you want to have one observation in total and a unique SAS variable employee1 through employee## for each unique value.&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 30 Sep 2008 14:08:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Adding-new-varibale/m-p/50460#M13784</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2008-09-30T14:08:55Z</dc:date>
    </item>
  </channel>
</rss>

