My apologies for the confusion--and thank you for your patience. I imported the data from Excel, but to give an idea of what it would look like for the first rows (noting the datalines are messed up by the string): data help; infile datalines dlm=','; input ID string; datalines; 1234,000004|load|||||| / 001135|on|974|544|Notes|Region2| / 001159|off|950|516|Notes|Region2| / 001160|on|950|516|Notes|Region4| / 001177|off|927|489|Notes|Region4| / 001178|on|927|489|Notes|Region1| / 001183|off|915|475|Notes|Region1| 2345,000006|load|||||| / 002003|on|897|562|Notes|Region3| / 002019|off|886|546|Notes|Region3| / 002021|on|886|546|Notes|Region2| / 002042|off|873|526|Notes|Region2| / 002044|on|873|526|Notes|Region4| / 002130|off|858|501|Notes|Region4| / 3456,000007|load|||||| / 000490|on|784|575|Notes|Region3| / 000524|off|762|537|Notes|Region3| / 000525|on|762|537|Notes|Region2| / 000890|off|734|538|Notes|Region2| / 4567,000007|load|||||| / 000864|on|1014|552|Notes|Region2| / 001047|off|1016|541|Notes|Region2| / ; run; Yes--and thank you, that works for splitting each section (e.g., 001135|on|974|544|Notes|Region2|) into separate variables. I had also split up the preceding text string into separate rows at the / using: data want;set have ; do i=1 by 1 while(scan(oldstring,i,'/')^=' '); string=scan(oldstring,i,'/'); output; end; run; My apologies for any
... View more