Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Location
    Rhodesia
    Posts
    28

    Unanswered: 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

  2. #2
    Join Date
    May 2003
    Location
    USA
    Posts
    5,737
    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

  3. #3
    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

  4. #4
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •