If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > db2 stored proc text

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-15-08, 10:09
db2rocks db2rocks is offline
Registered User
 
Join Date: Jan 2008
Posts: 45
db2 stored proc text

db2 "select text from syscat.routines where routinename='TOTAL_RAISE'"


I am executing the above select to get the text of stored procedure.But it is giving junk characters .Could some one suggest as to how to eliminate that junk from the output
Reply With Quote
  #2 (permalink)  
Old 02-15-08, 15:13
smith43017 smith43017 is offline
Registered User
 
Join Date: Sep 2006
Posts: 92
Reply With Quote
  #3 (permalink)  
Old 02-15-08, 15:38
db2rocks db2rocks is offline
Registered User
 
Join Date: Jan 2008
Posts: 45
Yeah i am getting the similar output..But is there a way that we can use some scalar function in select to eliminate those unwanted symbols like------------------------------------------------------------------------------------------------------------------------------------------------------

in the output???
Reply With Quote
  #4 (permalink)  
Old 02-15-08, 16:39
n_i n_i is offline
:-)
 
Join Date: Jun 2003
Location: Toronto, Canada
Posts: 4,449
Quote:
Originally Posted by db2rocks
Yeah i am getting the similar output..But is there a way that we can use some scalar function in select to eliminate those unwanted symbols like------------------------------------------------------------------------------------------------------------------------------------------------------

in the output???
Those "unwanted symbols" is the output header generated by the DB2 CLP. Use the "-x" command line argument to eliminate it.
Reply With Quote
  #5 (permalink)  
Old 02-15-08, 16:40
stolze stolze is offline
Registered User
 
Join Date: Jan 2007
Location: Jena, Germany
Posts: 2,662
What "unwanted characters" are you referring to? Could you please show us the output and explain what the problem is? SYSCAT.ROUTINES.TEXT contains the text as you typed it in...
__________________
Knut Stolze
IBM DB2 Analytics Accelerator
IBM Germany Research & Development
Reply With Quote
  #6 (permalink)  
Old 02-15-08, 16:47
db2rocks db2rocks is offline
Registered User
 
Join Date: Jan 2008
Posts: 45
yes you are right...It is something to do with my shell script..Thanks for your help
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On