Page 1 of 1

Char data type compatibility with DataSets.

Posted: Thu Feb 01, 2007 10:11 pm
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?

Posted: Thu Feb 01, 2007 10:21 pm
by DSguru2B
What error message are you getting?

Posted: Thu Feb 01, 2007 11:15 pm
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.

Posted: Fri Feb 02, 2007 12:20 am
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.

Posted: Fri Feb 02, 2007 1:30 am
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?

Posted: Fri Feb 02, 2007 1:59 am
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)

Posted: Fri Feb 02, 2007 3:01 pm
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.