This article is a quick primer on SAS Engines using the proc nickname & Proc Contents.
I. What is a SAS Engine?
A SAS engine is a component of SAS software that reads from or writes to a file. Each engine enables SAS to access files that are in a particular format.
SAS provides many specific types of engines. SAS will usually assign one automatically for you based on the contents of the library, although it can be more efficient for you to set the library.
For instance, the SAS engine used to read a data set from a folder in a directory is the V9 engine, which is the Base SAS I/O Engine.
For instance when you assign a library name with the following command::
libname sas_qs “C:/ashish/sas_quickstart/data/sas_datasets”;
SAS returns the name of the engine used in the log file:
NOTE: Libref SAS_QS was successfully assigned as follows:
Engine:Â Â Â Â Â Â Â V9
Physical Name: C:/ashish/sas_quickstart/data/sas_datasets
II. Specifying the SAS engine
If you want to specify the engine used in a SAS command, you can. For instance, you could modify the prior example to specify using the V9 engine:
libname sas_qs v9 “C:/ashish/sas_quickstart/data/sas_datasets”;
III. Identifying available SAS engines SAS has an undocumented feature to see a list of all SAS engines that are available. Simply run the following code and it will report all the SAS engines in the log file:
Proc nickname;Â run;
Note: A Partial Output is displayed below
IV. Listing Variables of datasets
Often we face a situation while applying statistical techniques like Linear and Logistic Regression, Sampling etc. where large number of variables are included in the model equation. Playing with these variables to write model equation consumes a lot analyst time. A SAS trick to list variables horizontally And then modify equation either adding or deleting variables will reduce analyst efforts and save time.
Below is the simple trick:
Proc contents data=Work.Credit short;
Run;
All variables in dataset are displayed in SAS output window separated by space.
This article has been written by Ashish Jain. Ashish is a business analyst with specialization in the financial analytics domain. He has worked on several analytics projects for a major US credit company.
Fill in the details to know more
Important Artificial Intelligence Tools
October 31, 2022
Top 28 Data Analytics Tools For Data Analysts | UNext
September 27, 2022
Stringi Package in R
May 5, 2022
Best Frameworks In Java You Should Know In 2021
May 5, 2021
Lean Management Tools: An Ultimate Overview For 2021
May 4, 2021
Talend ETL: An Interesting Guide In 4 Points
Add your details:
By proceeding, you agree to our privacy policy and also agree to receive information from UNext through WhatsApp & other means of communication.
Upgrade your inbox with our curated newletters once every month. We appreciate your support and will make sure to keep your subscription worthwhile