How about something like this: filename in_file 'your_text_file' lrecl=32767; /* split words separated by spaces */ data in_file; infile in_file length=l; length word_nospace $50.; keep word_nospace; input record $varying32767. l; delims=count(trim(record), ' ')+1; do i=1 to delims; word_nospace=scan(record, i, ' '); output; end; run; /* split words separated by commas */ data in_file; set in_file; keep word_nocomma; delims=count(word_nospace, ',')+1; do i=1 to delims; word_nocomma=scan(word_nospace, i, ','); if not missing(word_nocomma) then output; end; run;
... View more