When making a new piece of code, I like to use the smallest font I can read. This lets me fit more text on the screen at once. When presenting code to others, especially in a classroom setting, I like to make the font large enough to see from the back of the room. Here’s how I change font size in SAS in our three programming interfaces.
Do you periodically delete unneeded global macro variables? You should! Deleting macro variables releases memory and keeps your symbol table clean. Learn how the macro language statement that deletes global macro variables and about the %DELETEALL statement that can be a life saver for macro programmers.
SAS variables are variables in the statistics sense, not the computer programming sense. SAS has what many computer languages call “variables,” it just calls them “macro variables.” Knowing the difference between SAS variables and SAS macro variables will help you write more flexible and effective code.
When speed is required at scale, it's hard to beat parallel processing data in memory with DS2 and SAS® Viya® with the amazing Cloud Analytic Services (CAS)!
The post Jedi SAS Tricks: Transwarp Processing with DS2 in SAS® Viya® appeared first on SAS Learning Post.
If you are a SAS programmer, you may wonder why you should read this. After all isn’t SAS Enterprise Guide just for folks who don’t want to be bothered writing SAS code? SAS Enterprise Guide is just point, click, and get results, right? Well there is a lot more to [...]
SAS Viya is an exciting addition to the SAS Platform, allowing you to conduct analysis faster than ever before and providing you the flexibility to utilize open source technologies and generate insights from data in any computing environment. The blog post “Top 12 Advantages of SAS Viya” does a great [...]
The post Learn more about SAS Viya with resources from SAS Education appeared first on SAS Learning Post.
Here's a Proc Print trick for grouped data. Suppose your data is divided into groups, such as males and females. You could sort by the grouping variable before printing, like this: Suppose you want to better emphasize the groups. You could add a BY statement, like this: OK, but, personally, [...]
Suppose you want a list of car manufacturers from the CARS dataset. Easy! Call the %CHARLIST macro from a %PUT statement, like this: The CHARLIST macro generates a list of unique values of a selected variable from a selected dataset. So does PROC FREQ. But, if you don't need statistics, the CHARLIST [...]
Would you like to format your macro variables in SAS? Good news. It's easy! Just use the %FORMAT function, like this: %let x=1111; Log %put %format(&x,dollar11.); $1,111 %put %format(&x,roman.); MCXI %put %format(&x,worddate.); January 16, 1963 %let today=%sysfunc(today()); %put %format(&today,worddate.); October 13, 2017 %put %format(Macro,$3.); Mac What?! You never [...]
In a previous blog, I demonstrated a program and macro that could identify all numeric variables set to a specific value, such as 999. This blog discusses an immensely useful technique that allows you to perform an operation on all numeric or all character variables in a SAS data set. [...]
The post How to perform an operation on all numeric or all character variables in a SAS data set appeared first on SAS Learning Post.