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

string concatenation in db2 stored procedure


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

New User


Joined: 16 Oct 2007
Posts: 7
Location: pune

PostPosted: Wed May 21, 2008 1:23 pm
Reply with quote

Hi ,
I am getting compilation error in the db2 stored procedure when i am trying to concatenate messages in the out varchar variable P_message .

set p_message = p_message || 'loads data' ;

here i am trying to append string 'loads data' to the already existing data in p_message.

the below statement is also giving compilation error.
set p_message = p_message || 'number of updated rec' || l_counter ;

here i am trying to concatenate number of updates rec to the already existing data in p_message and the value of l_counter which is calculated in the stored proc.

i am not able to understand why this is giving compilation errors. please help.

regards,
Nithya
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Wed May 21, 2008 2:06 pm
Reply with quote

Could you please tell us the exact error message & code?
Back to top
View user's profile Send private message
Gnanas N

Active Member


Joined: 06 Sep 2007
Posts: 792
Location: Chennai, India

PostPosted: Wed May 21, 2008 2:20 pm
Reply with quote

What is the datatype of operands?

Please visit these links.
publib.boulder.ibm.com/infocenter/dzichelp/v2r2/index.jsp?topic=/com.ibm.db29.doc.sqlref/db2z_withconcatoperator.htm
www.ispirer.com/doc/sqlways38/Output/SQLWays-1-063.html
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Replace each space in cobol string wi... COBOL Programming 3
No new posts PARSE Syntax for not fix length word ... JCL & VSAM 7
No new posts Sortjoin and Search for a String and ... DFSORT/ICETOOL 1
No new posts file manager is doing string conversion IBM Tools 3
No new posts Search string in job at regular Spool... CLIST & REXX 0
Search our Forums:

Back to Top