Read MQ Trigger Status



Support for MQSeries and Websphere Message Oriented Middleware communication systems for z/OS

Read MQ Trigger Status

Postby rajas.abcdefg » Sun Oct 03, 2010 11:56 am

Hi,

Is it possible to get the trigger status of the MQ. i.e. whether the queue is up/down using batch jcl /rexx? If so sample code snippet will be helpful

Thanks
Raj
rajas.abcdefg
 
Posts: 38
Joined: Thu Jul 09, 2009 8:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Read MQ Trigger Status

Postby Bill Dennis » Mon Oct 04, 2010 10:25 pm

Use CSQUTIL to do commands in batch, including the display command.
//* DISPLAY PRODUCTION MQSERIES QUEUE                         
//PRODSTEP EXEC PGM=CSQUTIL,PARM='qmgr'      <== QMGR SubSYS NAME                     
//SYSPRINT DD SYSOUT=*                               
//* STEPLIBS REQD IF NOT IN LINKLST       
//STEPLIB  DD DSN=hlq.SCSQAUTH,DISP=SHR  <= AUTH PGMS     
//         DD DSN=hlq.SCSQLOAD,DISP=SHR  <= UTIL PGMS     
//         DD DSN=hlq.SCSQANLE,DISP=SHR  <= MSGS         
//SYSIN    DD *                                             
    DISPLAY QUEUE(qname      )    ALL     
Regards,

Bill Dennis

Disclaimer: My comments on this forum are my own and do not represent the opinions or suggestions of any other person or business entity.
Bill Dennis
 
Posts: 278
Joined: Thu May 15, 2008 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Read MQ Trigger Status

Postby rajas.abcdefg » Sat Oct 09, 2010 11:01 am

Hi Bill,

I tried executing the code snippet by changing the PGMs and QMGR, the job had failed with the below message

CSQU000I CSQUTIL IBM WebSphere MQ for z/OS V6
CSQU001I CSQUTIL Queue Manager Utility - 2010-10-08 14:56:53
DISPLAY QUEUE(HP.QMG.MQ.IN45) ALL
CSQU106E Invalid function DISPLAY
CSQU147I CSQUTIL Utility terminated, return code=12

Please help me
rajas.abcdefg
 
Posts: 38
Joined: Thu Jul 09, 2009 8:56 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Read MQ Trigger Status

Postby Bill Dennis » Mon Oct 11, 2010 9:14 pm

Try this version where the SYSIN points to the command on a different DD.
//* DISPLAY PRODUCTION MQSERIES QUEUE                         
//PRODSTEP EXEC PGM=CSQUTIL,PARM='qmgr'      <== QMGR SubSYS NAME                     
//SYSPRINT DD SYSOUT=*                               
//* STEPLIBS REQD IF NOT IN LINKLST       
//STEPLIB  DD DSN=hlq.SCSQAUTH,DISP=SHR  <= AUTH PGMS     
//         DD DSN=hlq.SCSQLOAD,DISP=SHR  <= UTIL PGMS     
//         DD DSN=hlq.SCSQANLE,DISP=SHR  <= MSGS         
//SYSIN    DD *                                             
COMMAND DDNAME(CMDINP) 
/*                     
//CMDINP   DD *       
DISPLAY QUEUE(qname      )    ALL     
Regards,

Bill Dennis

Disclaimer: My comments on this forum are my own and do not represent the opinions or suggestions of any other person or business entity.
Bill Dennis
 
Posts: 278
Joined: Thu May 15, 2008 9:45 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Read MQ Trigger Status

Postby noggin » Tue Nov 02, 2010 10:32 pm

For 4GLs ie. Cobol, PL/1, Natural etc. you can get the trigger information programmatically by calling the MQINQ API passing the appropriate attribute selectors -

attribute selector MQIA-TRIGGER-TYPE (integer value 24) will return 1 for First, 2 for Every, 3 for Depth
attribute selector MQIA-TRIGGER-CONTROL (integer value 28) will return 0 for trigger OFF, 1 for trigger ON

You should be able to do something similar in REXX using RXMQINQ but only one attribute can be inquired upon at a time.

Either way you will have to first open the queue manager for inquiry by calling MQOPEN (RXMQOPEN in REXX) to get an object handle.
noggin
 
Posts: 4
Joined: Tue Nov 02, 2010 9:53 pm
Has thanked: 0 time
Been thanked: 0 time

Re: Read MQ Trigger Status

Postby NicC » Tue Nov 02, 2010 11:31 pm

PL/1 & COBOL are 3rd generation languages
The problem I have is that people can explain things quickly but I can only comprehend slowly.
Regards
Nic
NicC
Global moderator
 
Posts: 3025
Joined: Sun Jul 04, 2010 12:13 am
Location: Pushing up the daisies (almost)
Has thanked: 4 times
Been thanked: 136 times

Re: Read MQ Trigger Status

Postby noggin » Wed Nov 03, 2010 2:42 pm

Ha, yes you're quite right! :?
noggin
 
Posts: 4
Joined: Tue Nov 02, 2010 9:53 pm
Has thanked: 0 time
Been thanked: 0 time


Return to WebSphere MQ

 


  • Related topics
    Replies
    Views
    Last post