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
 

 

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: 6966
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 SYMNAMES problem jacobdng DFSORT/ICETOOL 7 Thu Dec 22, 2016 7:47 am
No new posts Problem in writing Output file vickey_dw COBOL Programming 5 Mon Nov 14, 2016 11:14 pm
No new posts Low values Results from VARCHAR FORMAT balaji81_k DB2 10 Thu Oct 20, 2016 1:18 am
No new posts Problem in Running Query via JCL vickey_dw DB2 3 Tue Oct 18, 2016 11:11 pm
No new posts DB2 Streaming Batch Processing Problem Manshadi DB2 4 Sat Sep 24, 2016 12:14 pm


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