Posts Tagged ‘ macro ’

How to format a macro variable

October 16, 2017
By

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

The post Read more »

Tags: , , , , ,
Posted in SAS | Comments Off on How to format a macro variable

Character to Numeric Conversion in SAS

January 3, 2017
By

How many of you have been given a SAS data set with variables such as Age, Height, and Weight and some or all of them were stored as character values instead of numeric?  Probably EVERYONE! Yes, we all know how to do the old "swap and drop" (rename and convert), but

The post Read more »

Tags: , , , , ,
Posted in SAS | Comments Off on Character to Numeric Conversion in SAS

Quote confusion: How do quotes and macro work together?

December 21, 2015
By

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”.

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Quote confusion: How do quotes and macro work together?

Macro Quoting Functions

April 16, 2014
By

Secrets of Macro Quoting Functions - How and Why
Read more »

Tags:
Posted in SAS | Comments Off on Macro Quoting Functions

NOTE: Wrap-Up on Test Coverage and MCOVERAGE

January 10, 2014
By

I've spent this week describing the functionality and purpose of the MCOVERAGE system option introduced in SAS V9.3. Coverage testing is an important consideration for your testing strategy - it's important to know how much of your code has been tested...
Read more »

Tags: , , ,
Posted in SAS | Comments Off on NOTE: Wrap-Up on Test Coverage and MCOVERAGE

NOTE: Expanding Our Use of MCOVERAGE for Coverage Analysis of our Macro Testing

January 9, 2014
By
NOTE: Expanding Our Use of MCOVERAGE for Coverage Analysis of our Macro Testing

Over the last few days I've been revealing the features and benefits of the MCOVERAGE system option introduced in SAS V9.3. This system option creates a log file to show which lines of our macro(s) were executed, e.g. during our tests.Knowing that we t...
Read more »

Tags: , , ,
Posted in SAS | Comments Off on NOTE: Expanding Our Use of MCOVERAGE for Coverage Analysis of our Macro Testing

NOTE: Making Sense of MCOVERAGE for Coverage Testing of Your Macros

January 8, 2014
By

Over the last couple of days I've been uncovering the MCOVERAGE system option for coverage of testing of macro code. Coverage testing shows which lines were executed by your tests (and which were not). Clearly, knowing the percentage of code lines that...
Read more »

Tags: , , ,
Posted in SAS | Comments Off on NOTE: Making Sense of MCOVERAGE for Coverage Testing of Your Macros

NOTE: Macro Coverage in Testing (MCOVERAGE)

January 7, 2014
By

Yesterday I introduced the MCOVERAGE system option (introduced in V9.3) for capturing coverage of macro execution. This is useful in testing, to be sure you executed all lines of your macro. This may take more than one execution of your macro, with different input parameters and data.

I finished yesterday's post by showing the...
Read more »

Tags: , , ,
Posted in SAS | Comments Off on NOTE: Macro Coverage in Testing (MCOVERAGE)

Welcome!

SAS-X.com offers news and tutorials about the various SAS® software packages, contributed by bloggers. You are welcome to subscribe to e-mail updates, or add your SAS-blog to the site.

Sponsors







Dear readers, proc-x is looking for sponsors who would be willing to support the site in exchange for banner ads in the right sidebar of the site. If you are interested, please e-mail me at: tal.galili@gmail.com
SAS and all other SAS Institute Inc. product or service names are registered trademarks or trademarks of SAS Institute Inc. in the USA and other countries. ® indicates USA registration.