<?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: Unordered dataset in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Unordered-dataset/m-p/65996#M18827</link>
    <description>here an exemple&lt;BR /&gt;
1/1/2000----23&lt;BR /&gt;
2/1/2000----24&lt;BR /&gt;
3/1/2000---25&lt;BR /&gt;
&lt;BR /&gt;
2/1/2000---30&lt;BR /&gt;
3/1/2000---31&lt;BR /&gt;
5/1/2000---32&lt;BR /&gt;
&lt;BR /&gt;
1/1/2000---34&lt;BR /&gt;
2/1/2000---25&lt;BR /&gt;
5/1/2000----45&lt;BR /&gt;
&lt;BR /&gt;
in my excel file this datas is "in line" not on column.&lt;BR /&gt;
each list is "locally" ordered, I need to have a global order of my dataset, every line must have the same date.</description>
    <pubDate>Sat, 14 May 2011 15:04:25 GMT</pubDate>
    <dc:creator>Mat_Zan</dc:creator>
    <dc:date>2011-05-14T15:04:25Z</dc:date>
    <item>
      <title>Unordered dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Unordered-dataset/m-p/65993#M18824</link>
      <description>Hi, I've got an unordered dataset with 3 lists of datas, ordered by date. I have to obtain a dataset where, for every lines, my observation will be reported to the same date.&lt;BR /&gt;
Can someone help me please?&lt;BR /&gt;
&lt;BR /&gt;
n.b. proc sort is not enough.</description>
      <pubDate>Sat, 14 May 2011 14:09:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Unordered-dataset/m-p/65993#M18824</guid>
      <dc:creator>Mat_Zan</dc:creator>
      <dc:date>2011-05-14T14:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: Unordered dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Unordered-dataset/m-p/65994#M18825</link>
      <description>I don't understand your requirements.  An example of your data and the desired output would help.</description>
      <pubDate>Sat, 14 May 2011 14:42:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Unordered-dataset/m-p/65994#M18825</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2011-05-14T14:42:59Z</dc:date>
    </item>
    <item>
      <title>Re: Unordered dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Unordered-dataset/m-p/65995#M18826</link>
      <description>Hi:&lt;BR /&gt;
  I am having a hard time visualizing what your input data looks like, what you mean by "lines" and what you mean by "lists".&lt;BR /&gt;
&lt;BR /&gt;
  For example, you say you have an unordered dataset with "3 lists of datas", ordered by date. To me the 3 "lists" could be 3 different, but related variable names, such as LIST1, LIST2 and LIST3:&lt;BR /&gt;
[pre]&lt;BR /&gt;
Date        List1   List2   List3&lt;BR /&gt;
01/01/2011  alan    bob     charlie&lt;BR /&gt;
02/22/2011  alysa   barb    carla&lt;BR /&gt;
03/23/2011  al      beau    carl&lt;BR /&gt;
04/14/2011  andrea  belle   ceci&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                &lt;BR /&gt;
OR, the data could be structured completely differently:&lt;BR /&gt;
[pre]&lt;BR /&gt;
Date       Name    ListNum&lt;BR /&gt;
01/01/2011 alan    list1&lt;BR /&gt;
01/01/2011 bob     list2&lt;BR /&gt;
01/01/2011 charlie list3&lt;BR /&gt;
02/22/2011 alysa   list1&lt;BR /&gt;
02/22/2011 barb    list2&lt;BR /&gt;
02/22/2011 carla   list3&lt;BR /&gt;
03/23/2011 al      list1&lt;BR /&gt;
03/23/2011 beau    list2&lt;BR /&gt;
03/23/2011 carl    list3&lt;BR /&gt;
04/14/2011 andrea  list1&lt;BR /&gt;
04/14/2011 belle   list2&lt;BR /&gt;
04/14/2011 ceci    list3&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                 &lt;BR /&gt;
Then, you say that you need a dataset "where, for every lines, my observation will be reported to the same date. What I imagine is something like this EVALUATION data, added to the second data example:&lt;BR /&gt;
[pre]&lt;BR /&gt;
Date       Name    ListNum   Evaluation&lt;BR /&gt;
01/01/2011 alan    list1     Performed all tasks on test&lt;BR /&gt;
01/01/2011 bob     list2     Did not finish test&lt;BR /&gt;
01/01/2011 charlie list3     Left early will retake&lt;BR /&gt;
02/22/2011 alysa   list1     Was not prepared for test&lt;BR /&gt;
02/22/2011 barb    list2     Most accurate     &lt;BR /&gt;
02/22/2011 carla   list3     Finished first&lt;BR /&gt;
03/23/2011 al      list1     Did not finish&lt;BR /&gt;
03/23/2011 beau    list2     Had letter to test verbally&lt;BR /&gt;
03/23/2011 carl    list3     Missed last page&lt;BR /&gt;
04/14/2011 andrea  list1     Did not put name on test&lt;BR /&gt;
04/14/2011 belle   list2     Performed all tasks on test&lt;BR /&gt;
04/14/2011 ceci    list3     Finished second&lt;BR /&gt;
[/pre]&lt;BR /&gt;
                             &lt;BR /&gt;
