I am attempting to recode about eight variables into one variable.
As it stands I have a syntax that is as follows:
IF VAR1=1 NewVar=1.
IF VAR2=1 NewVar=2.
IF VAR3=1 NewVar=3.
IF VAR4=1 NewVar=4.
IF VAR5=1 NewVar=5.
IF VAR6=1 NewVar=6.
IF VAR7=1 NewVar=7.
IF VAR8=1 NewVar=8.
ADD VALUE LABELS NewVar 1 '1Label' 2 '2Label' 3 '3Label' 4 '4Label' 5 '5Label' 6 '6Label' 7 '7Label' 8 '8Label'.
However, this does not account for multiple active variables - each variable is a 1 or 0 answer, but each variable could have a 1 in, which is where I'm struggling as I am after a line of code that suggests if there are multiple 1s between the 8 variables that it would recode into a 9th variable called 'Mixed'
Any help would be greatly appreciated
Free Guide: Managing storage for virtual environments
Complete a brief survey to get a complimentary 70-page whitepaper featuring the best methods and solutions for your virtual environment, as well as hypervisor-specific management advice from TechTarget experts. Don’t miss out on this exclusive content!