Datastage PX DB2 stage varchar 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

Post Reply
zulfi123786
Premium Member
Premium Member
Posts: 730
Joined: Tue Nov 04, 2008 10:14 am
Location: Bangalore

Datastage PX DB2 stage varchar length

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

Post 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.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply