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
 

 

When Inserting, Column variables are taking spaces

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
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    Post subject: When Inserting, Column variables are taking spaces
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    Post subject: Re: PROBLEM IN INSERTING TO A TABLE
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    Post subject:
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: 680
Location: NJ

PostPosted: Mon Oct 31, 2005 12:31 pm    Post subject: insert values
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    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 DB2 query Using Recursion, Converting... smilewithashu2 DB2 1 Tue Jan 03, 2017 12:50 pm
No new posts SQZ pipe delimited file with 1 column... Rick Silvers DFSORT/ICETOOL 2 Sun Nov 06, 2016 8:11 pm
No new posts Protection Exception while move 0 to ... Kevin Vaz CICS 10 Tue Oct 18, 2016 4:19 pm
No new posts To trim spaces in a pipe delimited da... Nish84 COBOL Programming 16 Mon Oct 10, 2016 1:54 pm
This topic is locked: you cannot edit posts or make replies. Checking wether a string starts from ... sundaram.naveen CLIST & REXX 9 Thu Oct 06, 2016 11:56 am


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