What is the following section accomplishing? */
productSales = INPUT(TRIM(sales), COMMA20.);
SELECT (product);
WHEN (1) productName='Breakfast bar';
WHEN (2) productName='Cookie bar';
WHEN (3) productName='Savory meal bar';
OTHERWISE productName=.;
END;
RUN;
First, it converts a numerical value stored in a character variable into a numeric variable. Next, it creates a long-text character variable from codes in a numeric variable. The "otherwise" branch causes a NOTE concerning a numeric-to-character conversion, because of sloppy coding. The second action is better done with a custom format.
Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!