List Processing With SAS: A Github Repository

This post was kindly contributed by From a Logical Point of View » SAS - go there to comment and to read the full post.

I have a function like macro (recursive version) to create a sequence:

%macro _list(n,pre=ff);
    %if &n=1 %then &pre.1;
     %else %_list(%eval(&n-1)),&pre.&n;
%mend _list;

%put %_list(3); *produces ff1, ff2, ff3;

But when I read one of Ian Whitlock’s papers, Names, Names, Names – Make Me a List (SGF 2007, SESUG 2008),  I say: stop! I’m gonna use Ian’s %range and I create Github page to hold it (with minimum modifications due to personal preference).

I once posted My Collection of SAS Macro Repositories credited to some SAS gurus like Richard DeVenezia. When facing a programming challenge, there is always a trade-off: should I take a look at what others wrote, or I just write from the scratch? Searching also needs lots of efforts, so I plan to utilize Github pages to minimum my own searching efforts and hope it would be helpful for you (no intelligence waste anymore!). I begin with SAS list processing:

https://github.com/Jiangtang/Programming-SAS/tree/master/ListProcessing

I got most of such utilities macros (with detailed comments, examples and sources) from papers, blogs and other websites and honors belong to their authors! Sometimes I will also add my own if I think there are some holes to fill up. To get start, you may read a READ ME (will keep updated) first. Besides the individual macros, a combined file (trigged by a simple Dos command) is also available.

This post was kindly contributed by From a Logical Point of View » SAS - go there to comment and to read the full post.