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

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 ...

IBM Websphere MQ Reason code list / mq reason codes / websphere mq error codes / mq error messages

Reason code list ================= The following is a list of reason codes, in numeric order, providing detailed information to help you understand them, including: * An explanation of the circumstances that have caused the code to be raised * The associated completion code * Suggested programmer actions in response to the code * 0 (0000) (RC0): MQRC_NONE * 900 (0384) (RC900): MQRC_APPL_FIRST * 999 (03E7) (RC999): MQRC_APPL_LAST * 2001 (07D1) (RC2001): MQRC_ALIAS_BASE_Q_TYPE_ERROR * 2002 (07D2) (RC2002): MQRC_ALREADY_CONNECTED * 2003 (07D3) (RC2003): MQRC_BACKED_OUT * 2004 (07D4) (RC2004): MQRC_BUFFER_ERROR * 2005 (07D5) (RC2005): MQRC_BUFFER_LENGTH_ERROR * 2006 (07D6) (RC2006): MQRC_CHAR_ATTR_LENGTH_ERROR * 2007 (07D7) (RC2007): MQRC_CHAR_ATTRS_ERROR * 2008 (07D8) (RC2008): MQRC_CHAR_ATTRS_TOO_SHORT * 2009 (07D9) (RC2009): MQRC_CONNECTION_BROKEN * 2010 (07DA) (RC2010): MQRC_DATA_LENGTH_ERROR * 2011 (07DB) (RC2011): MQRC_DYNAMIC_Q_NAME_ERROR * 2012 (07DC) (RC201...

Adding SSL certificates to a mixed z/OS and Unix queue manager environment - Middleware News

Adding SSL certificates to a mixed z/OS and Unix queue manager environment - Middleware News 1. Security Considerations IBM advises customers who are using SSL, that the most secure way to do this is to use recognized Certification Authorities to sign their certificates. Ensuring secure transfer of information is the main purpose of SSL. This integrity must be properly observed when setting up SSL. You should always be certain who has signed each of your SSL certificates, who has had and who continues to have access to them. The first secure way to generate certificates is to generate a certificate request, on each system or machine that uses SSL. This request has to be signed by an external Certification Authority before it can be used. Getting certificate requests signed by a CA is secure, because during the signing process at no point do any files contain the certificate's Private Keys. This principle is vital to SSL security. Signing certificates in this way is covered...