Formats for NLS |
Overview to European Currency Conversion |
SAS enables you to convert European currency from one country's currency to an equivalent amount in another country's currency. You can also convert a country's currency to euros, and you can convert euros to a specific country's currency.
SAS provides a group of formats, informats, and a function to use for currency conversion. The set of formats EURFRISO can be used to convert specific European currencies to an amount in euros. ISO represents an ISO standard 4214 currency code. For a complete list of the ISO standard 4217 currency codes, see www.bsi-global.com/Technical%2BInformation/Publications/_Publications/tig90x.doc.
Fixed Rates for Euro Conversion |
Twenty-five European countries comprise the EMU (European Monetary Union). The conversion rates for 12 countries are fixed, and are incorporated into the EURFRISO and EURTOISO formats and into the EUROCURR function. The following table lists the currency codes and conversion rates for the specific currencies whose rates are fixed.
ISO Currency Code | Conversion Rate | Currency |
---|---|---|
ATS | 13.7603 | Austrian schilling |
BEF | 40.3399 | Belgian franc |
DEM | 1.95583 | Deutsche mark |
ESP | 166.386 | Spanish peseta |
EUR | 1 | Euro |
FIM | 5.94573 | Finnish markka |
FRF | 6.55957 | French franc |
GRD | 340.750 | Greek drachma |
IEP | 0.787564 | Irish pound |
ITL | 1936.27 | Italian lira |
LUF | 40.3399 | Luxembourg franc |
NLG | 2.20371 | Dutch guilder |
PTE | 200.482 | Portuguese escudo |
Variable Rates for Euro Conversion |
For 13 countries in the EMU, currency conversion rates can fluctuate. The conversion rates for these countries are stored in an ASCII text file that you reference with the EURFRTBL fileref.
The following table lists the currency codes and conversion rates for the currencies of the EMU countries whose rates fluctuate.
ISO Currency Code | Conversion Rate | Currency |
---|---|---|
CHF | 1.60430 | Swiss franc |
CZK | 34.8563 | Czech koruna |
DKK | 7.49009 | Danish krone |
GBP | 0.700132 | British pound |
HUF | 260.325 | Hungarian forint |
NOK | 9.19770 | Norwegian krone |
PLZ | 4.2 | Polish zloty |
ROL | 13.71 | Romanian leu |
RUR | 19.7680 | Russian ruble |
SEK | 9.36591 | Swedish krona |
SIT | 191 | Slovenian tolar |
TRL | 336.912 | Turkish lira |
YUD | 13.0644 | Yugoslavian dinar |
Example: Converting between a European Currency and Euros |
The following example shows the conversion from Belgian francs to euros. The EURFRBEF format divides the country's currency amount by the exchange rate:
CurrencyAmount / ExchangeRate 12345 / 40.3399
Example Code: Conversion from Belgian Francs to Euros data _null_ x=12345 /*convert from Belgian francs to euros*/ put x eurfrbef15.2; run;
Output:
e306,02
The following example shows the conversion of euros to Belgian francs. The EURTOBEF format multiplies euros by the target currency's exchange rate:
EurosAmount * ExchangeRate 12345 * 40.3399
Example Code: Conversion from Euros to Belgian Francs data _null_ x=12345; /*convert from euros to Belgian francs*/ put x eurtobef15.2; run;
Output:
497996.07
Direct Conversion between European Currencies |
The EUROCURR function uses the conversion rate tables to convert between currencies. For conversion between the currencies of two countries,
SAS converts the amount to euros.
Note: SAS stores the intermediate value as precisely as the operating environment allows, and does not round the value.
SAS converts the amount in euros to an amount in the target currency.
SourceCurrencyAmount --> EurosAmount --> TargetCurrencyAmount BelgianFrancs --> euros 12345 / 40.3399 = 306.02456 euros Euros --> FrenchFrancs 306.02456 * 6.55957 = 2007.3895 French francs
Example Code: Conversion from Belgian Francs to French Francs data _null_; x=eurocurr(12345,'bef','frf'); /*convert from Belgian francs to French francs*/ put x=; run;
Output:
x=2007.389499
SAS converts Belgian francs to euros, and then euros to French francs.
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.