Page 1 of 1

how to assign values to parameters in jobs

Posted: Mon Jul 18, 2005 9:06 am
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

Posted: Mon Jul 18, 2005 9:29 am
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.

Posted: Mon Jul 18, 2005 9:30 am
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

Posted: Mon Jul 18, 2005 9:41 am
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

Posted: Mon Jul 18, 2005 9:48 am
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.

Posted: Mon Jul 18, 2005 10:09 am
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

Posted: Mon Jul 18, 2005 11:02 am
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.

Posted: Mon Jul 18, 2005 3:06 pm
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?