Reputation: 12691
Is there a SAS informat which can be used in version 9.1.3 (similar to NLMNLGBP in 9.2) for reading in £ values?
eg below..
data;
x='£69';
y=input(x,NLMNLGBP3.);/* need 9.1.3 equivalent */
put y=;
run;
Upvotes: 1
Views: 213
Reputation: 4475
If you set your locale to 'English_UnitedKingdom', you can use the NLMNYw.d
informat.
example below:
options locale=English_UnitedKingdom;
data _null_;
format x y best12.;
x=input('(£69)',nlmny32.2); /* parenthesis represents negative */
y=input('£69',nlmny32.2);
put x= y=;
run;
/* On log */
x=-69 y=69
Upvotes: 3
Reputation: 28411
I don't believe this informat was available in 9.1.3 (according to google)
You could try this:
data _null_;
x='£69';
_x=input(compress(x,'£'),8.);
y=put(_x,NLMNLGBP.);
put y=;
run;
Upvotes: 1