BRMS - How to send messages into MSGQ

By kimot, 24 December, 2022

BRMS provides logging into his own SQL table. You can view this log using DSPLOGBRM command. But if you have a need send all or selected BRMS messages into some MSGQ on your system, there is a solution.

You can tell BRMS which MSGQ to use by this call:

CALL QBRM/Q1AOLD PARM('LOGMSGEXT ' '*MSGQ' 'libname' 'objname') 

Then set rule for specific or general MSG:

CALL QBRM/Q1AOLD PARM('LOGMSGEXT ' '*INSERT' 'xxx' 'yyyy' 'zzzzzzz')

xxx - position (1, 2, 35, and so on) to insert the rule.
yyyy - *INC include the message, *EXC exclude the message.
zzzzzzz - message ID, generic message ID or *ALL to be included or excluded

 

To change actual rules you can use:

CALL QBRM/Q1AOLD PARM('LOGMSGEXT ' '*REPLACE' 'xxx' 'yyyy' 'zzzzzzz')
CALL QBRM/Q1AOLD PARM('LOGMSGEXT ' '*REMOVE' 'xxx')

 

To clear all rules:

CALL QBRM/Q1AOLD PARM('LOGMSGEXT ' '*CLEAR')

 

To view current settings

CALL QBRM/Q1AOLD PARM('LOGMSGEXT ' '*DISPLAY')
MESSAGE QUEUE: QUSRBRM/BRMMSGQ.                 
1 *INC BRM1380.                                 
2 *INC BRM1049.                                 
3 *INC BRM10A1.