Finding MIN (or even MAX) of character variables in SQL

It is perfectly valid to use min() as a summary function on character values in proc sql, eg as follows: proc sql;create table test as    select min(name) as minval  from sashelp.class; This is not so, however, when using in an inline context: proc...

Reading UTF-8 in Filename Pipe

Having been blessed with an en-dash (alt + 2013) in our TFS project root, I’ve been having lots of fun getting SAS to ‘play nicely’ with non-ascii characters when running OS commands (eg tf.exe). Storing the values in macro variables works fine...

Invoking Stored Processes with Powershell – the easy way

There are a number of ways to run SAS from Powershell: Using SAS Integration Technologies (Chris Hemedinger has some great resources on this) Directly by calling sas.exe (presuming you are running on a box with a local install) Indirectly via the SAS Stored Process...

Chaining Windows Commands in SAS Filename Pipe (&)

Using filename pipe (instead of the X command, or call execute) is a great way to submit OS commands, not least because the standard output can be read directly into SAS. But how does one submit multiple commands in the same filename (or file) statement? Easy –...