Hi All,
Can anybody describe how to improve the efficiency and performance strategies in sas.
Regards
-Andy
Efficiency and performance strategies can classified into five stages:
1. CPU time 2. Data Storage 3.Elapsed time 4. I/O 5. Memory
1. CPU Time
A. Use Keep= and Drop= data set options to retain desired variable.
B.Create and use indexes with large data sets.
C. Utilize macro for redundant code.
D.Use IF/Then - else statement to process data.
E.Use the data sets procedure copy statement to copy data sets with indexes.
F. Use SQL procedures to consolidate the number of steps.
G.Turn off macro facility when not needed.
H.Avoid unnecessary sorting - Plan for its use.
I.Use procedures that support CLASS statement.
J.Use the stored program facility for complex data steps.
2. Data Storage
A. Use Length statements to reduce variable size.
B.Create character variable as much as possible.
C.Use _Null_ steps for processing null data sets.
3. I/O
A.Read only data, that is needed.
B.Use "Where" Statements to subset data.
C.Use data compression for large data set.
D. Store data in SAS Data sets, not external files.
E.Perform data subsets early and at same time.
4. Programming time (Elapsed time)
A. Use procedures whenever possible.
B. Document programs and routines with comments.
C. Code for unknown data values.
D. Assign descriptive and meaningful variable names
for memory go with some options like sort size, buff size, mem size and Real Mem Size........
Regards
Uma Shanker Saini
Can you be a bit more specific? There are hundreds of things to look at depending of the situation, requirements, environment, budget etc...
Efficiency and performance strategies can classified into five stages:
1. CPU time 2. Data Storage 3.Elapsed time 4. I/O 5. Memory
1. CPU Time
A. Use Keep= and Drop= data set options to retain desired variable.
B.Create and use indexes with large data sets.
C. Utilize macro for redundant code.
D.Use IF/Then - else statement to process data.
E.Use the data sets procedure copy statement to copy data sets with indexes.
F. Use SQL procedures to consolidate the number of steps.
G.Turn off macro facility when not needed.
H.Avoid unnecessary sorting - Plan for its use.
I.Use procedures that support CLASS statement.
J.Use the stored program facility for complex data steps.
2. Data Storage
A. Use Length statements to reduce variable size.
B.Create character variable as much as possible.
C.Use _Null_ steps for processing null data sets.
3. I/O
A.Read only data, that is needed.
B.Use "Where" Statements to subset data.
C.Use data compression for large data set.
D. Store data in SAS Data sets, not external files.
E.Perform data subsets early and at same time.
4. Programming time (Elapsed time)
A. Use procedures whenever possible.
B. Document programs and routines with comments.
C. Code for unknown data values.
D. Assign descriptive and meaningful variable names
for memory go with some options like sort size, buff size, mem size and Real Mem Size........
Regards
Uma Shanker Saini
Nice effort, very useful.
CharlotteCain : Thank you for your appreciation....
Anand : i am looking for some information related to Memory option ( sort size, buff size , mem size .....) from your side.....
Regards
Uma Shanker Saini
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.