You are on page 1of 17

Computer Sciences Corporation

Financial Services Group

Generali China - MQ Configure UAT


AS/400 UAT Configuration

Prepared by
CSC

273443089.doc
Version 1.0

2001, Computer Sciences Corporation.


The document contains proprietary and confidential information and is provided on the basis
that such information will be confidential. This work is copyright. No part may be
reproduced or transmitted in any form or by any means, electronic, mechanical, photocopying,
recording or otherwise or stored in any retrieval system of any nature, without prior written
permission of Computer Sciences Corporation.
The information in this document is believed to be accurate in all respects. The company and
its divisions and subsidiaries cannot, however, assume responsibility for any consequences
resulting from the issue of this information.
CSC Computer Sciences HK Limited
Room 4024-39,
40/F, Sun Hung Kai Centre,
30 Harbour Road, Wan Chai,
Hong Kong
Telephone
Facsimile

+852-2918-8888
+852-2918-8800

CSC (HK) Ltd is a registered company of CSC Financial Services Group. CSC Financial
Services Group is a unit of Computer Sciences Corporation. CSC Financial Services Group
co-ordinates the delivery of all CSC services and products to firms in the financial services
industry. CSC Financial Services Group includes CSC Continuum Inc., Hogan Systems, Inc.
and Alliance-One Services, L.P. On the succeeding edge is a trademark of CSC Continuum
Inc.
Publication History:
V1.0

23rd May 2002

Table of Contents
1.

OVERVIEW.....................................................................................................................2

2.

UAT ENVIRONMENT MQSERIES OBJECTS SET UP............................................4


2.1 Queue Manager........................................................................................................................................4
2.1.1. Dead-Letter Queue.........................................................................................................................4

3.

4.

5.

2.2

Local Queue..............................................................................................................................................4

2.3

Remote Queue..........................................................................................................................................4

2.4

Transmission Queue.................................................................................................................................5

2.5

Sender Channel.........................................................................................................................................5

2.6

Receiver Channel......................................................................................................................................5

2.7

Grant Authority to Queue Manager and Message Queue.........................................................................5

START/END QUEUE MANAGER................................................................................6


3.1

Start Subsystem QMQM..........................................................................................................................6

3.2

Start Queue Manager................................................................................................................................6

3.3

Checking what queue managers you having running...............................................................................7

SENDER/RECEIVER CHANNELS..............................................................................8
4.1

Start Sender channel.................................................................................................................................8

4.2

Start Receiver Channel.............................................................................................................................8

SMART/400 MQ MONITOR..........................................................................................9
5.1

Overview..................................................................................................................................................9

6.

CONFIGURE NOTES...................................................................................................11

7.

ERRORS ON AS/400.....................................................................................................12
7.1 MQSeries Errors.....................................................................................................................................12
7.1.1. Obtaining Diagnostic Information..............................................................................................13
7.1.2. Problem Determination................................................................................................................14
7.2

8.

MQ Monitor Errors.................................................................................................................................14

PROBLEM/TASK LOGS.............................................................................................15

Page i

1. Overview
This document describes the UAT environment MQSeries setup and use of MQ monitor commands.
This document does not intend to explain in details on MQSeries and how MQ monitor work. The
purpose of the document is to help the user understand MQSeries setup and use MQ Monitor
commands.
This document will cover the following areas:

MQSeries Setup
Start/End Queue Manager
Start receiver and sender channel
Start/End Stmart/400 MQ Monitor

Notes:
MQSeries configuration will cover only AS/400 side only.
The following MQ objects have been defined for Generali China SACT environment.
Queue manager

QM1.AS3

Local Queues ( 5)

CSC.NBSR.G40.Q1, CSC.NBSR.G40.Q2,
CSC.NBSR.G40.Q3, CSC.NBSR.G40.Q4,
CSC.NBSR.G40.Q5

Remote Queues (5)

