data input; input str $; want = substr(str,1,length(str)-indexc(reverse(trim(str)),',')); **trim the input string, reverse it and find the position of last (now first) comma, then substring input string from start to string length minus the number of characters to drop;
... View more