View previous topic :: View next topic
|
Author |
Message |
sivasaras
New User
Joined: 29 Sep 2007 Posts: 93 Location: chenna/i-
|
|
|
|
Hi,
i have created the field
05 LIT-EMAIL1 PIC X(58) VALUE
"Automated Bill Will be received and acknowledge request ".
05 LIT-EMAIL2 PIC X(33) VALUE
"has been assigned to".
while storing this value into the table it is storing as below and it is truncation first 2 characters
'tomated Bill Will be received and acknowledge request'
please let me know.
Thanks
siva |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
How is the column defined? |
|
Back to top |
|
|
sivasaras
New User
Joined: 29 Sep 2007 Posts: 93 Location: chenna/i-
|
|
|
|
the db2 column is defined as VARCHAR(200) NOT NULL, |
|
Back to top |
|
|
Akatsukami
Global Moderator
Joined: 03 Oct 2009 Posts: 1788 Location: Bloomington, IL
|
|
|
|
sivasaras wrote: |
the db2 column is defined as VARCHAR(200) NOT NULL, |
Well, there's your problem; a VARCHAR is proceeded by a two-byte length field. When performing your assignment, DB2 assumes that the source is also proceeded by a length field.
Try something like this:
Code: |
01 WS-VAR-SIM.
05 WS-LENGTH-SIM PIC 9(4) COMP-5 VALUE 58.
05 WS-LIT-EMAIL1 PIC X(58) VALUE
"Automated Bill Will be received and acknowledge request ". |
and insert WS-VAR-SIM. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Suspect your host variable is not defined correctly. . . |
|
Back to top |
|
|
|