× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello
We have external proc which is called by our integration package using DB2 connector. My job is populating information in data queue and external proc is receiving information from data queue and populate information as message queue. See below our external proc code:

DROP TYPE &library.QueuedResponses ;
CREATE TYPE &library.QueuedResponses as VARCHAR(32500) ARRAY[] ;
CREATE OR REPLACE PROCEDURE &library.BT_MSGQ_OUT
DYNAMIC RESULT SETS 1
LANGUAGE SQL
SPECIFIC &library.BT_MSGQ_OUT
NOT DETERMINISTIC
MODIFIES SQL DATA
CALLED ON NULL INPUT
SET OPTION ALWBLK = *ALLREAD ,
ALWCPYDTA = *OPTIMIZE ,
COMMIT = *NONE ,
DBGVIEW = *SOURCE ,
DECRESULT = (31, 31, 00) ,
DFTRDBCOL = *NONE ,
DLYPRP = *NO ,
DYNDFTCOL = *NO ,
DYNUSRPRF = *USER ,
SRTSEQ = *HEX
BEGIN

DECLARE DQNAME CHAR ( 10 ) ;
DECLARE DQLIB CHAR ( 10 ) ;
DECLARE DQRCDLN DECIMAL ( 5 ) ;
DECLARE DQDATA CHAR ( 32500 ) ;
DECLARE DQWAIT DECIMAL ( 5 ) ;
DECLARE NODATA INT ;
DECLARE ARRAYCOUNT INT ;
DECLARE RESPONSES &library.QueuedResponses;

--Cursor is used to execute the data access (Convert array into table result set
DECLARE CR CURSOR WITH RETURN FOR
SELECT MESSAGE
FROM UNNEST(RESPONSES) as RESPONSETABLE(MESSAGE);

--Load RESPONSES array with DataQueue Messages...
SET DQNAME = 'BTQUE_OUT' ;
SET DQLIB = '&library';
SET DQWAIT = 1 ;
SET NODATA = 0 ;
SET ARRAYCOUNT = 0 ;

WHILE NODATA = 0 AND ARRAYCOUNT < 500 DO
SET DQRCDLN = 0 ;
SET DQDATA = '' ;
CALL QSYS.QRCVDTAQ(DQNAME,DQLIB,DQRCDLN,DQDATA,DQWAIT);
IF DQRCDLN > 0 THEN
SET ARRAYCOUNT = ARRAYCOUNT+ 1;
SET RESPONSES [ARRAYCOUNT] = LEFT(DQDATA, INT(DQRCDLN));
ELSE
SET NODATA = 1 ;
END IF ;
END WHILE ;

--Return the cursor result set and end...
OPEN CR;
END ;

The issue is integration package calls this proc, they are not getting data, but when I execute the following command on IBM I, I can dee te data in DQDATA.
CALL QSYS.QRCVDTAQ(DQNAME,DQLIB,DQRCDLN,DQDATA,DQWAIT);
What am I doing wrong or what could be the issue?

Thanks


Nilesh Butala | IT - Enterprise Systems | Sally Beauty Holdings, Inc.
Address: 3001 Colorado Blvd, Denton, TX 76210
Work: 940-297-2993 | Email: NButala@xxxxxxxxxxxxxxx<mailto:NButala@xxxxxxxxxxxxxxx>

This communication (including any attachments) may contain privileged or confidential information intended for a specific individual and purpose, and is protected by law. If you are not the intended recipient, you should delete this communication and/or shred the materials and any attachments and are hereby notified that any disclosure, copying, or distribution of this communication, or the taking of any action based on it, is strictly prohibited.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.