REDUCE DATA STEPS
KEEP VAR1 VAR2 VAR3;
PROC SORT DATA=ABC;
Can we reduce these steps? Can we possibly reduce this to one..? One method would be to use keep and where statement with Sort statement Data.
PROC SORT DATA=XYZ(KEEP=VAR1 VAR2 VAR3 WHERE=(VAR1="VAR1_VALUE")) OUT=ABC;
And the other would be to use ‘Proc SQL’.Order by in the end does the sorting
CREATE TABLE ABC AS
ORDER BY VAR2
This entry was posted on Jun 30, 2009 at 11:26 PM and is filed under SAS, SAS-effeciency, SAS-Efficient Coding Techniques, SAS-Programming, SAS-Sort, SAS-SQL. You can follow any responses to this entry through the RSS 2.0. You can leave a response.