Dynamic Variable Name
Posted: Wed May 04, 2005 6:33 am
Hi Everyone
Is it possible to have a dynamic variable name? I ask as I have a particular job that must use several fields in order to determine a customer SAP grouping code. My problem is as such:
The source system is worldwide, I receive a flat file which will be same for every country. Whilst the system is worldwide there is no real control over data entry so each country has implemented its own rule for internal numbering ie the rules that would govern the SAP code for France will not be the same as the rules that would govern the code for the US. Eventually there could be upwards of 60 countries.
I have one universal job for processing the incoming files and producing an output, and I would, if possible, like to keep it that way. I have a routine being used in the transform stage that calls several fields to determine the appropriate group code but as more countries come on line I think that it would become unmanageable, so my thought was to try and have several routines (instead of several jobs) each with a country prefix so it would be called on the basis of the country being processed at the time.
Is this possible - or is there an easier way of implementing such a raft of rules that I have totally missed?
Any help that you could provide would be greatly appreciated.
Is it possible to have a dynamic variable name? I ask as I have a particular job that must use several fields in order to determine a customer SAP grouping code. My problem is as such:
The source system is worldwide, I receive a flat file which will be same for every country. Whilst the system is worldwide there is no real control over data entry so each country has implemented its own rule for internal numbering ie the rules that would govern the SAP code for France will not be the same as the rules that would govern the code for the US. Eventually there could be upwards of 60 countries.
I have one universal job for processing the incoming files and producing an output, and I would, if possible, like to keep it that way. I have a routine being used in the transform stage that calls several fields to determine the appropriate group code but as more countries come on line I think that it would become unmanageable, so my thought was to try and have several routines (instead of several jobs) each with a country prefix so it would be called on the basis of the country being processed at the time.
Is this possible - or is there an easier way of implementing such a raft of rules that I have totally missed?
Any help that you could provide would be greatly appreciated.