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 Message /Print facility

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-29-04, 13:08
macjoubert macjoubert is offline
Registered User
 
Join Date: Oct 2003
Location: Rhodesia
Posts: 28
DB2 Message /Print facility

Hello All,

I am quite new to DB2 , is there a similar function /package or plain command like oracle's dbms_output_put OR PRINT command to output a Message text within a stored procedure or sql statement?

for eg I would an output message like this:

IF INPUT > OUTPUT THEN
SET 'MESSAGE' = 'This is an output message of the logical operation' ;

end if

Thanks

DB2 udb Version 8.1
AIX 5.1

Thanks
mac
Reply With Quote
  #2 (permalink)  
Old 08-29-04, 13:24
Marcus_A Marcus_A is offline
Registered User
 
Join Date: May 2003
Location: USA
Posts: 5,196
Not directly. But see this article for writing to a file from a DB2 UDF:

http://www-106.ibm.com/developerwork...0302izuha.html
__________________
M. A. Feldman
IBM Certified DBA on DB2 for Linux, UNIX, and Windows
IBM Certified DBA on DB2 for z/OS and OS/390
Reply With Quote
  #3 (permalink)  
Old 08-29-04, 13:29
macjoubert macjoubert is offline
Registered User
 
Join Date: Oct 2003
Location: Rhodesia
Posts: 28
No actually I dont think thats what im looking for.

How about this idea, capture the message into an output parameter?
Anyone done this?
All I want is a message text displaying the results of a stored procedure.
thanks
mac
Reply With Quote
  #4 (permalink)  
Old 08-30-04, 14:04
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Search in the manuals for GET DIAGNOSTICS and MESSAGE_TEXT

HTH

Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
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