Skip to main content

IBM WebSphere MQ Q PROGRAM - Middleware News


IBM WebSphere MQ Q PROGRAM - Middleware News


Q is simple pipe line program which takes messages from one source and
outputs to a target. The operation of the 'pipe' is controlled by
switches to the program. The source and target can either be the
console or a WebSphere MQ Queue. Since input/output can be taken from
stdin/stdout these can also be files. Two instances of Q can therefore
be used to implement a primitive file transfer program.

On most platforms a single program, Q, is supplied, which can connect
either as a local application or as a client. The mode of operation
is controlled via the '-l' parameter given below.

On other platforms, such as z/OS, only a single program, Q, is supplied
which runs only as a local application.

USAGE
_____

If the Q program is executed without any parameters or with an invalid
parameter it displays a brief description of each valid parameter. The
parameters, alphabetically, are as follows:

-a Sets message attributes when put to the output queue

p - forces persistence
n - forces non-persistence
q - uses queue default persistence
s - allow segmentation
c - get complete messages
d - put a datagram message type
R - put a request message type
r - put a reply message type
t - put a report message type
a - use read ahead on open and subscribe
A - force no use of read ahead on open and subscribe
C - close temporary queues with quiesce option
D - close temporary queues with delete option
2 - force message properties to be returned as an MQRFH2 header

-A[i|o|a]
Sets the value of an attribute. Should be used in combination
with -C and an appropriate option.

i - Application Identity Data (put and subscribe)
o - Application Origin Data (put only)
a - Accounting Token (put and subscribe)

-c Causes the MQGET call from the input queue to specify GMO_CONVERT
with the CCSID and Encoding values specified. The encoding value
should be specified in hex.

-C Controls whether the message context should be transferred from
input queue to output queue

a - pass all context
i - pass identity context
A - set all context
I - set identity context
n - no context

-d Controls what detail level is output to stdout.

f - Message content is printed formatted if it's an MQ* format
h - Message is printed in hex
l - Print message length
t - Print message offsets
x - Use XML Shortform
X - No XML Auto detect
n - Don't print the message
d/D - Print the MQMD after/before the MQI calls
o/O - Print the MQOD after/before the MQI calls
p/P - Print the MQPMO after/before the MQI calls
g/G - Print the MQGMO after/before the MQI calls
s/S - Print the MQSD after/before the MQI calls
r/R - Print the MQSRO after/before the MQI calls
1 - Low level of detail
2 - Medium level of detail
3 - High level of detail

-e Echo.
Causes the program to MQPUT any messages got from the input
queue to the reply queue.

-E Echo.
Causes the program to MQPUT any messages got from the input
queue to the reply queue, and fill in the Reply QMgr.

-f
Input file.
Each line of the file will be put to output queue as a different
message.
See "Z/OS FILE NAME FORMAT EXAMPLES" for specific z/OS details.

-F[+]
Input/output file.
Entire file will be put to the output queue as a single message.
If '+' is specified the dataset attributes will be retained if
the output dataset exists - z/OS only.
See "Z/OS FILE NAME FORMAT EXAMPLES" for specific z/OS details.

-g Use specific message id or correl id

mMsgId - Get by specified message id of 24 characters
cCorrelId - Get by correlation id of 24 characters
cGroupId - Get by group id of 24 characters
xmMsgId - Get by specified message id in hex
xcCorrelId - Get by correlation id in hex
xcGroupId - Get by group id in hex
pmMsgId - Put with specified message id of 24 characters
pcCorrelId - Put with correlation id of 24 characters
pcGroupId - Put with group id of 24 characters
pxmMsgId - Put with specified message id in hex
pxcCorrelId - Put with correlation id in hex
pxcGroupId - Put with group id in hex
pC - Use MQCI New session

-h
Only pass messages through the pipe that contain the specified
filter string. Must be single word.

-H
Use message selection on open and subscribe

-i The name of the Input Queue name (if any) to browse
See "QUEUE NAME FORMAT" for specific details.

-I The name of the Input Queue name (if any) to do destructive get
See "QUEUE NAME FORMAT" for specific details.

-jThe format name to be used on the MQPUT

-k Use browse lock

-l [ Not all platforms ]
The MQI library to link to, valid values are:

mqm - Queue Manager program

mqic32 or mqic - Client program

If not specified the program will try to use the Queue Manager
interface. If that is not present it will try to use the
MQ Client interface.

-L The maximum number of messages to process.

-m The name of the Queue Manager to connect to if not the default.

-M Allows a single text message to be put

-n"[ca|cad][cd|cdd][e|ed][x|xd]"
Sets the report option when messages are put to the output queue

