I know this is a really old thread, but I finally have a use for this - I've got a SAS dataset with hundreds of hospital diagnosis codes, and I only want to keep the code fields that have at least one non-blank value (to save space). I was going to use Sridharma's %DROPMISS macro mentioned above (it's hundreds of lines of SAS code, but it works well). However, this option using the NLEVELS option (which I've never heard of) also works well, and it's MUCH shorter. I think I'll use that. Thanks!
... View more