04-15-2013 05:45 PM
I have character variables, abscode_1, abscode_2, ..., abscode_8. I'm going to use "if & else" statement in SAS to create a new variable by selecting all the variables.
Here's my question.
I am going to assign a new variable as missing if all the variables are missing. But I don't know how to code this.
I would appreciate your help.
04-16-2013 01:56 AM
Additional information to PGSTATS reply.
n() ==> will count the no of non-missing values in all the variable listed
Call missing will assign missing values to numeric or character variable which is listed in () so we need to decide the new variable typebefore using it in the function. or you can give it as New_variable=.;