ca - Confirm on arrival
cad - Confirm on arrival with data
cafd - Confirm on arrival with full data
cd - Confirm on delivery
cdd - confirm on delivery with data
cdfd - confirm on delivery with full data
e - Exceptions
ed - Exceptions with data
efd - Exceptions with full data
x - Expirations
xd - Expirations with data
xfd - Expirations with full data
pan - PAN
nan - NAN
newm - New Message Id
passm - Pass Message Id
copym - Copy Message Id
disc - Discard Message
passd - Pass discard and expiry
act - Activity Reports

-o The name of the Output Queue name (if any)
See "QUEUE NAME FORMAT" for specific details.

-O The name of the Output Queue name (if any)
See "QUEUE NAME FORMAT" for specific details.
As above but using Bind on Open

Multiple -o and -O flags can be provided which will cause a
distribution list to be used.

-p
Number of messages after which an MQCMIT is taken. If not
specified message operations are not under syncpoint.

-P
Sets the priority of put messages or on a subscribe

-q Quiet mode - doesn't write messages to screen

-r[+] The name of the Reply Queue to be placed in the message descriptor
when MQPUTing to the output queue.

If '+' is specified then the program will read the reply from the
reply queue before attempting the next put.

-s Force output to stdout. This can be used to monitor messages if
transferring messages from one queue to another.

-$
Sets separator character in queue names
Without this option you can use a queue value of QM1/Q1,QM1#Q1 or
QM1,Q1
However, '/' can be used in a queue name so it may be useful to
restrict the processing of this character.

-t Print timings for API calls

-U Sets the user ID in the message.

If '+' is specified then this instead sets the alternate user ID
for an open and subscribe call.

-v


Controls what information about what the program is doing is
printed.

p - Causes a pause before each API
>=1 - Information about each message is printed
>=2 - Each API call is printed
P - Print out command line parameters

-V[z][c] Sets the return value from the Q program. Default behaviour
is to return MQRC value.

z - Forces a zero return code
c - Return MQCC mapped to 0,4,8

-w

Comments

adsrerrapop

Popular posts from this blog

Troubleshooting Java/JMS SSL Configurations - Middleware News

 This document is intended to help diagnose WebSphere MQ V7 Java™ or JMS SSL setup errors. It lists most of the common configuration errors that can cause an SSL connection from a Java/JMS client to a queue manager to fail, and gives the course of action to resolve the problem. In each case the error can be diagnosed by a combination of the error seen in the client log - either a console output, trace file or SystemOut.log file - and the queue manager's error logs. The document is quite long, so the easiest way to find the potential error is to search for one of the errors seen in this list, then filter this list using the error from the opposite end of the channel. All cases here assume that 2-way authentication is being attempted (SSLCAUTH set to REQUIRED on the queue manager's SVRCONN channel). This is the default, and the errors are very similar for 1-way authentication (SSLCAUTH set to OPTIONAL). Symptom Instructions on collecting documentation...

Using telnet to test connectivity between IBM Websphere MQ Client and MQ server - Middleware News

You are having trouble connecting a WebSphere MQ client to a MQ server, receiving errors that you can not connect to the MQ queue manager. One of the first things to determine is if the two machines can communicate, and using the telnet tool is one way to accomplish it. Symptom Receiving errors which state that a queue manager is not found or not available. Connection errors. For example: AMQ9213, AMQ9524, AMQ9202 or AMQ9508 or MQRC =2059 0x0000080b MQRC_Q_MGR_NOT_AVAILABLE. Please note, this is by no means an exclusive list of errors related to this type a problem but just a sample of some of the more common error messages and codes that might occur. Cause One possible cause is that the two machines can not communicate. May be the IP address or hostname was not properly specified by the MQ client. The port number might be incorrect. A queue manager is not running at the desired host. The queue manager could be running, but the corresponding listener is not runnin...

IBM Websphere MQ interview Questions Part 5

MQ Series: - It is an IBM web sphere product which is evolved in 1990’s. MQ series does transportation from one point to other. It is an EAI tool (Middle ware) VERSIONS:-5.0, 5.1, 5.3, 6.0, 7.0(new version). The currently using version is 6.2 Note: – MQ series supports more than 35+ operating systems. It is platform Independent. For every OS we have different MQ series software’s. But the functionality of MQ series Default path for installing MQ series is:- C: programfiles\BM\clipse\SDK30 C: programfiles\IBM\WebsphereMQ After installation it will create a group and user. Some middleware technologies are Tibco, SAP XI. MQ series deals with two things, they are OBJECTS, SERVICES. In OBJECTS we have • QUEUES • CHANNELS • PROCESS • AUTHENTICATION • QUERY MANAGER. In SERVICES we have LISTENERS. Objects: – objects are used to handle the transactions with the help of services. QUEUE MANAGER maintains all the objects and services. QUEUE: – it is a database structure ...