Both of the following procedures set the transaction query band using a parameter named qbin:
CREATE PROCEDURE setqbmsr( IN qbin VARCHAR(60)) BEGIN REQUEST SET QUERY_BAND = :qbin FOR TRANSACTION; INS abc(1,2); END REQUEST; CREATE PROCEDURE qbparm1 ( IN par1 INTEGER, IN qbin VARCHAR(60), OUT qbout VARCHAR(60)) BEGIN REQUEST BEGIN TRANSACTION; SET QUERY_BAND = :qbin FOR TRANSACTION; SELECT GetQueryBand() INTO qbout; END TRANSACTION; END REQUEST;
Result:
CALL qbparm1(10, 'kid=kate;', par3); *** Procedure has been executed. *** Total elapsed time was 1 second. qbout ------------------------------------------------------------ =T> kid=kate;