Hi, Please help..I have a SAS dataset that contains all the variables in one column separated by pipe delimiter for different columns. Sample: Row
-------------------
ABC|2015|XYZ
ABC||XYZ I'm using the following code to split it into different variables. data split;
set test;
length var1-var3 $10.;
array var(3) $;
do i = 1 to dim(var);
var[i]=scan(row,i,'|');
end;
run; This code runs fine if all the columns have data. But if any of them are empty like the second row in the sample above, it outputs: var1 var2 var3
-------------------
ABC 2015 XYZ
ABC XYZ I need it to not treat consecutive delimiters as one. The output should be var1 var2 var3 ----------------
ABC 2015 XYZ
ABC XYZ
... View more