To do so you need to create a user defined messages program and enable it by changing a data area.
We have made a template program that you will find in the source file QSAMPLE. The template is named USRMON.
For each message that occurs in BlueNote this program is called. Here you can write your own message forwarding system to other platforms like Tivoli of Server Vantage – or call others programs that correct the error situation.
In the below template program it’s simply writes the message to a text stream file on the IFS.
The call of this program is controlled by the contents of data area MSGMONPGM *CHAR(21) where the value is library SLASH program name
The changing of the data area has immediate effect. However if you recompile or replace the user exit you need to restart the subsystem.
Template:
* -----------------------------------------------------------------------
*
* Copyright [2013] [System & Method Technologies]
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or impli
* See the License for the specific language governing permissions and
* limitations under the License.
* -----------------------------------------------------------------------
*
* Program . . . : MSGMON
* Design . . . : Niels Liisberg
* Function . . : Simple message sender.
*
*
* For each message that occurs in BlueNote this program is called.
* Here you can write your own message forwarding system to other
* platforms like Tivoli of Server Vantage
*
* This program simply writes the message to a text stream file
* on the IFS
*
* The call of this program is controlled by the contents
* of data area MSGMONPGM *CHAR(21) where the value
* is library SLASH program name
*
* CHGDTAARA DTAARA(BLUENOTE/MSGMONPGM) VALUE('BLUENOTE/MSGMON ')
*
* The changing of the data area has immediate effect. However
* if you recompile or replace the user exit you need to restart the
* subsystem.
*
*By Date Task Description
* NLI 12.02.2013 0000000 New program
* -----------------------------------------------------------------------
h bnddir('QC2LE')
h dftactgrp(*NO)
h actgrp('QILE')
* External structures - received as parameters
* Note: these structures is subject to change,
* and recompile may be required from release to release
d USR00DS E DS extName(USR00)
d MSP00DS E DS extName(MSP00)
d RCVM20 E DS extName(RCVM0200)
* Prototypes
/include ifs
d e2a...
d pr extpgm('E2A')
d bufLen 5P 0 const
d bufStr 4096 options(*varsize)
* Local variables
d outFile s 10I 0
d ok s 10I 0
d buf s 4096
d bufLen s 10I 0
* Program entry
c *entry plist
c parm USR00DS
c parm MSP00DS
c parm RCVM20
/free
// ---------------------------------------------------------------------
// Write messages to text stream file
// ---------------------------------------------------------------------
// first open the stream - create it if it does not exists
outFile = open(logfile :
O_WRONLY + O_CREAT + O_APPEND + O_CCSID :
S_IRWXU + S_IRWXG + S_IRWXO:
1252
);
if (outFile < 0);
// Handle file not open
*InLR = *On;
return;
endif;
// Now build up the buffer and count the current length
buf = '';
%subst(buf: 01: 30 ) = usText;
%subst(buf: 31: 256) = mpText;
bufLen = %len(%trimr(buf));
// The buffer need to be in ascii
// Convert and add the Newline sequence <CR><LF>
e2a (bufLen : buf);
%subst(buf: bufLen+1 : 2) = x'0d0a';
bufLen += 2;
// Ready to put the record
ok = write(outFile: %addr(buf) : bufLen );
ok = close(outFile);
return;
/end-free
I hope that the above information is sufficient for your evaluation of BlueNote.
Re: Activating a program on a given message received by BlueNote
Hi,
To do so you need to create a user defined messages program and enable it by changing a data area.
We have made a template program that you will find in the source file QSAMPLE. The template is named USRMON.
For each message that occurs in BlueNote this program is called. Here you can write your own message forwarding system to other platforms like Tivoli of Server Vantage – or call others programs that correct the error situation.
In the below template program it’s simply writes the message to a text stream file on the IFS.
The call of this program is controlled by the contents of data area MSGMONPGM *CHAR(21) where the value is library SLASH program name
CHGDTAARA DTAARA(BLUENOTE/MSGMONPGM) VALUE('BLUENOTE/MSGMON ')
The changing of the data area has immediate effect. However if you recompile or replace the user exit you need to restart the subsystem.
Template:
I hope that the above information is sufficient for your evaluation of BlueNote.
But don’t hesitate to contact me again.
Best regards,
Martin H. Olsen