I have a data with issue and issuecode, both containing separators. I want to get a summary data with different issues corresponding to different issuecode, and the frequency of each type of issues (3 variables in the data). Ideal output issue issuecode freq A 1 1 B 2 1 C 3 2 D 4 1 E 5 1 I tried using the following to generate separate variables for each issue, but that did not help me get the ideal output data. Any help is greatly appreciated. My program data want; set book1; array code(20) $25; array text(20) $25; k=countw(issue,'|'); do _n_=1 to k; code(_n_)=strip(scan(scan(issuecode,_n_,'|'),1,'--')); text(_n_)=strip(scan(scan(issue,_n_,'|'),1,'--')); end; drop k; run; Original data id date issue issuecode 1 1/1/2001 |A|B|C| |1|2|3| 2 10/1/2002 |C|D| |3|4| 3 4/2/2009 |E| |5|
... View more