Why does you data appear all in one column with a delimiter, it sounds like your previous step to import the data is not working. Fix your import program to correctly read in the delimited data and format it correctly. The way you are "fixing" it here in code means that a numeric variable - year - will actually be character which may make working with it more difficult than needs to be. To import the data correctly use a datastep:
data want;
infile datalines dlm="|" dsd;
input var1 $ var2 var3 $;
datalines;
ABC|2015|XYZ
ABC||XYZ
;
run;
Of course this is a simple example (and you would replace datalines with your filename of course), you could also apply formats, informats on how to read the data (for dates etc.).
... View more