CSC.NBRL.G40.Q1
- Transmission Queue: XQ1.QM1.ISC
- Front-end Local Queue: ISC.NBRL.G15.Q1
CSC.NBRL.G40.Q2
- Transmission Queue: XQ2.QM1.ISC
- Front-end Local Queue: ISC.NBRL.G15.Q2
CSC.NBRL.G40.Q3
- Transmission Queue: XQ3.QM1.ISC
- Front-end Local Queue: ISC.NBRL.G15.Q3
CSC.NBRL.G40.Q4
- Transmission Queue: XQ4.QM1.ISC
- Front-end Local Queue: ISC.NBRL.G15.Q4
CSC.NBRL.G40.Q5
- Transmission Queue: XQ5.QM1.ISC
- Front-end Local Queue: ISC.NBRL.G15.Q5
(Front-end Queue Manager: QM01.ISC)

Transmission Queue

XQ1.QM1.ISC, XQ2.QM1.ISC,
XQ3.QM1.ISC, XQ4.QM1.ISC,

273443089.doc
Version 1.0

XQ5.QM1.ISC
Sender Channel

CSC.G40.ISC.G15.CH1, CSC.G40.ISC.G15.CH2,
CSC.G40.ISC.G15.CH3, CSC.G40.ISC.G15.CH4,
CSC.G40.ISC.G15.CH5

Receiver Channel

ISC.G15.CSC.G40.CH1, ISC.G15.CSC.G40.CH2
ISC.G15.CSC.G40.CH3, ISC.G15.CSC.G40.CH4
ISC.G15.CSC.G40.CH5

AS400 IP

10.0.0.40

Port: 1500

Front-end IP

10.0.1.36

Port: 1603

Although this document describes the MQ objects set up on UAT environment, it can be easily
incorporated in Production environment.

273443089.doc
Version 1.0

2. UAT Environment MQSeries Objects


Set up
2.1

Queue Manager

Its job is to manage queues and messages for applications.


Use the following command to create the queue manager.
CRTMQM MQMNAME(QM1.AS3) UDLMSGQ(SYSTEM.DEAD.LETTER.QUEUE)

2.1.1. Dead-Letter Queue


A queue manager must be able to handle situations when it cannot deliver a message. Here are some examples:

The destination queue is full.


The destination queue does not exist.
Message puts have been inhibited on the destination queue.
The sender is not authorized to used the destination queue.
The message is too large.
The message contains a duplicate message sequence number.

These messages are written by queue manager to a dead-letter queue. A dead-letter is defined when the queue
manager is created. It will be used as a repository for all messages that cannot be delivered.

2.2

Local Queue

A local queue is where MQ monitor gets the messages. It is owned by the queue manager (on AS/400) to which
the application program ( MQ monitor) is connected.
Use the following command to create the local queue.
CRTMQMQ QNAME(CSC.NBSR.G40.Qn) QTYPE(*LCL) MQMNAME(QM1.AS3)
DFTMSGPST(*YES)
where n = 1 to 5

2.3

Remote Queue

A queue is remote if is owned by a different queue manager (on front-end).


Use the following command to create the remote queue.
CRTMQMQ QNAME(CSC.NBRL.G40.Qn) QTYPE(*RMT) MQMNAME(QM1.AS3)
DFTMSGPST(*YES) RMTQNAME(ISC.NBRL.G15.Qn) RMTMQMNAME(QM01.ISC)
TMQNAME(XQn.QM1.ISC)

273443089.doc
Version 1.0

2.4

Transmission Queue

A remote queue is associated with a transmission queue. Transmission queues are use as an intermediate step
when sending messages to queues that owned by a different queue manager.
Use the following command to create the transmission queue.
CRTMQMQ QNAME(XQn.QM1.ISC) QTYPE(*LCL) MQMNAME(QM1.AS3) USAGE(*TMQ)

2.5

Sender Channel

A sender channel gets messages from a transmission queue and transmits them to target queue. .
Use the following command to create the sender channel.
CRTMQMCHL CHLNAME(CSC.G40.ISC.G15.CHn) CHLTYPE(*SDR) MQMNAME(QM1.AS3)
TRPTYPE(*TCP) CONNAME('10.0.1.36(1603)') TMQNAME(XQn.QM1.ISC) DSCITV(0)
Attribute DSCITV set to zero means indefinite wait.
When you have defined the channel, you can test it using the PNGMQMCHL command. This command sends a
special message from the sender channel to the receiver channel and checks that it is returned.
Note: Both channel definitions, sender (AS/400) and receiver (front-end) must have the same name.

2.6

Receiver Channel

