Schema file issue

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
GJ_Stage
Participant
Posts: 131
Joined: Mon Oct 27, 2008 6:59 am

Schema file issue

Post 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.
jwiles
Premium Member
Premium Member
Posts: 1274
Joined: Sun Nov 14, 2004 8:50 pm
Contact:

Post 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,
- james wiles


All generalizations are false, including this one - Mark Twain.
GJ_Stage
Participant
Posts: 131
Joined: Mon Oct 27, 2008 6:59 am

Post by GJ_Stage »

Thank you.I will try.
Post Reply