Usage of Convert function

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
josemathew
Participant
Posts: 7
Joined: Tue Jul 24, 2007 4:08 am
Location: Bangalore

Usage of Convert function

Post by josemathew »

Hi All,
When we used the Convert function, the job gives complation error. Within the Convert function, we gave all the alphabets so that all the alphabets are replaced by blank space.That is :
Convert("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmno
pqrstuvwxyz","", ToXfmCaseStudy.CHAR_CD)

I think there is a limitation in the length for the list string.

Please give your thoughts on this

Regards
Jose
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

There is no limit to string constant lengths close to what you have. If you cut-and-pasted the derivation then I would guess that your "ToXfmCaseStudy.CHAR_CD" is invalid. What is your compile time error?
josemathew
Participant
Posts: 7
Joined: Tue Jul 24, 2007 4:08 am
Location: Bangalore

Post by josemathew »

The input string is valid( string is A123-6A). From this i need to get only numeric values,like 1236. For this we gave all the characters in the list part of Convert function. There we get the complie error: "Error Compliling Transformer and Transformer name".
In More details it is given: ##I TUTL 000031 03:58:52(001) <main_program> The open files limit is 2048; raising to 4096."

Pls explain

Thnks
JM
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

The open files warning can be ignored. Try changing your input derivation from a column value to the string "A123-6A". Do you still get a compiler error? Is the line-break in your derivation or was it just the display and cut-and-paste?
Leopold7933
Participant
Posts: 5
Joined: Tue Jan 09, 2007 8:42 pm

Post by Leopold7933 »

try this
X = Oconv("John Smith 1-234", "MCN") X = "1234"
josemathew
Participant
Posts: 7
Joined: Tue Jul 24, 2007 4:08 am
Location: Bangalore

Post by josemathew »

This is in Parallel edition and so we cant use the IConv/OConv functions here


JM
josemathew
Participant
Posts: 7
Joined: Tue Jul 24, 2007 4:08 am
Location: Bangalore

Post by josemathew »

Hi ArndW,

I think the problem was with the line break in the derivation and its working fine now.

Thanks a million for the advice


Jm
Post Reply