The preceding examples show how WebSphere MQ job descriptions determine the run-time
attributes of WebSphere MQ jobs.
The following examples show how you can change and create WebSphere MQ job descriptions
to change the run-time attributes of WebSphere MQ jobs.
The key to the flexibility of WebSphere MQ work management lies in the two-tier
way that WebSphere MQ searches for job descriptions:
- The following example increases the priority of channel control jobs for
an individual queue manager.
To make the repository manager and channel
initiator jobs, AMQRRMFA and RUNMQCHI, run as quickly as possible for queue
manager TESTQM, carry out the following steps:
- Create local duplicates of the QMQM/QMQMJOBD job description with the
names of the WebSphere MQ processes that you want to control in the queue manager
library. For example,
CRTDUPOBJ OBJ(QMQMJOBD) FROMLIB(QMQM) OBJTYPE(*JOBD) TOLIB(QMTESTQM)
NEWOBJ(RUNMQCHI)
CRTDUPOBJ OBJ(QMQMJOBD) FROMLIB(QMQM) OBJTYPE(*JOBD) TOLIB(QMTESTQM)
NEWOBJ(AMQRRMFA)
- Change the routing data parameter on the job description to ensure that
the jobs use the QMQMRUN20 class.
CHGJOBD JOBD(QMTESTQM/RUNMQCHI) RTGDTA('QMQMRUN20')
CHGJOBD JOBD(QMTESTQM/AMQRRMFA) RTGDTA('QMQMRUN20')
The AMQRRMFA and RUNMQCHI jobs for queue manager TESTQM now:
- Use the new local job descriptions in the queue manager library
- Run with priority 20, because the QMQMRUN20 class is used when the jobs
enter the subsystem.
- The following example defines a new run priority class for the QMQM subsystem.
- Create a duplicate class in the QMQM library, to allow other queue managers
to access the class, by issuing the following command:
CRTDUPOBJ OBJ(QMQMRUN20) FROMLIB(QMQM) OBJTYPE(*CLS) TOLIB(QMQM)
NEWOBJ(QMQMRUN10)
- Change the class to have the new run priority by issuing the following
command:
CHGCLS CLS(QMQM/QMQMRUN10) RUNPTY(10)
- Add the new class definition to the subsystem by issuing the following
command:
ADDRTGE SBSD(QMQM/QMQM) SEQNBR(8999) CMPVAL('QMQMRUN10') PGM(QSYS/QCMD)
CLS(QMQM/QMQMRUN10)
Note:
You can specify any numeric
value for the routing sequence number, but the values must be in sequential
order. This sequence number tells the subsystem the order in which routing
entries are to be searched for a routing data match.
- Change the local or global job description to use the new priority class
by issuing the following command:
CHGJOBD JOBD(QMQMlibname/QMQMJOBD) RTGDTA('QMQMRUN10')
Now all the queue manager jobs associated with the QMlibraryname
use a run priority of 10.
- The following example runs a queue manager in its own subsystem
To
make all the jobs for queue manager TESTQM run in the QBATCH subsystem, carry
out the following steps:
- Create a local duplicate of the QMQM/QMQMJOBD job description in the queue
manager library with the command
CRTDUPOBJ OBJ(QMQMJOBD) FROMLIB(QMQM) OBJTYPE(*JOBD) TOLIB(QMTESTQM2)
- Change the job queue parameter on the job description to ensure that the
jobs use the QBATCH job queue.
CHGJOBD JOBD(QMTESTQM2/QMQMJOBD) JOBQ(*LIBL/QBATCH)
Note:
The job queue is associated with the subsystem description.
If you find that the jobs are staying on the job queue, verify that the job
queue definition is defined on the SBSD. Use the DSPSBSD command
for the subsystem and take option 6, "Job queue
entries".
All jobs for queue manager TESTQM2 now:
- Use the new local default job description in the queue manager library
- Are submitted to job queue QBATCH.
To ensure that jobs are routed and prioritized correctly:
- The following example creates another WebSphere MQ subsystem
- Create a duplicate subsystem in the QMQM library by issuing the following
command:
CRTDUPOBJ OBJ(QMQM) FROMLIB(QMQM) OBJTYPE(*SBSD) TOLIB(QMQM) NEWOBJ(QMQM2)
- Remove the QMQM job queue by issuing the following command:
RMVJOBQE SBSD(QMQM/QMQM2) JOBQ(QMQM/QMQM)
- Create a new job queue for the subsystem by issuing the following command:
CRTJOBQ JOBQ(QMQM/QMQM2) TEXT('Job queue for MQSeries Queue Manager')
- Add a job queue entry to the subsystem by issuing the following command:
ADDJOBQE SBSD(QMQM/QMQM2) JOBQ(QMQM/QMQM2) MAXACT(*NOMAX)
- Create a duplicate QMQMJOBD in the queue manager library by issuing the
following command:
CRTDUPOBJ OBJ(QMQMJOBD) FROMLIB(QMQM) OBJTYPE(*JOBD) TOLIB(QMlibraryname)
- Change the job description to use the new job queue by issuing the following
command:
CHGJOBD JOBD(QMlibraryname/QMQMJOBD) JOBQ(QMQM/QMQM2)
- Start the subsystem by issuing the following command:
STRSBS SBSD(QMQM/QMQM2)
Notes:
- You can specify the subsystem in any library. If for any reason the product
is reinstalled, or the QMQM library is replaced, any changes you made are
removed.
- All the queue manager jobs associated with the QMlibraryname now run under
subsystem QMQM2.
- The following example collects all output for a job type.
To collect
all the checkpoint process, AMQALMPX, job logs for multiple queue managers
onto a single output queue, carry out the following steps:
- Create an output queue, for example
CRTOUTQ OUTQ(MYLIB/CHCKPTLOGS)
- Create a global duplicate of the QMQM/QMQMJOBD job description, using
the name of the WebSphere MQ process that you want to control, for example
CRTDUPOBJ OBJ(QMQMJOBD) FROMLIB(QMQM) OBJTYPE(*JOBD) NEWOBJ(AMQALMPX)
- Change the output queue parameter on the job description to point to your
new output queue, and change the job logging level so that all messages are
written to the job log.
CHGJOBD JOBD(QMQM/AMQALMPX) OUTQ(MYLIB/CHKPTLOGS) LOG(4 00 *SECLVL)
All WebSphere MQ AMQALMPX jobs, for all queue managers, use the new global
AMQALMPX job description, providing that there are no local overriding job
descriptions in the local queue manager library.
All job log spool files
for these jobs are now written to output queue CHKPTLOGS in library MYLIB.
Notes:
- The preceding example works only if the QPJOBLOG, or any print file, has
a value of *JOB for its output queue parameter. In the preceding example,
the QSYS/QPDJOBLOG file needs OUTQ set to *JOB.
- To change a system print file, use the CHGPRTF command. For example:
CHGPRTF PRTF(QJOBLOG) OUTQ(*JOB)
The *JOB option indicates that your
job descriptions must be used.
- You can send any spool files associated with the WebSphere MQ jobs to a particular
output queue. However, verify that the print file being used has
the appropriate value for the OUTQ parameter.