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
 

 

value is not populating properly while inserting

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

New User


Joined: 18 Aug 2008
Posts: 50
Location: Bangalore

PostPosted: Tue Dec 30, 2008 8:00 pm    Post subject: value is not populating properly while inserting
Reply with quote

I have one field in the table which is varchar.
So I have it in working storage as

10 WS-EDIT-MSG-TX.
49 WS-EDIT-MSG-TX-LEN PIC S9(4) USAGE COMP.
49 WS-EDIT-MSG-TX-TEXT PIC X(254).

I am reading that varchar column value of the existing record into WS-EDIT-MSG-TX.
and moving length of WS-EDIT-MSG-TX-TEXT to WS-EDIT-MSG-TX-LEN
and I am inserting the new record with the same value.

so In the exisiting rec the value is abcde fgh
After I ran my pgm.the value in the new rec is showing as <abcde gfh
I am not getting why '<' is appended before the value.
Could anyone suggest me on this.

Thanks,
Sandhya.
Back to top
View user's profile Send private message

Craq Giegerich

Senior Member


Joined: 19 May 2007
Posts: 1512
Location: Virginia, USA

PostPosted: Tue Dec 30, 2008 9:20 pm    Post subject:
Reply with quote

Is the column in the new table you are trying to insert defined as VARCHAR? Show us the code you are using!
Back to top
View user's profile Send private message
dbzTHEdinosauer

Global Moderator


Joined: 20 Oct 2006
Posts: 6968
Location: porcelain throne

PostPosted: Wed Dec 31, 2008 1:12 pm    Post subject:
Reply with quote

if you have 'selected' (you don't read in db2) the varCHAR field, why are you moving the length of WS-EDIT-MSG-TX-TEXT to WS-EDIT-MSG-TX-LEN?

what value are you moving? why are you moving anything?
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 Inserting records based on conditions vickey_dw DFSORT/ICETOOL 9 Wed Feb 22, 2017 1:33 pm
No new posts Query related to inserting an auto po... Gopalakrishnan V DB2 4 Fri Dec 18, 2015 12:09 am
No new posts Inserting a string to a VB file using... mkk157 DFSORT/ICETOOL 6 Fri Oct 31, 2014 6:22 pm
No new posts Inserting new records and how they th... Div Grad DB2 3 Fri Oct 03, 2014 1:19 am
No new posts Syncsort not propogating inpdcb into ... dick scherrer JCL & VSAM 4 Wed May 14, 2014 2:46 am


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