capture the reject record based on column length

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

ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

Use APT_STRING_PADCHAR to set the pad character to space.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Which is what I meant when I mentioned the "PAD character".
-craig

"You can never have too many knives" -- Logan Nine Fingers
moulipx
Participant
Posts: 22
Joined: Tue Mar 09, 2010 8:13 am

Post 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.
Chandra Mouli
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

... which is as it should be.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post 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? :?
-craig

"You can never have too many knives" -- Logan Nine Fingers
Roopanwita
Participant
Posts: 125
Joined: Mon Sep 11, 2006 4:22 am
Location: India

Post 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
Post Reply