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.
creating a routine for excahnge of foriegn currency
Moderators: chulett, rschirm, roy
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?
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.
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.the date , the currency code, the desired currency code and the sum
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'
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact: