4

I am using IBM Data Studio as Development environment,

 CREATE OR REPLACE PROCEDURE TEST()
 is
 BEGIN
  DBMS_OUTPUT.PUT_LINE("Hi there.");
 END;

I can see in execution details like time, exception if any, other info in SQL Results window. Is IBM studio is storing OUTPUT details in some file ? If so than i would like to know location.

How can enable this feature witch can provide this.

leo_roar_001
  • 181
  • 1
  • 10

1 Answers1

1

It is not possible to see the output in Data Studio (I think this is more related to how Eclipse deals with stdout). The DBMS_OUTPUT is for console only. As explained in DBMS_OUTPUT, these messages are put in the "message buffer" which at the end of the executing is sent to the standard output.

If you want to write messages like a log, I recommend to use a logger system like log4db2 instead of using DBMS_OUTPUT built-in module.

AngocA
  • 7,655
  • 6
  • 39
  • 55
  • This has nothing to do with stdout, obviously. `DBMS_OUTPUT` is intended to be used in CLP and CLPPlus scripts. – mustaccio Sep 10 '15 at 00:26
  • From the DB2 Official documentation: "These procedures are useful during application debugging when you need to write messages to standard output" – AngocA Sep 10 '15 at 14:17
  • What does "standard output" mean in this case? – AngocA Sep 10 '15 at 14:18
  • CLP and CLPPlus retrieve messages from the message buffer (which is simply an array of strings defined in the `DBMS_OUTPUT` module) and, being console applications, print them to the only medium available to them -- standard output. So, `DBMS_OUTPUT` does not have any access to, or knowledge of, stdout; CLP and CLPPlus do. – mustaccio Sep 10 '15 at 14:26