Creating the Currency Data Source

How to:

Reference:

Supply values for each type of currency you need.

You must supply the following values in your currency data source:

There is no limit to the number of currencies you can add to your currency data source, and the currencies you can define are not limited to official currencies. Therefore, the currency data source can be fully customized for your applications.

The currency data source can be any type of data source your application can access (for example, FOCUS, FIX, DB2, or VSAM). The currency Master File must have one field that identifies each currency ID you will use and one or more fields to specify the exchange rates.

We strongly recommend that you create a separate data source for the currency data rather than adding the currency fields to another data source. A separate currency data source enhances performance and minimizes resource utilization because the currency data source is loaded into memory before you perform currency conversions.

Syntax: How to Create a Currency Data Source

FILE = name, SUFFIX = suffix,$
FIELD  = CURRENCY_ID,, FORMAT =  A3,                    [ACTUAL = A3 ,]$
FIELD  = rate_1,,      FORMAT = {D12.6|numeric_format1},[ACTUAL = A12,]$
   .
   .
   .
FIELD  = rate_n,,      FORMAT = {D12.6|numeric_formatn}, [ACTUAL = A12,]$

where:

name

Is the name of the currency data source.

suffix

Is the suffix of the currency data source. The currency data source can be any type of data source your application can access.

CURRENCY_ID

Is the required field name. The values stored in this field are the three-character codes that identify each currency, such as USD for U.S. dollars. Each currency ID can be a universally recognized code or a user-defined code.

Note: The code EUR is automatically recognized. You should not store this code in your currency data source. See Sample Currency Codes for a list of common currency codes.

rate_1...rate_n

Are types of rates (such as BUDGET, FASB, ACTUAL) to be used in currency conversions. Each rate is the number of national units that represent one euro.

numeric_format1...numeric_formatn

Are the display formats for the exchange rates. Each format must be numeric. The recommended format, D12.6, ensures that the rate is expressed with six significant digits as required by the European Union conversion rules. Do not use Integer format (I).

ACTUAL An

Is required only for non-FOCUS data sources.

Note: The maximum number of fields in the currency data source must not exceed 255 (that is, the CURRENCY_ID field plus 254 currency conversion fields).

Reference: Sample Currency Codes

On January 1, 1999, Euroland set exchange rates between the euro and other currencies. Countries included in Euroland as of that date are marked with an asterisk (*). The rates are fixed and will not change, although the rates for other countries change over time.

Currency Name

Currency Code

Rate

American dollar

USD

.974298

Austrian schilling

ATS

13.7603

Belgian franc*

BEF

40.3399

British pound

GBP

.625152

Canadian dollar

CAD

1.54504

Danish krone

DKK

7.42659

Dutch guilder*

NLG

2.20371

Deutsche mark*

DEM

1.95583

Euro

EUR

1

Finnish markka

FIM

5.94573

French franc*

FRF

6.55957

Greek drachma*

GRD

340.750

Irish pound*

IEP

0.787564

Italian lira*

ITL

1936.27

Japanese yen or Chinese yuan

JPY

118.377

Luxembourg franc*

LUF

40.3399

Norwegian kroner

NOK

7.34864

Portuguese escudo*

PTE

200.482

Spanish peseta*

ESP

166.386

Swedish krona

SEK

9.20906

Swiss franc

CHF

1/4634

Example: Specifying Currency Codes and Rates in a Master File

The following Master File for a comma-delimited currency data source specifies two rates for each currency, ACTUAL and BUDGET:

FILE = CURRCODE, SUFFIX = COM,$
FIELD = CURRENCY_ID,,    FORMAT = A3,    ACTUAL = A3 ,$
FIELD = ACTUAL, ALIAS =, FORMAT = D12.6, ACTUAL = A12 ,$
FIELD = BUDGET, ALIAS =, FORMAT = D12.6, ACTUAL = A12 ,$

The following is sample data for the currency data source defined by this Master File:

FRF,  6.55957,  6.50000,$
USD,  0.974298,  1.00000,$
BEF,  40.3399, 41.00000,$

WebFOCUS