Using Reflex with Websphere MQ 5.3
Note that the information below applies to the following version of Websphere MQ and later:
$ mqver
Name: WebSphere MQ
Version: 531.4 FP5314
CMVC level: WMQ-5-3-1-4
BuildType: IKAP - (Production)
Autodetection of Websphere MQ components
Websphere MQ components are autodetected via the macro, MQAD. MQAD requires access to the mqs.ini file which now resides in OSS.
The following steps can be used to autodetect a Websphere MQ 5.3 environment:
• Copy the mqs.ini file to the Guardian environment.
Note that the mqs.ini file is generally located in the var/mqm folder. Also be aware that OSS can only use physical volumes; it cannot access SMF (virtual) volumes, therefore ensure that the destination volume is a physical disk.
cp /var/mqm/mqs.ini /G/VOL/SVOL/MQSINIC
• The copied file will appear as a code 180 file, e.g.
CODE EOF LAST MODIFIED OWNER RWEP PExt SExt
MQSINIC 180+ 1446 02DEC2008 10:15 90,221 NUNU 28 14000
To be able to use it in the Guardian environment, it should be changed to a filecode 101 file using the CTOEDIT utility. Note that the destination filename should be MQSINI:
CTOEDIT MQSINIC , <reflex_object_subvol>.MQSINI
• Ensure that the mqm.manager user can read and write files in the Reflex object subvolume then logon as mqm.manager and volume to the reflex object subvolume.
logon mmq.manger
volume <reflex_object_subvol>.
• Edit the MQAD macro as follows:
Ensure that the mqsc_loc variable is set to the location of the RUNMQSC utility. E.g.
#SET mqsc_loc $SYSTEM.ZWMQBIN.RUNMQSC
• Load the macro as follows:
LOAD /KEEP 1/ MQAD
• Execute the macro:
MQAD
This will create Insertion and Deletion commands for the Reflex SQL Database, named MQSQLIN and MQSQLDEL.
• Ensure that the <reflex owner> user has read access to the MQSQLIN and MQSQLDEL files then logon as <reflex.owner> and volume to the reflex object subvolume.
logon<reflex.owner>
volume <reflex_object subvolume>
• Load the standard Reflex SQL defines:
run rsqldefs
• Insert the autodetected components into the Reflex:
SQLCI /IN MQSQLIN/
Note that the entries are entered into the database as ‘Set-up’ versions and therefore a warmboot is required to make the change ‘live’. Note that a FULL warmboot is required since the autodetect macro does not make use of the Top Level Changes table.
Status Agent for Websphere MQ components
The Status Agent for Websphere MQ makes use of the RUNMQSC utility; providing it with a command file and then parsing the resulting output file as follows:
• The MQ Status Agent (MQAG) writes a command to the MQCOMM file.
• The MQCOMM file is then read and processed by the MQ Series utility, RUNMQSC.
• RUNMQSC writes its output to the MQOUT file.
• The contents of the MQOUT file are read and processed by the MQ Status Agent (MQAG).
This means that the following security requirements must be adhered to:
• The MQ Status Agent (MQAG) must have write access to MQCOMM
• The RUNMQSC utility must have read access to MQCOMM
• The RUNMQSC utility must have write access to MQOUT
• The MQ Status Agent (MQAG) must have read access to MQOUT
In a configuration where Reflex is owned by 90,10 and Websphere MQ is owned by 251,255, a method of providing this security is as follows:
• Secure MQCOMM as NNNN and owned by 90,10
i.e. FUP SECURE MQCOMM, NNNN
FUP GIVE MQCOMM, 90,10
• Secure MQOUT as NNNN and owned by 251,255
i.e. FUP SECURE MQOUT, NNNN
FUP GIVE MQOUT, 251,255
• Progid MQAG as 251,255
i.e. Logon SUPER.SUPER
FUP GIVE MQAG,251,255
FUP SECURE MQAG , , PROGID
The following Reflex Admin File Aliases must also be configured:
MQCOMM - Location of the command file sent to RUNMQSC
MQOUT - Location of the output file used by RUNMQSC
The following Reflex Admin parameters must also be configured:
MQSC-CPU - CPU number to use for the RUNMQSC process
MQSC-LOCATION - Location of the Guardian RUNMQSC object
MQSC-PRIORITY - Priority to use for the RUNMQSC process
MQSC-PROCESS - Processname used for the RUNMQSC process
MQVOLUME - MQ’s default volume (MQ 5.1 param)
MQDEFAULTPREFIX – MQ’s default prefix (MQ 5.1 param)
* Note that the following parameters have been configured but are not currently being used. A beta version of MQAG was coded to try to produce an agent that worked with the initial release of Websphere MQ 5.3 and this version used those fields in the param message that is sent to the TACL process that runs RUNMQSC. Once the updated version of Websphere MQ 5.3 was installed, it was found that the original MQAG program worked.
* MQNSKOPTPATH - This is the location of the opt folder e.g. /opt/mqm
* MQNSKVARPATH - This is the location of the var folder e.g. /var/mqm
If the parameters are not configured, the following default values will be used:
MQSC-CPU - 0
MQSC-LOCATION - $SYSTEM.SYSTEM.RUNMQSC
MQSC-PRIORITY - 50
MQSC-PROCESS - $RFMQ
MQVOLUME - $SYSTEM
MQDEFAULTPREFIX – $SYSTEM
Important Note:
With the current release of Websphere MQ, when the MQ Status Agent asks for the status of a channel that has not been used via the command “display chstatus ( <channel name>) all” , the correct reply is displayed in the GUI e.g.
..MQSC > 2 : display chstatus (SYSTEM.AUTO.RECEIVER) all
..AMQ8420: Channel Status not found.
But the RUNMQSC process abends. This is a bug in the RUNMQSC command which can be recreated from TACL as follows:
$OSS KARL 12> fup copy mqcmdch
display chstatus (SYSTEM.AUTO.RECEIVER) all
1 RECORDS TRANSFERRED
$OSS KARL 11> run $system.zwmqbin.runmqsc /in mqcmdch, out mqresch/
ABENDED: $Z5G2
CPU time: 0:00:00.010
1: Process terminated with warning diagnostics
$OSS KARL 12>fi mq*ch
$OSS.KARL
CODE EOF LAST MODIFIED OWNER RWEP PExt SExt
MQCMDCH 101 2110 03DEC2008 9:55 251,255 NGNG 14 14
MQRESCH 101 384 03DEC2008 9:57 251,255 NGNG 14 14
$OSS KARL 13> fup copy mqresch
0791003, 5724-A39 (C) Copyright IBM Corp. 1993, 2007 All Rights Reserved.
Starting MQSC for queue manager venus.queue.manager.
MQSC > 1 : display chstatus (SYSTEM.AUTO.RECEIVER) all
AMQ8420: Channel Status not found.
MQSC >One MQSC command read.
No commands have a syntax error.
One valid MQSC command could not be processed.
9 RECORDS TRANSFERRED
N.B. the beta version of MQAG that uses the MQNSKOPTPATH and MQNSKVARPATH params does not resolve this crash.