SAS Dashboard – Fixing the “too many dials” issue

There’s an interesting feature of SAS BI Dashboard that caught me out when trying to put together some KPI gauges. We wanted a set of dials that would show us the counts for several types of public security offences. Naturally we configured indicators using count as the measure, but found that the dashboard was showing an indicator per record in our system:   With a bit of faffing around, I… Read More »SAS Dashboard – Fixing the “too many dials” issue

SAS – How to Export/Import packages

My team and I have been developing a solution which involves a degree of SAS reports and related metadata. I set up a scheduled, automated backup of our information maps, reports, etc for posterity, and out of general paranoia. For this I used SAS’s command line export and import capabiltiies, which probably weren’t designed to be used that way, but which turned out to be really useful. It took a… Read More »SAS – How to Export/Import packages

Converting custom date formats in SAS Information Map Studio

Background Let’s assume you have some dates in a custom format:   date20131007 month102013 SAS Reports need to be able to a) present dates in a human readable format and b) understand dates to allow filtering and other funky stuff. For that reason we need a way of translating these custom dates into SAS dates. Step 1 – Get an Information Map with a date field Use an existing one,… Read More »Converting custom date formats in SAS Information Map Studio

How to restart SAS server

More detailed instructions can be found here, but below are the steps I use. Note – All instructions assume the SAS is installed on a linux box, in /usr/local/, since that’s where it was installed on my machine. Stop all JBoss server instances /usr/local/jboss-5.1.0.GA/bin/SASServer1.sh stop Stop SAS processes /usr/local/config/Lev1/sas.servers stop Start SAS processes /usr/local/config/Lev1/sas.servers start (wait a couple of minutes) Start JBoss server instances /usr/local/jboss-5.1.0.GA/bin/SASServer1.sh start (wait about 5, 10… Read More »How to restart SAS server

Creating SAS Web Reports from an Oracle data source

Here’s a sparse set of instructions for the steps you need to take to configure SAS to access data from an Oracle data store and surface it through SAS Web Report Studio (as an example). Note that once it’s in a SAS format this can be used in any SAS product, and therefore means you can do all sorts of analytics on it. Hence the VA screenshot. Caveats – Please… Read More »Creating SAS Web Reports from an Oracle data source

Recursively list all files in Windows

  You’re probably familiar with dir, the windows command which lists all files in a certain directory. If you ever find the need (as I have) to recursively list every file in a directory, as well as all its sub-directories, you can do this by setting a couple of parameters on the dir command. dir /s /b Warning: This will output a lot of stuff, so I’d recommend piping the… Read More »Recursively list all files in Windows

Showing command history in UNIX with timestamps

A handy little command for checking the history of all commands executed through the UNIX command prompt for that user. history This will return you a numbered list of commands, oldest first. Note that by default, “history” will NOT show you timestamps, which can be very handy if investigating activity on a certain machine. To show history with timestamps, you’ll need to set up an evironment variable to store the… Read More »Showing command history in UNIX with timestamps

How to fix Oracle TNS Listener Issues

 A few times over the course of working with Oracle, I’ve come across environments which had issues making connections to databases set up across a network. These were failing with the error “ORA-12514: No TNS Listener”. I eventually found that to fix this, you need to follow the steps below: Install the Oracle Data Access Components (ODAC) on the machine attempting to make the connection Navigate to C:\app\<username>\product\<oracle_version>\client_1\Network\Admin\Sample (note that this… Read More »How to fix Oracle TNS Listener Issues

Search file contents in UNIX

I found myself having to search through the contents of a bunch of files in Unix the other day, and wanted to find a command to do it for me. Cue some Googling, and I found exactly what I was looking for here. find . -name “*” -exec grep -l “somestring” {} \;