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
 
Still Facing problem with varchar col in multi-row insert

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

New User


Joined: 30 Jul 2005
Posts: 12
Location: Mysore

PostPosted: Tue Mar 30, 2010 9:59 am    Post subject: Still Facing problem with varchar col in multi-row insert
Reply with quote

After looking at Facing problem with varchar col in multi-row insert I get the same issue - Failing to multi-insert Varchar. The precompiler rejects the array in this form. I could not find any samples using varchar from IBM Manuals and Redbooks.

host variable declaration was
05 WS-NAME
10 WS-NAME-LENGTH OCCURS 100 TIMES PIC S9(9) BINERY.
10 WS-NAME-TEXT OCCURS 100 TIMES PIC X(100).

INSERT INTO <TABLE_NAME> (...)
VALUES(:WS-NAME)
FOR :100 ROWS
Back to top
View user's profile Send private message

Thangaprabhu

New User


Joined: 15 Jul 2009
Posts: 16
Location: INDIA

PostPosted: Tue Mar 30, 2010 11:33 am    Post subject:
Reply with quote

Hi Sundar,

Your host variable declaration should be changed.

05 WS-NAME OCCURS 100 TIMES.
10 WS-NAME-LENGTH PIC S9(9) COMP.
10 WS-NAME-TEXT PIC X(100).

I guess this will work.

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

Global Moderator


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

PostPosted: Tue Mar 30, 2010 4:38 pm    Post subject:
Reply with quote

keep in mind, host variables for var char like to see level 49.

as an aside,
a year or so ago, I attempted to have a multirow UPDATE of var char columns.

was not successful - nor was I able to find any documentation discussing the issue.

could have posted on a db2 forum, but did not.
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 How to insert a value on specific pos... Poha Eater DFSORT/ICETOOL 9 Sun Oct 01, 2017 3:04 am
No new posts LMINIT problem - not finding DDNAME Danielle.Filteau CLIST & REXX 7 Tue Sep 19, 2017 9:57 pm
No new posts Insert a Row_number into table useit DB2 2 Tue Sep 19, 2017 1:07 pm
No new posts Problem commiting to DB2 from IMS MPP Ole Soerensen IMS DB/DC 2 Wed Jul 26, 2017 5:19 pm
No new posts Strings with double quotes having pro... raja Arumugam All Other Mainframe Topics 11 Thu Mar 30, 2017 10:34 am

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