Category: SAS

How to Get Row Numbers in SAS Proc SQL (and DO NOT Use the Undocumented MONOTONIC Function)

SAS programmers are longing for row number function used in Proc SQL, like ROW_NUMBER() in Oracle SQL and it will act like data step system variable _N_. When you google this question, most likely you will get MONOTONIC() function, which might be one of the most famous undocumented features shipped by SAS. You can of […]

NOTE: Are You Game for Big Data Overload?

Earlier this week, SAS launched a new software product. It’s free! AND it runs on Android and Apple iOS devices!! What am I talking about?… the latest craze to hit analytics offices worldwide… Big Data Overload, the game.

This is a fun game in …

SAS and D3.js (2): a macro to draw dynamic bar chart

More and more statistical softwares are able to create interactive web application. The recent shiny package by RStuido is a good example. Besides, in the world that JavaScript rules the browsers, D3.js seems to be very promising for rich data visual…

SAS and D3.js (1): a macro to draw scatter plot

HTML is the default output format for SAS since 9.3. Implementing the popular JavaScipt frameworks such as jQuery and D3.js will allow some dynamic effects to the final HTML results. In those cases the HTML file is static, and thus no HTTP server is…

How to handle percent (%) values in SAS

Being that 2013 is the International Year of Statistics, I wanted to make sure everyone knows how to handle my favorite statistic – percent (%) – in SAS! I often see data in spreadsheets/csv/etc that purport to represent “percents”… but you have to b…

SAS Enterprise Guide: 3 Ways to Use the Note Feature

If you look at my desk, my addiction will present itself to you clearly.  I love sticky notes – any kind, color, or shape. My bottom desk drawer is full of notepads – some never used because I think they are too pretty to write on. The be…

NOTE: The OPEN Function (reading data sets in macros)

In my previous post on this subject, I showed how to use the DATA step’s OPEN function to get information about data sets and make that information available within a DATA step or as a macro variable. In today’s post I will take it further and show how…

NOTE: Executing a PROC from a DATA Step

I stumbled across a most informative SAS Global Forum paper the other day, and I wanted to share it with you! In his Executing a PROC from a DATA Step paper, SAS’s Jason Secosky describes the RUN_MACRO and DOSUBL functions, both of which were new to me…