<?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: creating a dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/creating-a-dataset/m-p/12643#M1392</link>
    <description>Are you asking a question, posing a problem, or simply wanting someone to do the work for you?  Have you made any attempt to program in SAS the task you describe in your post?&lt;BR /&gt;
&lt;BR /&gt;
Your post mentions "score value must be equals to that ID variable" yet the desired output you share with the forum does not match this condition.&lt;BR /&gt;
&lt;BR /&gt;
From what I see, it appears that you want to use some technique to group your data on the SAMP variable, capturing the "last" (or maybe first?) non-missing SCORE variable value, but only if contributed by an observation having an ID variable in length greater than 5 characters.&lt;BR /&gt;
&lt;BR /&gt;
An additional SAS DATA step could be used against your data set "A", after first sorting the data, and using a RETAIN statement to save the SCORE value in another variable when the appropriate ID and SAMP variable conditions are met.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
    <pubDate>Mon, 30 Mar 2009 10:06:48 GMT</pubDate>
    <dc:creator>sbb</dc:creator>
    <dc:date>2009-03-30T10:06:48Z</dc:date>
    <item>
      <title>creating a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-dataset/m-p/12642#M1391</link>
      <description>Hi,&lt;BR /&gt;
&lt;BR /&gt;
i have a dataset A and it consists 3 variables id, samp , score.&lt;BR /&gt;
&lt;BR /&gt;
data A;&lt;BR /&gt;
input id  $  samp    score ;&lt;BR /&gt;
datalines;&lt;BR /&gt;
1002345A      1     .&lt;BR /&gt;
1003678A      1   .&lt;BR /&gt;
3                   1  708&lt;BR /&gt;
4                   1   .&lt;BR /&gt;
5                   1   .&lt;BR /&gt;
10                  2   .&lt;BR /&gt;
11                  2   807&lt;BR /&gt;
12329874H     2   .&lt;BR /&gt;
12                  2   .&lt;BR /&gt;
1                  3  907&lt;BR /&gt;
23456899J     3  .&lt;BR /&gt;
;&lt;BR /&gt;
&lt;BR /&gt;
i want an output      :      id variable length greater then 5  and by group of samp variable,   the score value must be equals to that ID variable.&lt;BR /&gt;
&lt;BR /&gt;
the output should be in the following way:&lt;BR /&gt;
&lt;BR /&gt;
output:&lt;BR /&gt;
&lt;BR /&gt;
id                    samp    score&lt;BR /&gt;
1002345A            1        708&lt;BR /&gt;
1003678A            1          .&lt;BR /&gt;
12329874H          2         807&lt;BR /&gt;
23456899J           3         907</description>
      <pubDate>Mon, 30 Mar 2009 05:37:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-dataset/m-p/12642#M1391</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-30T05:37:23Z</dc:date>
    </item>
    <item>
      <title>Re: creating a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-dataset/m-p/12643#M1392</link>
      <description>Are you asking a question, posing a problem, or simply wanting someone to do the work for you?  Have you made any attempt to program in SAS the task you describe in your post?&lt;BR /&gt;
&lt;BR /&gt;
Your post mentions "score value must be equals to that ID variable" yet the desired output you share with the forum does not match this condition.&lt;BR /&gt;
&lt;BR /&gt;
From what I see, it appears that you want to use some technique to group your data on the SAMP variable, capturing the "last" (or maybe first?) non-missing SCORE variable value, but only if contributed by an observation having an ID variable in length greater than 5 characters.&lt;BR /&gt;
&lt;BR /&gt;
An additional SAS DATA step could be used against your data set "A", after first sorting the data, and using a RETAIN statement to save the SCORE value in another variable when the appropriate ID and SAMP variable conditions are met.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Mon, 30 Mar 2009 10:06:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-dataset/m-p/12643#M1392</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-03-30T10:06:48Z</dc:date>
    </item>
    <item>
      <title>Re: creating a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-dataset/m-p/12644#M1393</link>
      <description>Thanks for giving response.&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
 I am posing a problem ;  i need a code  for getting the output:&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
&lt;BR /&gt;
Thanks and regards&lt;BR /&gt;
sairam</description>
      <pubDate>Tue, 31 Mar 2009 06:53:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-dataset/m-p/12644#M1393</guid>
      <dc:creator>deleted_user</dc:creator>
      <dc:date>2009-03-31T06:53:09Z</dc:date>
    </item>
    <item>
      <title>Re: creating a dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/creating-a-dataset/m-p/12645#M1394</link>
      <description>Might I encourage your interest to attempt some coding, post it to the forum for discussion/feedback, as an opportunity to learn more about the SAS language?&lt;BR /&gt;
&lt;BR /&gt;
Scott Barry&lt;BR /&gt;
SBBWorks, Inc.</description>
      <pubDate>Tue, 31 Mar 2009 07:56:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/creating-a-dataset/m-p/12645#M1394</guid>
      <dc:creator>sbb</dc:creator>
      <dc:date>2009-03-31T07:56:55Z</dc:date>
    </item>
  </channel>
</rss>