A receiver channel receives messages and put them into local queue.
Use the following command to create the receiver channel.
CRTMQMCHL CHLNAME(ISC.G15.CSC.G40.CHn) CHLTYPE(*RCVR) MQMNAME(QM1.AS3)
TRPTYPE(*TCP)
Note: Both channel definitions, receiver (AS/400) and sender (front-end) must have the same name.

2.7

Grant Authority to Queue Manager and Message Queue


Queue Manager: GRTMQMAUT OBJ(QM1AS3) OBJTYPE(*MQM) USER(*PUBLIC)
AUT(*ALLMQI) MQMNAME(QM1.AS3)
Local Queue: GRTMQMAUT OBJ(CSC.NBSR.G40.Qn) OBJTYPE(*Q) USER(*PUBLIC)
AUT(*ALLMQI) MQMNAME(QM1.AS3)
Remote Queue: GRTMQMAUT OBJ(CSC.NBRL.G40.Qn) OBJTYPE(*Q) USER(*PUBLIC)
AUT(*ALLMQI) MQMNAME(QM1.AS3)
Transmission Queue: GRTMQMAUT OBJ(XQn.QM1.ISC) OBJTYPE(*Q) USER(*PUBLIC)
AUT(*ALLMQI) MQMNAME(QM1.AS3)

273443089.doc
Version 1.0

3. Start/End Queue Manager


3.1

Start Subsystem QMQM


