Portal | Manuals | References | Downloads | Info | Programs | JCLs | Mainframe wiki | Quick Ref
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist 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 column with count of rows within dist... ronald wouterson DB2 4 Sun Sep 17, 2017 9:48 pm
No new posts Remove leading spaces from numeric field rexx77 SYNCSORT 6 Wed Sep 06, 2017 2:15 am
No new posts Convert rows and column into JSON for... Dinesh Manivannan DB2 2 Sun Sep 03, 2017 6:50 pm
No new posts editting the file by inserting zeros ... pramodrsingh DFSORT/ICETOOL 9 Mon Aug 21, 2017 5:58 pm
No new posts Select numeric portion from CHAR data... balaji81_k DB2 6 Sat Aug 19, 2017 1:51 am

Facebook
Back to Top
 
Job Vacancies | Forum Rules | Bookmarks | Subscriptions | FAQ | Polls | Contact Us