|
View previous topic :: View next topic
|
| Author |
Message |
sundar28
New User

Joined: 30 Jul 2005 Posts: 11 Location: Mysore
|
|
|
|
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 |
|
 |
Thangaprabhu
New User
.jpg)
Joined: 15 Jul 2009 Posts: 16 Location: INDIA
|
|
|
|
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 |
|
 |
dbzTHEdinosauer
Global Moderator

Joined: 20 Oct 2006 Posts: 6965 Location: porcelain throne
|
|
|
|
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 |
|
 |
|
|