Page 1 of 1

Passing job parameter to Convert function

Posted: Tue Aug 27, 2013 1:05 pm
by wgrondin
Hello all. I currently have a job that removes all except spcified characters from an input file. The characters are to retain are specified in the following format - Char(32) : Char(33) ... and so on. The list is about 100 characters, and I am trying to pass this in to the Convert function using a job parameter by entering the text "Char(32) : Char(33)" i the parameter value.
When I use the parameter, however, the characters "C", "h", "a", "r", "(", "3", "2", ")", " ", ":" are what get read in by the Convert function.
When I hard code the Char(nn) function into the transformer, then it works as intended.
Has anyone faced this issue before and resolved it? I want to be able to change the characters retained by changing the parameter, rather than having to hard code them into the job. Thanks for your help!

Posted: Tue Aug 27, 2013 4:14 pm
by chulett
Parameters don't work that way - they are used to pass data into a job. When you pass in function names (as you've seen) they just become strings of data as there isn't a second level of 'resolution'. It is the same reason a parameter cannot reference another parameter.

Off the top of my head, you'll have to hard-code the list in the job. I'm not seeing an alternative at the moment if you really need to use that function... but others might.

Posted: Tue Aug 27, 2013 4:33 pm
by ray.wurlod
Is it possible to build your string in a stage variable instead? If it has to be dynamic, perhaps the beginning and end of the range of codepoint values could be passed as parameters (assuming a contiguous range of characters).