Page 2 of 2

Posted: Wed Dec 07, 2011 3:04 pm
by ray.wurlod
Use APT_STRING_PADCHAR to set the pad character to space.

Posted: Wed Dec 07, 2011 8:01 pm
by chulett
Which is what I meant when I mentioned the "PAD character".

Posted: Wed Dec 07, 2011 10:29 pm
by moulipx
I used APT_STRING_PADCHAR in job properties and to set the pad character to space in Sequential file stage .

And the records which are short of length are rejected for CHAR datatypes.

Posted: Wed Dec 07, 2011 11:51 pm
by ray.wurlod
... which is as it should be.

Posted: Thu Dec 08, 2011 7:39 am
by chulett
Really? Isn't that the whole point of that environment variable to pad short character fields? So reading a comma delimited file where the source data is shorter than the CHAR size noted, it should reject the record rather than simply pad it out to full size? :?

Posted: Fri Apr 12, 2013 4:00 pm
by Roopanwita
Hi,

I am trying to implement same logic , while searching I found

APT_IMPORT_REJECT_STRING_FIELD_OVERRUNS When set, DataStage will reject any string or ustring fields read thatgo over their fixed size. By default these records are truncated.

I set that parameter, still my varchar records are not rejecting.
I added APT_STRING_PAD also 0x20 to make the field expected length .

I have a question,can it reject from Transformer or Source or Target ( menas where there is overflow of data)?
I was trying in Transformaer (in transformer input I have everything defined as varchar 255 and output is desired field lenght).

Can I get same thing done in Source itself i.e ODBC connector stage

Thank you for reply.

Roopanwita