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

When Inserting, Column variables are taking spaces


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
lokeshpg

New User


Joined: 16 Sep 2005
Posts: 10

PostPosted: Mon Oct 03, 2005 5:49 pm
Reply with quote

HI

I'm trying to insert values into an existing table through my db2 application program,but instead of taking the values that i have specified,
the column variables are taking spaces and some other values.


can anyone helpme in solving this problem?
Back to top
View user's profile Send private message
logaas

New User


Joined: 19 Feb 2005
Posts: 25
Location: chennai

PostPosted: Mon Oct 03, 2005 7:20 pm
Reply with quote

Varchar fields in the db2 table have 2 parts in the host variable structure
generated by dclgen-



eg:

name varchar(20)

will have

name-text x(20)
name-len s9(4)


Have u moved spaces to the host variable corresponding to the varchar fields and then move the value to the text portion of the hostvariable


regards

logaas
Back to top
View user's profile Send private message
krishnaiahc

New User


Joined: 31 Aug 2005
Posts: 21

PostPosted: Fri Oct 28, 2005 6:37 am
Reply with quote

I'm trying to insert values into an existing table through my db2 application program,but instead of taking the values that i have specified,
the column variables are taking spaces and some other values.



As per my understanding u'r trying to insert the values into table. but isn't take what u have specified. The table has some other value that is not specified by yourself (i.e space or some value).

If yes, it is due to table creation constraints(i.e default values for the columns).

can anyone helpme in solving this problem?

Hai All ,
If it's not suitable answar please let me correct answer...

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

Active Member


Joined: 23 Aug 2005
Posts: 677
Location: NJ

PostPosted: Mon Oct 31, 2005 12:31 pm
Reply with quote

hi,
plz check the datatypes specified and make sure that you are moving the right value to the right variable. may be the wrong and also if its varchar as per above solution move the length first and then the text.

correct me if i m wrong
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 Replacing 'YYMMDD' with date, varying... SYNCSORT 3
No new posts How to load to DB2 with column level ... DB2 6
No new posts RC query -Time column CA Products 3
No new posts leading spaces can be removed in trai... DFSORT/ICETOOL 1
No new posts first column truncated in search result IBM Tools 13
Search our Forums:

Back to Top