Iconv Oconv
Moderators: chulett, rschirm, roy
Iconv Oconv
Hi there,
There's nothing new about this topic... Except I am super new to parallel jobs having just recently hop from server jobs.
I tried doing something too simple that is :
seq file -> transformer -> seq file.
1 field involved oni. Source seq file is type varchar and des file is type integer.
I just wanted to convert the source data into an integer using iconv.
hence the statement Iconv(thefieldname, "D YMD").
I have not run the job yet but yet it highlights that field in red in the transformer. What gives?
I tried this in server jobs environment there's no problem. Only in parallel. Am I missing something?
regards,
Nick.
There's nothing new about this topic... Except I am super new to parallel jobs having just recently hop from server jobs.
I tried doing something too simple that is :
seq file -> transformer -> seq file.
1 field involved oni. Source seq file is type varchar and des file is type integer.
I just wanted to convert the source data into an integer using iconv.
hence the statement Iconv(thefieldname, "D YMD").
I have not run the job yet but yet it highlights that field in red in the transformer. What gives?
I tried this in server jobs environment there's no problem. Only in parallel. Am I missing something?
regards,
Nick.
Iconv Oconv
Sorry guys I have a bad habit of not posting all my thoughts in a single post... here goes:
What i wanted to do is this. I get a source:
200600212
First 4 fields - year
next 3 - month
last 2 - date
This is in integer format and from a source file.
I wanted to bring this into a transformer and use iconv oconv function to change it into date format and then plus the day by 1 and then reoutputting it as integer again in the above format.
I could do this manually by I had to take note of the no. of days diff between month... so that can be super troublesome especially for FEB date. cause there could be in a leap year.
Any idea guys?
Thanks in advanced.
What i wanted to do is this. I get a source:
200600212
First 4 fields - year
next 3 - month
last 2 - date
This is in integer format and from a source file.
I wanted to bring this into a transformer and use iconv oconv function to change it into date format and then plus the day by 1 and then reoutputting it as integer again in the above format.
I could do this manually by I had to take note of the no. of days diff between month... so that can be super troublesome especially for FEB date. cause there could be in a leap year.
Any idea guys?
Thanks in advanced.
Alternatively you can use to convert to date.
Code: Select all
StringToDate(Input.link[1,4]:Inpu.Link[6,9],"%yyyy%mm%dd")
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
Iconv Oconv
Hi thanks kumar. I've also thought of this. However, i am still searching for a pre-default function that will add the days I want into the date.kumar_s wrote:Alternatively you can useto convert to date.Code: Select all
StringToDate(Input.link[1,4]:Inpu.Link[6,9],"%yyyy%mm%dd")
Date() + 1 doesn't seem to work.
Thanks.