Re: DBMS_PIPE messages lost
From: Ari Likki <likkiar1_at_news.ougf.fi>
Date: 23 Feb 1995 18:50:51 -0200
Message-ID: <3iisfbINN1v7_at_news.ougf.fi>
pkd := dbms_pipe.send_message('DBPRO'); if pkd <> 0 then
raise_application_error(-20000,'A100:Send failed.'); end if;
:
:
Date: 23 Feb 1995 18:50:51 -0200
Message-ID: <3iisfbINN1v7_at_news.ougf.fi>
Ariel Zach (logon_at_actcom.co.il) wrote:
: Hello, there!
: It so seems that messages sent by DBMS_PIPE.SEND_MESSAGE
: was not received by DBMS_PIPE.RECEIVE_MESSAGE from the same pipe name.
: Moreover, the RECEIVE woke up later due to a timeout and never receive the
: message.
: Does anyone know what this could be and how to avoid it?
: Thanks,
: Amir
Check that you are logged on to the database. Pipe name in send/receive command is written in the same way.
You don't give much information in your question, but here is one example that works:
---sending....
:
:
:
dbms_pipe.pack_message('A100'); dbms_pipe.pack_message('I'); dbms_pipe.pack_message(to_char(sysdate,'YYMMDDHHMISS')); dbms_pipe.pack_message(asno);
pkd := dbms_pipe.send_message('DBPRO'); if pkd <> 0 then
raise_application_error(-20000,'A100:Send failed.'); end if;
:
:
---receiving.... (in COBOL pgm)
EXEC SQL EXECUTE DECLARE STA NUMBER; BEGIN STA := DBMS_PIPE.RECEIVE_MESSAGE('DBPRO'); IF STA <> 0 THEN :pkd := 'TIME OUT'; ELSE DBMS_PIPE.UNPACK_MESSAGE(:TKD); DBMS_PIPE.UNPACK_MESSAGE(:WINSUPD); DBMS_PIPE.UNPACK_MESSAGE(:WPVKLO); DBMS_PIPE.UNPACK_MESSAGE(:WASNO); :pkd := 'OK'; END IF; END; END-EXEC.
Regards Ari
/****************************************************//* Ari Likki/United Magazines Ltd/Helsinki/Finland */
/****************************************************/Received on Thu Feb 23 1995 - 21:50:51 CET