SUPPORT / SAMPLES & SAS NOTES
 

Support

Sample 24622: Drop variables from a SAS® data set whose values are all missing

DetailsCodeResultsAboutRate It

The sample code on the Full Code tab illustrates how to drop variables from a SAS data set whose values are all missing.

The sample code uses arrays and iterative DO loops to determine whether a variable's values are missing for all observations. It then creates a macro variable whose value is the list of the variables to be dropped. The macro variable is used in a DROP statement in a subsequent DATA step.




These sample files and code examples are provided by SAS Institute Inc. "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and fitness for a particular purpose. Recipients acknowledge and agree that SAS Institute shall not be liable for any damages whatsoever arising out of their use of this material. In addition, SAS Institute will provide no support for the materials contained herein.