Tag: macro

Learn SAS | Programming Tips
Jim Simon 0
How to format a macro variable

Would you like to format your macro variables? Easy!  Just use the %FORMAT function, like this: What?! You never heard of the %FORMAT function? Of course not, cuz it doesn't exist! No problem. Just create it, like this: %macro format(value,format); %if %datatyp(&value)=CHAR %then %sysfunc(putc(&value,&format)); %else %left(%qsysfunc(putn(&value,&format))); %mend format; The %FORMAT

Marty Hultgren 0
Quote confusion: How do quotes and macro work together?

The English language, a mishmash of words from many tongues and with rules that aren’t always consistent, sometimes causes people to stumble when writing quotes. There are numerous humorous websites with examples of incorrectly-used quotes on signs saying things like “Sandwiches Prepared ‘Fresh’,” or “Help ‘Wanted’ – Please ‘inquire’ within”.

Programming Tips
Russ Tyndall 0
Macro quoting made easy

Are there times when you need to pass special characters to a macro variable but cannot find the right technique to accomplish the task?  In this article I’ll discuss the different macro quoting functions and give a simple technique to help you determine which macro quoting function to use. Why

Learn SAS
Shelly Goodin 0
SAS author's tip: Why think %locally?

This week's SAS tip is from Robert Virgile and his illuminating new book SAS Macro Language Magic: Discovering Advanced Techniques. Robert has 30 years of experience developing and teaching SAS classes. And his new book is filled with powerful programming techniques. If you like this week's free excerpt, you can read

Learn SAS
Shelly Goodin 0
SAS author's tip: %NLINMIX macro tips

This week's %NLINMIX macro tips come from the esteemed authors of SAS for Mixed Models, Second Edition. Ramon C. Littell, George A. Milliken, Walter W. Stroup, Russell D. Wolfinger, and Oliver Schabenberger combined their expertise to write this indispensable guide. This 800 page book has made a big impact in the user community

Waynette Tubbs 0
Sy Truong reporting from WUSS 2011

If you've been to a SAS Forum, US SAS Regional or local SAS event, you know that it is impossible to see and hear everything that is on your list. Imagine how disappointed your SAS colleagues are who are sitting at home. They would love to hear about what you

Waynette Tubbs 0
Ron Fehd has SASonality in Spades

The SASonality series is about connecting you with SAS users that you may not have taken time to really get to know. Today, I’m going to introduce you to someone that you’ve seen at the SAS regional users group conferences. As you’ll see after reading his interview, he’s created a

Waynette Tubbs 0
The Code Doctor is in …

Does your SAS code lack energy? Are your macros not 'mending'? Is your data out of sorts? Not to fear, because here at SAS Global Forum, we have emergency treatment for your SAS code. The new Code Doctors section allows you to bring your problematic SAS programs to a SAS