creating a routine for excahnge of foriegn currency

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
adamgo
Participant
Posts: 1
Joined: Wed Aug 09, 2006 1:02 am

creating a routine for excahnge of foriegn currency

Post by adamgo »

I am about to write a new routine for exchange of foreign currency.
the routine will accept these 4 inputs :
the date , the currency code, the desired currency code and the sum.
the output will be the exchanged sum.

all the data is stored in a hash file.

my question is so :
a. did any one write a similar routine ?
b. will the hash file be opened and scanned for each time it shall be called or will the DS upload the hash file to the memory the first time and after that it will just scan for the output each time ?

my main concern is that the performance will not be damaged by running this routine.

help will be appreciated
thank you
A.
AG
loveojha2
Participant
Posts: 362
Joined: Thu May 26, 2005 12:59 am

Post by loveojha2 »

I am kind of confused with your post about the content of the Hashed File,

are you saying that your Hashed File is actually having the exchange rate?

If yes, then it's a lookup. (I guess this is what your case is)

If it is containing the data to be converted then it has to be processed for each row.

About the performance, I don't think it would cost too much if it's just a lookup for the exchange rate else if you are doing every thing in the routine then of course it depends on the complexity of the routine (But this can also be optimised, if many transaction are on a single date).

We would need more information, how are planning to do it?
What are the steps invloved in your routine?
Success consists of getting up just one more time than you fall.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

the date , the currency code, the desired currency code and the sum
This will be input. But you need to have a hash file (in your case) which holds the conversion rate for that date. So that you can do a lookup on the date and or the currency code to get the conversion rate for that poit of time.
And this hash file should be refreshed periodically.
As said, this can be accomplished by lookup. So you dont need to write a routine.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The technology will allow you to take a feed from a site such as XE.com to guarantee that your exchange rates are as up to date as possible.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply