Posts Tagged ‘ SAS Code ’

SAS Stratified Random Sample

August 11, 2013
By

There are many ways to take a stratified random sample (SRS), but we find the it doesn't always come out as expected. That was until we started using some examples we found in a paper by Diana Suhr. This is a great example of sampling with various numbers of strata. Example #1 PROC FREQ...
Read more »

Tags: , , , , , ,
Posted in SAS | Comments Off

Proc SQL and the power of select into

May 16, 2013
By

I have referenced this paper many times. Great help in using the power of proc sql with macro variables. Great for building lists of values and dynamic code. http://www.nesug.org/Proceedings/nesug97/coders/eddlesto.pdf Syntax: SELECT object-item ... ...
Read more »

Tags: , , , , , , ,
Posted in SAS | Comments Off

How to send an email from SAS to members of a distribution list

January 24, 2013
By

In your organization, are you prevented from using the email alias of a distribution list (e.g. [email protected]), and would therefore like to extract the list recipients into a flat file to loop through/use the SAS Enterprise Miner functions,...
Read more »

Tags: , ,
Posted in SAS | Comments Off

3 gifts to magically transform your data

December 20, 2012
By

‘Tis the season to be gifting!  So what could be better than gifting your fellow SAS user or yourself with three gifts to celebrate the holiday season? As 2012 comes to an end, we think it’s a great idea to be thinking of ringing in the New Year w...
Read more »

Tags: , ,
Posted in SAS | Comments Off

Accessing files via SFTP in SAS

February 6, 2012
By

Secure File Transfer Protocol has become the standard for transferring files outside our organization. However, it is not always the easiest thing to do in SAS. Here are a few code examples for you to steal. Importing a CSV file over SFTP: %let host=afhood.com; %let sftpOption=-o IdentityFile=/home/user/.ssh/id_rsa; %let filename=theFile.csv; %let sftpPath=/home/remoteuser/dir/; filename myfile sftp...
Read more »

Tags: , ,
Posted in SAS | Comments Off

SAS Altlog option

April 21, 2011
By

If you run a production SAS environment or even a development environment for that matter, it is nice to have a specific location for all logs to be written and managed. ALTLOG helps achieve this. The ALTLOG option can be set numerous ways, but we typically utilize 2. 1. As an option on the...
Read more »

Tags: , , , , , , , , , , , ,
Posted in SAS | Comments Off

Making SOAP calls from SAS! Integrating with web services

March 31, 2011
By

One of the issues with SAS for many IT departments is the lack of integration with service oriented architecture (SOA). The good news is with many new features coming online with versions 9.X+ are service oriented. Lets look quickly at the Proc SOAP procedure now available. For those SAS programmers out there that aren't familiar...
Read more »

Tags: , , , , , , , , , , , , , , ,
Posted in SAS | Comments Off

SQL tip – Inner join shorthand with USING

January 14, 2011
By

We write a LOT of SQL here and although SQL is a powerful database language, it can be tedious. So here is one tip for shortening all that typing. Typical join sytax: select some_columns from one_table join another_table on one_table.column_1 = another_table.column_1 and one_table.column_2=another_table.column_2 where some_column > someother_column ; Not too bad, right? In order...
Read more »

Tags: , , , , , , , , , , , , , , ,
Posted in SAS | Comments Off

Proc-x is looking for 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: [email protected]

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.

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.