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

Still Facing problem with varchar col in multi-row insert


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

New User


Joined: 30 Jul 2005
Posts: 11
Location: Mysore

PostPosted: Tue Mar 30, 2010 9:59 am
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
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: 6965
Location: porcelain throne

PostPosted: Tue Mar 30, 2010 4:38 pm
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 All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Converting VARCHAR to XML DB2 1
No new posts Problem moving a cobol program into E... COBOL Programming 3
No new posts Sort to insert record in an empty file. DFSORT/ICETOOL 5
No new posts Map Vols and Problem Dataset All Other Mainframe Topics 2
No new posts Insert header record with record coun... DFSORT/ICETOOL 14
Search our Forums:


Back to Top