Page 1 of 1

Schema file issue

Posted: Thu Mar 17, 2011 2:58 am
by GJ_Stage
I am not able to read negative value using schema file from sequencial file.

I can read below value and process
00000000000098750
But not able to read below value and getting error message
0000000000000-112
CImpBySchFile,0: Field "i_amt" has import error and no default value; data: {20 0 0 0 0 0 0 0 0 0 0 0 0 0 - 1 1 2}, at offs
et: 581

At present , I am using this statement in my schema file:
i_amt:nullable decimal[17,2] {separate,leading,width=18};

I need your help to solve this issue.

Posted: Thu Mar 17, 2011 7:29 am
by jwiles
The problem is that the sign is not truly a leading sign...that is, it is not at the beginning of the column.

You should read this as a varchar instead of decimal, then trim the leading zeros and convert to decimal in a transformer.

Regards,

Posted: Fri Mar 18, 2011 2:58 am
by GJ_Stage
Thank you.I will try.