- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
if Varname not in ( 1,2,3) then Varname1 = input( Varname, best.) ;What does this "Varname not in" in the above code do to variable Varname?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Do you get an ERROR in the LOG when you run this??? What does happen when you run this???
VARNAME is the name of a SAS variable. If this variable exists, it should contain as values the name of SAS variables ... so the NOT IN tests to see if the value of variable varname is not in the collection of values: 1 and 2 and 3; but these values are not a valid names for a SAS variable, which has to be a character string and can't begin with a number.
So this code doesn't make the slightest bit of sense to me.
Paige Miller
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
It won't have any effect on varname or whatever variable that represents. What it will do is create a new variable (i.e., varname1) that will be missing where varname has values of 1, 2 or 3, or will have the values of varname.
Art, CEO, AnalystFinder.com