Oconv MCP is not working

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
basu.ds
Participant
Posts: 118
Joined: Tue Feb 06, 2007 12:59 am
Location: Bangalore

Oconv MCP is not working

Post by basu.ds »

X=Oconv("John^CSmith^X1-234", "MCP") X = "John.Smith.1-234"
The above is supposed to remove all unprintable characters but it is not working on informations server 8.0.1 on windows.
It is returning the same value of the argument .can any one help....


Thanks in advance,
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Code: Select all

FUNCTION TestMCP(Arg1)
TheString = "John" : Char(3) : "Smith" : Char(24) : "X1-234"
Ans = Oconv(TheString, "MCP")
Call DSLogInfo("Value of Status() is " : Status(), "Report")
RETURN(Ans)
Returns "John.Smith.X1-234" and Status() is 0.
Therefore I can't reproduce the problem.
I am on 8.0.1 on Windows, the same as you.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
basu.ds
Participant
Posts: 118
Joined: Tue Feb 06, 2007 12:59 am
Location: Bangalore

Post by basu.ds »

Ans=Oconv(Arg1,"MCP")
This Oconv-MCP function is supposed to remove any unprintable characters in "Arg1"
But on Information server 8.0.1 -windows the MCP function returns the same value of Arg1 and does not remove the unprintable characters


can any body explain why?
Is this a bug in 8.0.1 and does it require a patch?
Kindly help...
Thanks,
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Perhaps your characters are not "unprintable"? Are they actually a single control character or are they two characters, a "^" and a "C" for example like you typed in?
-craig

"You can never have too many knives" -- Logan Nine Fingers
JRodriguez
Premium Member
Premium Member
Posts: 425
Joined: Sat Nov 19, 2005 9:26 am
Location: New York City
Contact:

Re: Oconv MCP is not working

Post by JRodriguez »

basu.ds,

"MCP" convert the non printable character to dots ... it won't remove the non printable characters

The non printable character should be embedded in the string .. in your sample you don't have the actual characters, you have a representation which is printable, so the function just give back the string that you passed

Try below sample which contain embedded tabs character ...

Oconv(" Rodriguez", "MCP")

Result:
..Rodriguez
Julio Rodriguez
ETL Developer by choice

"Sure we have lots of reasons for being rude - But no excuses
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

So that's two votes for "it does work" and then there's you.

What does this suggest to you?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
basu.ds
Participant
Posts: 118
Joined: Tue Feb 06, 2007 12:59 am
Location: Bangalore

Post by basu.ds »

but same conversion is working in 7.5.1 but not in 8.0.1
basu.ds
Participant
Posts: 118
Joined: Tue Feb 06, 2007 12:59 am
Location: Bangalore

Post by basu.ds »

Hi kamesh_sk
Yes your understanding is correct,
Please any one help me on this..




Thanks in advance,
Post Reply