Page 1 of 1

Datastage PX DB2 stage varchar length

Posted: Mon Dec 01, 2008 4:22 am
by zulfi123786
Hi Guys,

I am using a DB2 stage to write to a table and the Default String Length property is set to 32 bytes. what would be the length of varchar field being written into the table, would it be 32 for all entries or would it be the length of the data being written?

For example if i am writing 'sam' into a varchar field what space would it occupy in the table 3 bytes or 32 bytes?

Posted: Mon Dec 01, 2008 2:21 pm
by ray.wurlod
That's something you will need to check with your DBA. Typically VarChar data are stored with a length designator then an unpadded string, though some databases do pad the string to a whole word boundary.