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.
Can someone help me please?
My recommendation would be:
--read the data from Excel into a SAS dataset
--sort the data by date value
--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).
I am having a hard time visualizing what your input data looks like, what you mean by "lines" and what you mean by "lists".
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:
Date List1 List2 List3
01/01/2011 alan bob charlie
02/22/2011 alysa barb carla
03/23/2011 al beau carl
04/14/2011 andrea belle ceci
OR, the data could be structured completely differently:
Date Name ListNum
01/01/2011 alan list1
01/01/2011 bob list2
01/01/2011 charlie list3
02/22/2011 alysa list1
02/22/2011 barb list2
02/22/2011 carla list3
03/23/2011 al list1
03/23/2011 beau list2
03/23/2011 carl list3
04/14/2011 andrea list1
04/14/2011 belle list2
04/14/2011 ceci list3
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:
Date Name ListNum Evaluation
01/01/2011 alan list1 Performed all tasks on test
01/01/2011 bob list2 Did not finish test
01/01/2011 charlie list3 Left early will retake
02/22/2011 alysa list1 Was not prepared for test
02/22/2011 barb list2 Most accurate
02/22/2011 carla list3 Finished first
03/23/2011 al list1 Did not finish
03/23/2011 beau list2 Had letter to test verbally
03/23/2011 carl list3 Missed last page
04/14/2011 andrea list1 Did not put name on test
04/14/2011 belle list2 Performed all tasks on test
04/14/2011 ceci list3 Finished second
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.
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.
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.