Hi everyone, I would like to shorten this code, but couldn't find a working solution yet. data Dataset_new; set Dataset_1 Dataset_2 Dataset_3; if whichc('Y1', of A1-A100, C, F) or ... whichc('Y100', of A1-A100, C, F) or whichc('X', of A1-A100, C, F); run; I want to extract observations, which have ONE OF the listed VALUES (Y1-Y100, X) in ONE OF the listed VARIABLES (A1-A100, C, F). I wonder, if it is possible to sum up all the values in one statement (for example in one "WHICHC"-statement) as they all refer to the same set of variables. Listing multiple values within one "WHICHC"-statement didn't work, no matter, how I tried to separate or combine them (for example by comma, space, "OR"-Operator etc.) I also tried the "IF FIND(CAT())" combination instead of "IF WHICHC()" but listing multiple values in one statement didn't work there either. Inserting an IN()-function and list the values therein, was also not successful. Often I didn't receive any error messages, but the extracted observations were totally wrong. Many thanks in advance, Curt
... View more