Before you can use MQSeries for AS/400 you must start a subsystem by issuing the following
command.
STRSBS SBSD((QMQM/QMQM)
To avoid starting the above subsystem each time after IPL, the above command has been inserted in
auto-start job entry: PAXUSAJE (resided in PAXUS/PAXUSAJE) and initiated with QBATCH
subsystem is started

3.2

Start Queue Manager


Before you can do anything else to MQSeries you must start the queue manager. Start the queue
manager from the command line by issuing the command:
STRMQM MQMNAME(QM1.AS3)
After a short period you receive the message Message Queue Manager started.
A Job Schedule Entry is setup for the auto start up of Queue Manager QM1.AS3
(Refer to STRMQM job schedule for details)
When queue manager is running, the following batch jobs running under the QMQM user profile in
QMQM subsystem when queue manager is alive.
AMQZXMA0
AMQZLAA0
AMQALMPX
AMQRRMFA
RUNMQCHL
RUNMQCHI

The execution controller is the first job started by the queue manager. It deals with
MQCONN requests, and starts agent processes to process MQSeries API calls
Queue manager agents perform the bulk of work for applications that connect to the
queue manager using MQCNO_STANDARD_BINDING
The checkpoint processor periodically takes journal checkpoint
Repository manager for cluster
This Sender Channel job will be started for each sender channel
The Channel Initiator

There are two ways of quiescing (end) a queue manager: 1. Either use the command ENDMQM MQMNAME(QMGR.POLISYM) OPTION(*IMMED) or
2. Enter the command WRKMQM *ALL, enter option 6 (end) against queue manager name, and
press F4. Use option *IMMED.
The option *IMMED will immediate shut down allows any current calls to complete, but stops any
new calls. It does not wait for application to disconnect from the queue manager.

273443089.doc
Version 1.0

3.3

Checking what queue managers you having running


Sometimes you may want to remind yourself how many queue managers you having running. You can
do this using the WRKMQM command. Enter the command with no parameters. A list of configured
queue manager will be display, showing which are active and which are inactive.
Work with queue managers
Type options, press Enter.
2=Change
4=Delete
5=Display
14=Start
15=End
18=Work with Queues
19=Work with Processes
20=Work with Channels
21=Work with NameLists
Opt

Name
QM1
GENERALI
QM1.AS3

Status
INACTIVE
ACTIVE
ACTIVE

Default
NO
NO
YES

Bottom
Parameters or command
===>
F3=Exit
F4=Prompt
F16=Repeat position to

273443089.doc
Version 1.0

F5=Refresh
F6=Create
F17=Position to

F9=Retrieve
F20=Right

F12=Cancel
F21=Print

4. Sender/Receiver Channels
Messages are transmitted between queue managers on channel. A channel is a one-way communication
link between two queue managers. For the message to be sent and received working properly, both
ends of the message channel must be running for messages to be transferred. The following screen
shows that queue manager on AS/400 is working with other queue manager.
Work with MQM Channels
Queue Manager Name . . :

QM1.AS3

Type options, press Enter.


2=Change
3=Copy
4=Delete
14=Start
15=End
16=Reset
Opt

Name
CH1.QM1.AS3.QM1.NT3
CH1.QM1.NT3.QM1.AS3
CSC.G40.ISC.G15.CH1
CSC.G40.ISC.G15.CH2
CSC.G40.ISC.G15.CH3
CSC.G40.ISC.G15.CH4
CSC.G40.ISC.G15.CH5
ISC.G15.CSC.G40.CH1
ISC.G15.CSC.G40.CH2

5=Display
17=Resolve

Type
*SDR
*RCVR
*SDR
*SDR
*SDR
*SDR
*SDR
*RCVR
*RCVR

8=Work with Status

Transport
*TCP
*TCP
*TCP
*TCP
*TCP
*TCP
*TCP
*TCP
*TCP

13=Ping

Status
INACTIVE
INACTIVE
RUNNING
RUNNING
RUNNING
RUNNING
RUNNING
RUNNING
RUNNING
More...

Parameters or command
===>
F3=Exit
F4=Prompt
F16=Repeat position to

4.1

F5=Refresh
F6=Create
F17=Position to

F9=Retrieve
F21=Print

F12=Cancel

Start Sender channel


When you start a queue manager, a channel initiator is automatically started. This channel initiator will
start sender channel. However, if the sender is stopped, use the following command to start it.
STRMQMCHL CHLNAME(CSC.G40.ISC.G15.CHn) MQMNAME(QM1.AS3)

4.2

Start Receiver Channel


To start receiver, you need to run channel listener program on queue manage. A channel listener
program listens for the in coming network requests and start the appropriate receiver channel when it
is needed.
Use the following command to start listener program.
STRMQMLSR MQMNAME(QM1.AS3) PORT(1500)
where 1500 is the port number required by MQSeries. You can change this but it must match the port
number specified at the sending end.
The listener program is AMQCLMAA executing in the subsystem QMQM.
The channel program is AMQCRSTA for inbound TCP communication executing in the subsystem
QMQM..

273443089.doc
Version 1.0

5. Smart/400 MQ Monitor
5.1

Overview
The Smart/400 MQ monitor using MQI MQGET with browse option to check for any messages arrive
on the queue. If any, it will initiate another job with specific message id under the user ID from leader
header. This job uses the MQGET function with specific message id to get the business object request
data from the request queue. It will then process the specific message by calling generic SMART/400
Business Object Handler to execute the requested business object. The business object in turn calls the
existing on-line Pnnnn programs. Upon completion of the business object, it writes a message to the
reply queue to return the business object response data and the job will end.

Start/End MQ Monitor

User can Start/End MQ Monitor function in Life/Asia under the System Administration Master
Menu
SACT - Generali

System Administration M/Menu

Tables and Codes


Error Codes
Standard Letter Requests

Company . . :
Branch . . . :
User . . . . :
F1=Help F3=Exit

S0018 02

Help
Soft Locks
Start/End MQ Monitor

2
LIFE
80
branch 80
HKCSC002

Accounting Month . :
Accounting Year . :

05
2002

In the Start/End MQ Monitor Sub-menu, the request queue, reply queue and queue manager inputs
are defaulted from a data area.
Select action A to start the monitor, B to end the monitor
SACT - Generali

Start/End MQ Monitor Submenu

SZ571

01

A - Start
B - End
Request Queue:

CSC.NBSR.G40.Q1

Reply Queue

CSC.RBRL.G40.Q1

Queue Manager:
Action:

273443089.doc
Version 1.0

QM1.AS3
A

The default request queue, reply queue and queue manager name are recorded in the data area STRMQ
in library: RRRTEXC (where RRR is the level ID).

The first 48-char is default request queue, the second 48-char is default reply queue, the last 48-char is
default queue manager name
Screen 3
Display Data Area
System:
S654C51B
Data area
Library
Type . .
Length .
Text . .
Offset
0
50
100

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

.
.
.
.
.

:
:
:
:
:

STRMQ
SDEVEXC
*CHAR
144
Start MQ Series default queue name

Value
*...+....1....+....2....+....3....+....4....+....5
'CSC.NBSR.G40.Q1
CS'
'C.NBRL.G40.Q1
QM1.'
'AS3
'

Bottom
Press Enter to continue.
F3=Exit

273443089.doc
Version 1.0

F12=Cancel

10

6. Configure Notes
The followings highlight the special procedures in setting up the MQ objects in AS/400
Task/Procedure
Level Security JOBD: CL5SEC must exist in the
level for MQ monitor to run
Include QMQM in library list

Auto start for QMQM subsystem


Auto start for QM Manager : QM1.AS3
Client validation rule
Similar Client validation rule
GMT for MQ message time

273443089.doc
Version 1.0

Action/Command
GRTLVLAUT/GRTRELAUT CL5SEC
- Change data area ELIBL & SLIBL
to add QMQM
- RVKLVLAUT & GRTLVLAUT for all
impacted JOBD
Modify PAXUS/PAXUSAJE (invoked
when starting QBATCH subsystem)
- Add STRSBS QMQM/QMQM
Add a daily job schedule entry
(STRMQM) to start the QM Manager
(WRKJOBSCDE)
Table TR393 setting
Table TZ559 setting
Change system value : QUTCOFFSET to
+08:00

11

7. Errors on AS/400
7.1

MQSeries Errors
MQSeries uses a number of error logs to capture message concerning the operation of MQSeries itself,
any queue managers that you start, and error data coming from the channels that are in use.
The location of error logs depends on whether the queue manager name is known. MQSeries uses
AS/400 Integrated File System (IFS) to store error log.
In the IFS:
If the queue manager name is known and the queue manager is available, error logs are located in:
/QIBM/UserData/mqm/qmgrs/qmname/errors
where qmname is queue manager name

If the queue manager is not available, error logs are located in:
/QIBM/UserData/mqm/errors

Use the following command to browse the error directories and files.
EDTF STMF('/QIBM/UserData/mqm/qmgrs/QM1.AS3/errors')
Where QM1.AS3 is queue manager name for UAT environment
Directory: /QIBM/UserData/mqm/qmgrs/QM1.AS3/errors
Position to :
Record :
1 of
3
New File :
2=Edit 4=Delete File
5=Display 6=Path Size
9=Recursive Delete
Opt Name
AMQERR03.LOG
AMQERR02.LOG
AMQERR01.LOG

Size
256K
256K
96K

Owner
QMQM
QMQM
QMQM

Changed
02/05/20 11:49
02/05/21 09:10
02/05/21 15:21

Used
02/05/20 11:49
02/05/21 09:10
02/05/21 15:21
Bottom

F3=Exit

273443089.doc
Version 1.0

F12=Cancel
F16=Sort
F17=Position to
(C) COPYRIGHT IBM CORP. 1980, 2000.

F22=Display entire field

12

Type 5 at AMQERR01.LOG and press Enter will show a typical extract of an error log.
Browse : /QIBM/UserData/mqm/qmgrs/QM1.AS3/errors/AMQERR01.LOG
Record :
1
of
1855 by 14
Column :
1
Control :

79 by

79

....+....1....+....2....+....3....+....4....+....5....+....6....+....7....+....
************Beginning of data**************
05/21/02 09:10:49
AMQ9002: Channel program started.
EXPLANATION:
Cause . . . . . :
Channel program 'CSC.G40.ISC.G15.CH3' started.
Recovery . . . :
None.
Technical Description . . . . . . . . :
None.
------------------------------------------------------------------------------05/21/02 09:10:49
AMQ9002: Channel program started.
EXPLANATION:
Cause . . . . . :
Channel program 'CSC.G40.ISC.G15.CH4' started.
Recovery . . . :
None.
Technical Description . . . . . . . . :
None.
------------------------------------------------------------------------------05/21/02 09:10:50
AMQ9520: Channel not defined remotely.
EXPLANATION:
Cause . . . . . :
There is no definition of channel 'CSC.G40.ISC.G15.CH5'
at the remote location.
Recovery . . . :
Add an appropriate definition to the remote hosts list of
defined channels and retry the operation.
Technical Description . . . . . . . . :
None.
F3=Exit
F19=Left

F10=Display Hex
F12=Exit F15=Services
F20=Right
(C) COPYRIGHT IBM CORP. 1980, 2000.

F16=Repeat find

7.1.1. Obtaining Diagnostic Information


The following serves as a guide to obtain diagnostic information about MQSeries.
1.

Users Job Log: The job log records the commands processed by the job and the messages
returned from running those command. Reviewing the job log of a user who experiences a
problem, by issuing the DSPJOBLOG command, identifies the MQSeries commands issued and
the sequence of those commands.

2.

MQSeries Job Log: MQSeries specific jobs, for example, the channel programs run under the
MQSeries profile QMQM. If you have a problem in these areas, review these joblogs by issuing
the command WRKSPLF QMQM to display them.

3.

System history log: Reviewing the history log, by issuing the DSPLOG command, displays
information about the operation of the system and the system status. This can be useful for
identifying channel connection problems.

4.

AS/400 Message Queue: It is useful to view messages sent to various AS/400 message queue
using the DSPMSG command. Use the command DSPMSG QSYSOPR to check the system
operator message queue, used for MQSeries journaling messages, and job completion messages in
particular.

273443089.doc
Version 1.0

13

5.

Queue Manager Message Queue: It is useful to view messages sent to a particular queue
manager, called QMQMMSG and stored in the queue manager library. Using the DSPMSG
command. For example, queue manager is QM1.AS4 then the queue manager library is
QMQM1.AS4.

7.1.2. Problem Determination


There are two distinct aspects to problem determination:
Problem discovered when command is being submitted
Problem discovered during operation of channels
Command validation
Commands and panel data must be free from errors before they are accepted for processing. Any error s
found by the validation are immediately notified to the user by error message.
Problem diagnosis begins with the interpretation these error messages and taking the recommendation
corrective action.
Processing problems
Problem found during normal operation of channels are logged in the MQSeries error log. Problem
diagnosis begins with the collection of all relevant information from the log, and continue with analysis
to identify the problem.
Message and codes
Where provided, the Message and Codes manual can help with the primary diagnosis of the problem.

7.2

MQ Monitor Errors
For any MQ Monitor error, check the job logs of virtual machine security user profile CL5SEC or user
profile from leader header for any MQ monitor errors and business object errors. If dump from
business object program exists, it will appear on user profile from leader header spool file. Use the
following command to view the errors.
WRKSPLF user profile
If the MQ monitor is running, use command WRKACTJOB SBS(QSYSWRK) and type 5 next to job
MQDSACT and press Enter. Select option 10 and press Enter. Press F10 will show all the detailed
messages.

273443089.doc
Version 1.0

14

8. Problem/Task Logs
Tasks/Procedures/Problems
Authorize HKCSC002 to admin MQSeries
command

Change auto-start job entry file


PAXUS/PAXUSAJE
Include QMQM in library list

Remote Queue not found in return message


Auto-start schedule for QM Manager
Start/End SMART/400 MQ Monitor function
Auto-start MQ Monitor
Life Proposal Interface Test Logs
7 May
Blank error details returned in BOVERRREC
(due to DD status flag = blank in P5004)
8 May
RF01 error code not matched with error
description in
LCONTHDR
10 May
Incorrect time stamp in message

273443089.doc
Version 1.0

Action
Change user profile HKCS002 to set
the supplemental groups to
QMQMADM
EDTOBJAUT QMQMADM
*USRPRFto grant *ALL to
HKCSC002
Add STRSBS QMQM/QMQM line

By
WL
09 Apr 02

- Change System Value QSYSLIBL to


remove QMQM
- Change dataarea in SDEVEXC
ELIBL, SLIBL to add QMQM
- RVKLVLAUT & GRTLVLAUT for all
affected jobds in SDEVEXC
Modify BOHMQBOH to pass the
queue manager name to reply so as to
retrieve the correct remote queue
Add a weekly job schedule to start the
QM Manager (WRKJOBSCDE)
Add a submenu under System
Administration (Co. 0) to start/end MQ
Monitor
Add a weekly job schedule

FL
10 Apr 02

6 10 May
Fix LCONTHDR

WL
10 Apr 02

FL
10 Apr 02
WL
16 Apr 02
FL
16 Apr 02

FL
7 May 2002

Fix LCONTHDR

FL
8 May 2002

Change sysval QUTCOFFSET to


+08:00

WL
10 May 2002

15

You might also like