proc format;
picture aud low-<0='0,000,000,009.00'
(prefix='-AU$' mult=100)
0–high='0,000,00,009.00 '
(prefix='AU$' mult=100);
picture sfr low-<0='0,000,000,009.00'
(prefix='-SFr.' mult=100)
0–high='0,000,00,009.00 '
(prefix='-SFr.' mult=100);
picture bpd low-<0='0,000,000,009.00'
(prefix='-BPd.' mult=100)
0–high='0,000,00,009.00 '
(prefix='BPd.' mult=100);
run;
data currency;
input aud sfr bpd 12.2;
datalines;
12345 12345 12345
0 0 0
-12345 -12345 -12345
;
proc print data=currency noobs;
var aud sfr bpd;
format aud aud. sfr sfr. bpd bpd.;
title 'Unique Currency Formats';
run;
options locale=english_UnitedStates; data _null_; x=12345; put x
nlmnyi15.2; run;Output: USD12,345.00
data curr;
input ex_date mmddyy. usd aud hkd jpy sgd 12.2;
datalines;
061704 1.00000 1.45349 7.79930 110.110 1.71900 1
;
proc print data=curr noobs label;
var ex_date usd aud hkd jpy sgd;
format ex_date mmddyy. usd nlmnlusd15.2 aud nlmnlaud15.2 hkd
nlmnlhkd15.2
jpy nlmnljpy15.2 sgd nlmnlsgd15.2;
2
label ex_date='Date' usd="US" aud='Australia' hkd='Hong Kong'
jpy='Japan' sgd='Singapore';
title 'Exchange Rates for Selected Asian-Pacific Countries
(Localized Currency Codes)';
proc print data=curr noobs label;
var ex_date usd aud hkd jpy sgd;
format ex_date mmddyy. usd nlmniusd15.2 aud nlmniaud15.2 hkd
nlmnihkd15.2
jpy nlmnijpy15.2 sgd nlmnisgd15.2;
3
label ex_date='Date' usd="US" aud='Australia' hkd='Hong Kong'
jpy='Japan' sgd='Singapore';
title 'Exchange Rates for Selected Asian-Pacific Countries
(International Currency Codes)';
run;