Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 7. SAS® Arrays: Avoiding Repetit... > Example 2: Substituting One Value fo...

Example 2: Substituting One Value for Another in All Numeric Variables

FEATURES:ARRAY Statement, DO Loop, DIM Function, _NUMERIC_ Variable


You can easily extend the program above to substitute a SAS missing value for all the numeric variables in your data set. The internal SAS term _NUMERIC_ can be used to refer to all the numeric variables in a SAS data set (either in a DATA or PROC step). This is a good place to mention that the terms _CHARACTER_ and _ALL_ are also available and represent all character variables and all variables respectively. Here is a program to set a value of 999 to missing for all numeric variables:


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint