IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

value is not populating properly while inserting


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
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
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
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: 6966
Location: porcelain throne

PostPosted: Wed Dec 31, 2008 1:12 pm
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Inserting variable length into output... JCL & VSAM 2
No new posts Inserting records in a file on a valu... DFSORT/ICETOOL 18
No new posts Cobol Db2 program (inserting Char Equ... COBOL Programming 0
No new posts Storage issue when inserting Chinese ... COBOL Programming 1
No new posts OMVS Shell Script not working properly. All Other Mainframe Topics 1
Search our Forums:

Back to Top