alternative to Oconv

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

Post Reply
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

alternative to Oconv

Post 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!!
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
hitmanthesilentassasin
Participant
Posts: 150
Joined: Tue Mar 13, 2007 1:17 am

Post by hitmanthesilentassasin »

that doesn't look so neat way, anyway it confirms that there is no alternate to that. thanks for your response :D
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: alternative to Oconv

Post 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:
-craig

"You can never have too many knives" -- Logan Nine Fingers
priyadarshikunal
Premium Member
Premium Member
Posts: 1735
Joined: Thu Mar 01, 2007 5:44 am
Location: Troy, MI

Post 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.
Priyadarshi Kunal

Genius may have its limitations, but stupidity is not thus handicapped. :wink:
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Double convert can only easily eliminate unwanted characters. The original requirement was to convert them to ".".
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