Hi,
Check the manuals for conversion routines (Iconv/Oconv)if you must or browse your built in routines.
Bare in mind implicit conversion will occur if needed and there are also routines for arithmetic operations on character type columns like SADD and such.
IHTH,
Roy R.
Time is money but when you don't have money time is all you can afford.
Thank you very much for your input. However, I tried to use SADD function in the transformer and it gives an error. Therefore, I assume that it can be used only in the routines and not in the transformer. Could you please confirm whether my assumption is correct.
DataStage will do the conversion for you automatically. If you have an input VARCHAR(10) column called MyString containing the value "1943.100" you can create an output column in a transform called MyNumber, you can do a derivation such as "In.Mystring*3.14159" and it would convert for you automatically.
SADD did not give you an error. Your job would have compiled correctly with SADD(x,y) in an expression.
What you saw was the expression being red, which indicates that the expression editor's parser discovered a syntax problem. This is because the SADD function - which is a legal BASIC function - does not appear in the DSParams file, from which the expression editor's parser discovers its list of "known" functions.
If you want to use the string math functions, you can add SADD, SSUB, SMUL and SDIV into the DSParams file on the server. Sting math functions give unlimited precision.
However, type casting is automatic in server jobs, as Arnd stated, so you don't need to convert string to decimal - you can just use regular arithmetic operators.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
You exactly hit the nail on the head. When I put in SADD(x,y) in the transformer, it was showing red color. Now, I understand why it did that and how to overcome that.