If you do not need to maintain the original order of observations within each BY group, you can specify the NOEQUALS option of PROC SORT to reduce machine time. The following program uses the default EQUALS option which does maintain the original order:
Example– INEFFICIENTPROC SORT DATA=TEST;
Use the NOEQUALS option to specify that the order of observations within the levels of the BY variables in the sorted data set does not have to be the same as that of the data set before sorting.
Example – EFFICIENTPROC SORT DATA=TEST NOEQUALS;
A Word on Indexing
It would be a serious omission if we did not mention indexing before leaving this chapter, so we mention it briefly.Do not take that as meaning that it is unimportant.It's just another topic that is beyond the scope of this.
For the programmer working with large data sets, indexing is a method that trades disk storage for efficiency. The decreases in search time may be offset by the increased space needed to store the indices.The main advantage of indexing is that you can directly access an observation of an indexed variable.When you are considering a small subset of a large file, indexing can be significantly more efficient than processing without indices.Data can also be retrieved for BYgroup processing without sorting when indexing is used.
Rewrite each of the following programs to make them more efficient:
Note: Variables ITEM1-ITEM5 are used for frequencies only. No arithmetic operations are performed on these variables.
SAS Programming Related Tutorials
|SASS (Syntactically Awesome Style sheets) Tutorial||R Programming language Tutorial|
SAS Programming Related Interview Questions
|Logistics Interview Questions||SAS Programming,SQL server Interview Questions|
|Clinical SAS Interview Questions||SASS (Syntactically Awesome Style sheets) Interview Questions|
|SQL Server Analysis Services (SSAS) Interview Questions||R Programming language Interview Questions|
|SAS DI Interview Questions||Advanced SAS Interview Questions|
|Base Sas Interview Questions||SAS Macro Interview Questions|
|Clinical Data Management Interview Questions|
Sas Programming Tutorial
Input And Infile
Set, Merge, And Update
Table Lookup Tools
Proc Means And Proc Uimivariate
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.