Posted: Thu Oct 30, 2003 5:24 am Post subject: INSERT DATA IN DB2 WITH CHAR FIELD (value not pad)
Novice
Joined: 28 Oct 2003 Posts: 15
Hi,
In my message flow a pass a XML message to an CWF fixed length.
The message is well generate, with the fields contain the excepted pad character.
But in the message flow I have to insert the data in a table (DB2) where the fields are CHAR (fixed length). When a invoked my INSERT (after the node MQ Output), the values of the field aren't pad.
There are a way of using my message set definition without explicit in the insert pad the values.
the padding characters are only inserted/taken out by the MRM parser
for/from the bitstream representation of the message.
The message tree representation of your message still
contains the unpadded character strings. Hence your
DB2 UPDATE statement still tries to insert the unpadded
characters which, of course, gives an error if the destination
column is a CHAR.
Thus you *must* use explicit padding in your UPDATE statement
to use CHARs in the table or resort to VARCHARs.
You can use the OVERLAY String function of ESQL perform padding. _________________ Mathias Puetz
IBM/Central WebSphere Services
WebSphere Business Integration Specialist
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum