how to assign values to parameters in jobs

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
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

how to assign values to parameters in jobs

Post by kumar_s »

hi,
I think i am not that good in search, coz i could not get exact match :( .

I need to get a currency code (single value) from a file with respect to a country code. So i tought of doing a lookup. and then to two links, matched and unmatched(Rejected). Obviously Rejected link wouldl get same as the input columns. i need the currency code in this link as well. so i thought of storing in an parameter. But may i know how to store a value into a parameter in a job. (Assuming jobvariables cant be passed to other stages)
-kumar
Sainath.Srinivasan
Participant
Posts: 3337
Joined: Mon Jan 17, 2005 4:49 am
Location: United Kingdom

Post by Sainath.Srinivasan »

If all you want is to pass the input columns to output link columns, then you need not store in the parameter. Just link them to pass through.
pnchowdary
Participant
Posts: 232
Joined: Sat May 07, 2005 2:49 pm
Location: USA

Post by pnchowdary »

Hi Kumar,

A job parameter for a job can not be set within the same job. If you want to pass the stage variables to the next stage, you can write it to a flat file and read it whenever you need it.

Thanks,
Naveen
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post by elavenil »

If i understand your requirement correctly, your reject output and input columns are going to be the same. Even if you add currency code, that is going to have null value due to not maching with lookup. Then i do not see any point to add currency code in the reject output unless you have a special req in your project.

HTWH.

Regards
Saravanan
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

elavenil wrote:If i understand your requirement correctly, your reject output and input columns are going to be the same. Even if you add currency code, that is going to have null value due to not maching with lookup. Then i do not see any point to add currency code in the reject output unless you have a special req in your project.

HTWH.

Regards
Saravanan
No Saravanan,
i have 2 outputs, if it is matched with currenc code then no manipulation, else if not matched, passing feilds by doing some manipulation with currency code.
elavenil
Premium Member
Premium Member
Posts: 467
Joined: Thu Jan 31, 2002 10:20 pm
Location: Singapore

Post by elavenil »

In the earlier post, currency code is obtained from the lookup by using country code. There would be 2 outputs as matching and non-matching(reject). Obviously you would not have any value for the currency code if the currency code is added to reject output.

If you are going to manipulate something using currency code, just pass the column and not required to store that value in the parameter.


Regards
Saravanan
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

elavenil wrote:In the earlier post, currency code is obtained from the lookup by using country code. There would be 2 outputs as matching and non-matching(reject). Obviously you would not have any value for the currency code if the currency code is added to reject output.

If you are going to manipulate something using currency code, just pass the column and not required to store that value in the parameter.


Regards
Saravanan
I think i confused u, first based upon country code one value of currency code is obtained. country code is given as job parameter.
if that currency code is in the current record then it is cosidired as matched and bypassed. if not matched it need some manipulation to convert to correct current currency code by concatinating a field to the obtained currency code.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Can you pre-load the country-code to currency-code mappings from the file into a hashed file, and use standard lookup techniques?
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