Iconv returns Null

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
jojipjohn
Participant
Posts: 52
Joined: Wed May 17, 2006 3:40 am
Location: India

Iconv returns Null

Post by jojipjohn »

I have a strange problem. When I am using Iconv function in our production system, What ever be the format I give Its giving me NULL as output.

For Example
I used Iconv("31 DEC 1967","D") ( This is an example given in the Online Manual)
Ideally I should get 0 as output, but I am getting Null.

Is it because of some problem with the setup that Iconv is not working.

however When I am Using Iconv(@Date,"D"), I am getting valid output

Can anyone help me with this please.
Joji John
jojipjohn
Participant
Posts: 52
Joined: Wed May 17, 2006 3:40 am
Location: India

Post by jojipjohn »

We are using NLS setting in our server. Does this creates a problem
Joji John
jojipjohn
Participant
Posts: 52
Joined: Wed May 17, 2006 3:40 am
Location: India

Post by jojipjohn »

Its Resolved.... We were using NLS setting and I Changed the settings to default for this job and it is working.
Joji John
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Whether you're using NLS or not, you can be specific about the order of components in the date, and Iconv() will always work. For example, in your case: Iconv("31 DEC 1967", "DDMY").

Read this wiki entry to enhance your understanding.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply