I have about 29 character variables in a dataset that need to be changed depending on which column it is in. I know how to list all the IF statement like below, but would like to do it different as it will help in similar projects in the future. So if the values are not equal to zero then I need to change the values depending on which column it is in. for example DATA HAVE; LENGTH F1 $2 F2 $2; INPUT F1 $ F2 $ DATALINES; 00 00 10 12 00 12 10 00 ; RUN; DATA WANT; SET HAVE; IF FR1 ^= '00' THEN FR1 = '05'; IF FR2 ^= '00' THEN FR2 = '36'; RUN;
... View more