Page 1 of 1

alternative to Oconv

Posted: Thu May 02, 2013 12:32 am
by hitmanthesilentassasin
Hi,

I was trying to replace the control characters for which oconv does the job:

Code: Select all

oconv(inputfield, "MCP)
However, is there an alternate to this to be done in parallel transformer as I am having trouble with basic transformer timestamp columns.

I have tried the Convert function which truncates all the remaining characters after the control character.

I dont know the list of control characters hence, need to restrict to all the complete printable ascii characters.

Thanks for your help!!

Posted: Thu May 02, 2013 1:26 am
by ray.wurlod
There is no easy alternate for the Parallel Transformer stage.

You could build a list of all non-printing characters (using Char() functions) in the initialization expression of a stage variable and a corresponding list of that many dots in the initialization expression of another stage variable, and use the Convert() function with these stage variables as the first two arguments.

Posted: Fri May 03, 2013 1:37 am
by hitmanthesilentassasin
that doesn't look so neat way, anyway it confirms that there is no alternate to that. thanks for your response :D

Re: alternative to Oconv

Posted: Fri May 03, 2013 7:33 am
by chulett
hitmanthesilentassasin wrote:I am having trouble with basic transformer timestamp columns.
What kind of problem, exactly? Sometimes best to start with the problem rather than your perceived solution to it. :wink:

Posted: Fri May 03, 2013 9:40 am
by priyadarshikunal
I faced problems with timestamp with microsecond when passing through a basic transformer, it was in version 8.0 and cant remember what I did to get through it.


However, what is the point in using a basic transformer if it can be done using double convert easily.

Posted: Fri May 03, 2013 2:38 pm
by ray.wurlod
Double convert can only easily eliminate unwanted characters. The original requirement was to convert them to ".".