summary

[last updated - 31 July 2003]

This is an exercise in using the sasunixskeleton script. Once you have done this you will realise just how easy it is to create a Unix utility that runs SAS. I will tell you exactly what to do. First generate the script using sasunixskeleton. You are going to call this script summary. Edit the script. Don't bother filling in the header details as this is just a practise. Change the Usage line so if the user has supplied less than 2 parameters then the message "Usage: summary varname dsname" is displayed. Now for the code. We are going to end up doing a proc print so add nocenter to the top options line in the code. Next delete all the SAS code after the filename _outfile.. line and put this in instead:

proc printto print=_outfile;
run;
proc summary missing nway data=here.$2;
  class $1;
  output out=summary(drop=_type_);
run;
title;
proc print data=summary;
run;

Next make a data directory a current directory and run it on a dataset and you will see that it works. It's as simple as that.

Now you see how easy it is, you are ready to learn more about Unix. Go to the Unix tips page using this link.

Go back to the home page.

E-mail the macro and web site author.