Without any idea of what your input data looks like (a small example is very helpful) or what you output dataset or report needs to look like (again, a small example is very helpful), it is almost impossible to make constructive suggestions.&lt;BR /&gt;
&lt;BR /&gt;
You also say that PROC SORT is not enough, which means that you must have some code already that you've tried and you have results that you've looked at and you know that PROC SORT is not doing what you want. Sharing that code would tell everybody a lot -- it would show whether you were reading in 1 file or multiple files. It would show whether you were starting with existing SAS datasets or a single dataset. &lt;BR /&gt;
&lt;BR /&gt;
If, for example, you have a "main" file with your data and you have a second file of information that needs to be added to the main file, then you might need an SQL join or a DATA step MERGE.Your main file might need to be restructured before it suits your needs. However, without a clear idea of what your input data looks like and what your output data looks like, it is only a guessing game.&lt;BR /&gt;
&lt;BR /&gt;
This is a very handy forum posting that explains how to post questions and still maintain the indenting of code and of input and output samples that you want to show:&lt;BR /&gt;
&lt;A href="http://support.sas.com/forums/thread.jspa?messageID=27609毙" target="_blank"&gt;http://support.sas.com/forums/thread.jspa?messageID=27609毙&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Sat, 14 May 2011 14:59:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Unordered-dataset/m-p/65995#M18826</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-05-14T14:59:31Z</dc:date>
    </item>
    <item>
      <title>Re: Unordered dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Unordered-dataset/m-p/65996#M18827</link>
      <description>here an exemple&lt;BR /&gt;
1/1/2000----23&lt;BR /&gt;
2/1/2000----24&lt;BR /&gt;
3/1/2000---25&lt;BR /&gt;
&lt;BR /&gt;
2/1/2000---30&lt;BR /&gt;
3/1/2000---31&lt;BR /&gt;
5/1/2000---32&lt;BR /&gt;
&lt;BR /&gt;
1/1/2000---34&lt;BR /&gt;
2/1/2000---25&lt;BR /&gt;
5/1/2000----45&lt;BR /&gt;
&lt;BR /&gt;
in my excel file this datas is "in line" not on column.&lt;BR /&gt;
each list is "locally" ordered, I need to have a global order of my dataset, every line must have the same date.</description>
      <pubDate>Sat, 14 May 2011 15:04:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Unordered-dataset/m-p/65996#M18827</guid>
      <dc:creator>Mat_Zan</dc:creator>
      <dc:date>2011-05-14T15:04:25Z</dc:date>
    </item>
    <item>
      <title>Re: Unordered dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Unordered-dataset/m-p/65997#M18828</link>
      <description>Is it your wish to have the output look like this:&lt;BR /&gt;
1/1/2000 23 34&lt;BR /&gt;
2/1/2000 24 30 25&lt;BR /&gt;
3/1/2000 25 31&lt;BR /&gt;
5/1/2000 43 45</description>
      <pubDate>Sat, 14 May 2011 20:50:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Unordered-dataset/m-p/65997#M18828</guid>
      <dc:creator>DBailey</dc:creator>
      <dc:date>2011-05-14T20:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Unordered dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Unordered-dataset/m-p/65998#M18829</link>
      <description>&amp;gt; Is it your wish to have the output look like this:&lt;BR /&gt;
&amp;gt; 1/1/2000 23 34&lt;BR /&gt;
&amp;gt; 2/1/2000 24 30 25&lt;BR /&gt;
&amp;gt; 3/1/2000 25 31&lt;BR /&gt;
&amp;gt; 5/1/2000 43 45&lt;BR /&gt;
&lt;BR /&gt;
Exactly, I need to have ordered observation because of the three sets of dates are unordered.</description>
      <pubDate>Sat, 14 May 2011 22:54:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Unordered-dataset/m-p/65998#M18829</guid>
      <dc:creator>Mat_Zan</dc:creator>
      <dc:date>2011-05-14T22:54:56Z</dc:date>
    </item>
    <item>
      <title>Re: Unordered dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Unordered-dataset/m-p/65999#M18830</link>
      <description>Hi,&lt;BR /&gt;
Thanks for the data example. &lt;BR /&gt;
&lt;BR /&gt;
My recommendation would be:&lt;BR /&gt;
--read the data from Excel into a SAS dataset&lt;BR /&gt;
--sort the data by date value&lt;BR /&gt;
--use PROC TRANSPOSE to transpose the data so that the values for each date are all on one observation (there are options to control the naming of the final variables -- otherwise, you can just start with the default names).&lt;BR /&gt;
&lt;BR /&gt;
This is a good paper on TRANSPOSE:&lt;BR /&gt;
&lt;A href="http://www2.sas.com/proceedings/forum2007/234-2007.pdf" target="_blank"&gt;http://www2.sas.com/proceedings/forum2007/234-2007.pdf&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
and there are previous forum postings on using TRANSPOSE. And, here's the documentation: &lt;BR /&gt;
&lt;A href="http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#transpose-overview.htm" target="_blank"&gt;http://support.sas.com/documentation/cdl/en/proc/61895/HTML/default/viewer.htm#transpose-overview.htm&lt;/A&gt;&lt;BR /&gt;
 &lt;BR /&gt;
cynthia</description>
      <pubDate>Sun, 15 May 2011 13:47:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Unordered-dataset/m-p/65999#M18830</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2011-05-15T13:47:24Z</dc:date>
    </item>
    <item>
      <title>Re: Unordered dataset</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Unordered-dataset/m-p/66000#M18831</link>
      <description>Thank you very much for the help!</description>
      <pubDate>Sun, 15 May 2011 22:40:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Unordered-dataset/m-p/66000#M18831</guid>
      <dc:creator>Mat_Zan</dc:creator>
      <dc:date>2011-05-15T22:40:35Z</dc:date>
    </item>
  </channel>
</rss>

