Using a regular expression can solve the task. Have a look at the functions prxparse, prxmatch and prxposn.
data work.want;
length
ProdCode $ 3 mrsp holidayprice 8
_rx 8
;
format mrsp holidayprice 10.2;
retain _rx;
drop _rx;
if _n_ = 1 then do;
_rx = prxparse('/([A-Z]+)(\d+\.\d\d)(\d+\.\d\d)/');
end;
input;
if prxmatch(_rx, strip(_infile_)) then do;
ProdCode = prxposn(_rx, 1, strip(_infile_));
mrsp = input(prxposn(_rx, 2, strip(_infile_)), best32.);
holidayprice = input(prxposn(_rx, 3, strip(_infile_)), best32.);
end;
datalines;
ACR7.957.80
MGI4.754.00
BLD112.25109.75
CFP9.659.25
MAL8.258.10
CM45.9045.30
AZC1.991.93
CMW20.0019.00
AMZ2.702.30
GAC52.0050.25
;
run;
... View more