Char data type compatibility with DataSets.

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
videsh77
Premium Member
Premium Member
Posts: 97
Joined: Thu Dec 02, 2004 10:43 am
Contact:

Char data type compatibility with DataSets.

Post by videsh77 »

I have flat file (sequential file), having one column containing date values in AIX unix environment.
Since its format is fixed as dd-mm-yyyy, I can suitably define char(10) data type for it. When I go for View data for that stage, it is displaying data properly.
If I try to load the same data in DataSet through transformer in between, the job is not working. DataSet also has data type as char(10).

If I change this Data Type to Varchar, all works as expected. Is there any restriction in using char datatype with datasets?
Thanks with regards,
videsh.
DSguru2B
Charter Member
Charter Member
Posts: 6854
Joined: Wed Feb 09, 2005 3:44 pm
Location: Houston, TX

Post by DSguru2B »

What error message are you getting?
Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Char(10) (called string[10] in the record schema) is fully supported in Data Sets. But you must provide exactly 10 characters to store in one.

We need to know the precise error message if we are to help you to resolve your issue.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
videsh77
Premium Member
Premium Member
Posts: 97
Joined: Thu Dec 02, 2004 10:43 am
Contact:

Post by videsh77 »

Through DataStage Director I have checked the error. I am getting following error.

Field "JoiningDate" has import error and no default value; data: {1 6 - 1 2 - 2 0 0 2}, at offset: 19

This error is observed for all records for this field.
Thanks with regards,
videsh.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

What is the data type of this field and of all preceding fields in the record schema? Can you post the schema?
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
videsh77
Premium Member
Premium Member
Posts: 97
Joined: Thu Dec 02, 2004 10:43 am
Contact:

Post by videsh77 »

Char 10 is the datatype of the field in question.

Schema as requested.

Name - Varchar
Org - Varchar
Year - Integer
Joining_Date - char(10)
Thanks with regards,
videsh.
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Your two VarChar fields are unbounded (they have no maximum length). Is this deliberate?

Also, what you posted is not the record schema (which you can find from the generated OSH).

Please post the exact text of any error message you have received from this job. Otherwise we're guessing.
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