Hi,
currently i am using OConv and FMT transforms in Basic Transformer.
now i wanted to use normal transformer(parallel) with the same transforms.
but it is not allowing OConv and FMT transforms.
are there any other transform that suits best for parallel transformer.
for eg:-
1) i wanted to convert from internal date format to USFormat in Transformer.
2). format 3 chars length field value to 5 chars length padded with leading zero's .
3). how to call server routine in parallel transformer.
4). how to convert decimal value to numeric value in parallel transformer.
eg:- 45.67 to 46 nearest whole number
Can anybody help me out
transforms need to replace OConv and FMT
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Read the Parallel Job Developer's Guide chapters on Modify stage - particularly the list of data type conversion functions, such as decimal_from_string or decimal_from_decimal.
When you use the expression editor in the Transformer stage you are presented with a set of functions, one class of which are data conversion functions. You can read about these in the same manual.
When you use the expression editor in the Transformer stage you are presented with a set of functions, one class of which are data conversion functions. You can read about these in the same manual.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
thanks all of you for your information.
but i could not find exact parallel function
for 1) Ereplace.
Convert funtion is there, but it is not exactly matching my requirement.
eg:-
field = "4778 "J" STREET SW" should be formatted to
"4778 ""J"" STREET SW" in a csv file.
here Ereplace was working fine if i use basic transformer like this
Trim(Ereplace(In_VEND.THIRD_PARTY_N,'"','""'))
but i wanted the same functionality in parallel transfomer with parallel functions.
2)OConv date conversion
i was using to format date in basic transformer like this
Trim(OConv(@Date,"DMD[2,2]")," ","A"):Trim(OConv(@Time,"MT"),":","A"): FMT(@OUTROWNUM,"6'0'R")
eg:- 08211642000001
is there any function in parallel transformer to get the above date and time format?
3) I wanted to insert the date and time in oracle9i timestamp field, what would be the exact parallel function.
Thanks in advance
but i could not find exact parallel function
for 1) Ereplace.
Convert funtion is there, but it is not exactly matching my requirement.
eg:-
field = "4778 "J" STREET SW" should be formatted to
"4778 ""J"" STREET SW" in a csv file.
here Ereplace was working fine if i use basic transformer like this
Trim(Ereplace(In_VEND.THIRD_PARTY_N,'"','""'))
but i wanted the same functionality in parallel transfomer with parallel functions.
2)OConv date conversion
i was using to format date in basic transformer like this
Trim(OConv(@Date,"DMD[2,2]")," ","A"):Trim(OConv(@Time,"MT"),":","A"): FMT(@OUTROWNUM,"6'0'R")
eg:- 08211642000001
is there any function in parallel transformer to get the above date and time format?
3) I wanted to insert the date and time in oracle9i timestamp field, what would be the exact parallel function.
Thanks in advance
-
- Premium Member
- Posts: 385
- Joined: Tue Oct 07, 2003 4:55 am
Hi,
To replicate the Iconv/Oconv "D" option you can use the function - Returns the number of days from source date to the given date where the source date is 1967-12-30 (iconv = 0)
This will transform your date from int representation to date and vice versa.
You can do the same for the iconv time options by usingwith midnight as base_timestamp.
You have functions that brings you the current time/date like . you just have to play with the formats to get your need.
HTH,
Amos
To replicate the Iconv/Oconv "D" option you can use the
Code: Select all
DaysSinceFromDate
This will transform your date from int representation to date and vice versa.
You can do the same for the iconv time options by using
Code: Select all
SecondsSinceFromTimestamp
You have functions that brings you the current time/date like
Code: Select all
CurrentDate() , CurrentTime()
HTH,
Amos