Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

Ttruncation happen in db2 table while storing character

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
sivasaras

New User


Joined: 29 Sep 2007
Posts: 90
Location: chenna/i-

PostPosted: Fri Sep 27, 2013 8:53 pm    Post subject: Ttruncation happen in db2 table while storing character
Reply with quote

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
View user's profile Send private message

Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1755
Location: Bloomington, IL

PostPosted: Fri Sep 27, 2013 9:01 pm    Post subject:
Reply with quote

How is the column defined?
Back to top
View user's profile Send private message
sivasaras

New User


Joined: 29 Sep 2007
Posts: 90
Location: chenna/i-

PostPosted: Fri Sep 27, 2013 9:04 pm    Post subject:
Reply with quote

the db2 column is defined as VARCHAR(200) NOT NULL,
Back to top
View user's profile Send private message
Akatsukami

Global Moderator


Joined: 03 Oct 2009
Posts: 1755
Location: Bloomington, IL

PostPosted: Fri Sep 27, 2013 9:12 pm    Post subject:
Reply with quote

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
View user's profile Send private message
dick scherrer

Site Director


Joined: 23 Nov 2006
Posts: 19270
Location: Inside the Matrix

PostPosted: Fri Sep 27, 2013 9:12 pm    Post subject:
Reply with quote

Hello,

Suspect your host variable is not defined correctly. . .
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts unload data from table with lob columns farhad_evan DB2 0 Sat Apr 22, 2017 1:32 pm
No new posts Data replication from multiple Db2 ta... kishpra DB2 9 Mon Mar 27, 2017 9:58 pm
No new posts how to send just 10 rows in a CICS sc... Megha Gupta CICS 5 Thu Feb 23, 2017 6:57 pm
No new posts the use of 'B3'x character in a panel Pedro TSO/ISPF 1 Thu Feb 16, 2017 3:09 am
No new posts Join of more than one table dibyendumandal11111 DB2 6 Mon Feb 13, 2017 11:36 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us