Posts Tagged ‘ proc sql ’

Tell SAS to read a database field as CHAR instead of INT or BIGINT

May 19, 2016
By
Tell SAS to read a database field as CHAR instead of INT or BIGINT

Yesterday a frustrated SAS user complained on Twitter. He's working with a database that stores an ID field as a big long number (perhaps using the database BIGINT type), and SAS can't display a number greater than 15 digits. Well, it's actually 16 digits, depending on the value: %put Biggest

The post Read more »

Tags: , , ,
Posted in SAS | Comments Off on Tell SAS to read a database field as CHAR instead of INT or BIGINT

Copy McCopyface and the new naming revolution

May 17, 2016
By
Copy McCopyface and the new naming revolution

As a parent of children who love books, I can tell you that there is something humorous about taking a first name, adding a "Mc" and then a rhyming surname to make up a brand new character name. My daughters always loved to read the adventures of Harry Mclary from

The post Read more »

Tags: , ,
Posted in SAS | Comments Off on Copy McCopyface and the new naming revolution

Life saver tip for comparing PROC SQL join with SAS data step merge

May 27, 2015
By

“Phew! That tip alone was a life saver,” said a student in one of my SAS SQL classes. “Before, I would have to read about ten Google search results before I could find that content of the sort you shared in class.” That student was referring to the tip I

The post Read more »

Tags: , , , ,
Posted in SAS | Comments Off on Life saver tip for comparing PROC SQL join with SAS data step merge

Fast SQL moving average calculation without windowing functions

May 11, 2015
By
Fast SQL moving average calculation without windowing functions

In this post, I show a trick to do moving average calculation (can be extended to other operations requiring windowing functions) that is super fast.

Often, SAS analysts need to conduct moving average calculation and there are several options by the order of preference:

1. PROC EXPAND
2. DATA STEP
3. PROC SQL

But many...
Read more »

Tags: ,
Posted in SAS | Comments Off on Fast SQL moving average calculation without windowing functions

How to split one data set into many

January 26, 2015
By
How to split one data set into many

Back in the day when the prison system forced inmates to perform "hard labor", folks would say (of someone in prison): "He's busy making little ones out of big ones." This evokes the cliché image of inmates who are chained together, forced to swing a chisel to break large rocks

The post Read more »

Tags: , , , ,
Posted in SAS | Comments Off on How to split one data set into many

Real-world analytics for Analytics 2013!

June 12, 2013
By

You might have seen my previous blog, where I plotted some interesting tourist attractions on a geographical map of the British Isles (which may be of interest to Analytics 2013 Conference delegates)... Well this blog uses even more powerful analytics,...
Read more »

Tags: , , , , , , ,
Posted in SAS | Comments Off on Real-world analytics for Analytics 2013!

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 on Proc SQL and the power of select into

Index tuning in SAS for high-volume transactional data

June 4, 2012
By
Index tuning in SAS for high-volume transactional data

Why use indexes in SAS? A page is the smallest I/O unit that SAS can read or write, including data set page and index file page. Index files in SAS are sorting and searching structures made by B-trees. “When an index is used to process a request,...
Read more »

Tags:
Posted in SAS | Comments Off on Index tuning in SAS for high-volume transactional data

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.