What kind of CCSID value can be used for WMQ QMGR? - ibm-mq

The question is about the value of ccsid from QMGR. When doing this configuration, how many
ones can be used in total? How do i know what kind of ccsid i'm able to choose from? Is there any way to find it out?
Thanks in advance

Accordint go IBM WebSphere MQ 7.0 Infocenter, the following applies to queue manager option CCSID (Coded Charset ID):
The coded character set identifier for the queue manager. The CCSID is the identifier used with all character string fields defined by the API. It does not apply to application data carried in the text of messages unless the CCSID in the message descriptor is set to the value MQCCSI_Q_MGR when the message is put to a queue.
Specify a value in the range 1 through 65 535. The CCSID must specify a value that is defined for use on your platform, and use a character set that is appropriate to the platform.
I think the bold part answers the first part of your question (how many can be used), although it should be noted that you can only use one particular CCSID for your queue manager.
You can only use CCSIDs valid for your platform (you did not mention which OS the queue manager is running on). See WebSphere MQ / Application Programming Reference / Code Page Conversions for a list of supported conversions on a platform of your choice.

Related

Need to remove rfh header before sending message to mq

I'm using JndiDestinationResolver (JNDI-lookup) to resolve destination which i have added on application server.I saw solutions to remove rfh from message is by appending--> queue + "?targetClient=1". I'm passing jndi-name to send(Destination,meassage) and need help to understand how i can set this variable (context file or on app server).
One solution mention- On the administered object there is a property called TARGCLIENT which should be set to 'MQ'.How and where exactly we need to set this on WAS.
I really appreciate any help on this. Thanks!
It is no longer necessary to change the message producer to do this now, there are other options.
So long as your queue manager is at MQ V7.0 or above, you can alter the queue definition on the queue manager as follows, and the RFH2 header will be removed before the message is given to the consumer.
ALTER QLOCAL(q-name) PROPCTL(NONE)

Websphere MQ issue

Recently I got an application request :
A sends orders to T via MQ. The messages sent by A use CCSID 500.
While recieving the order at T end most of the orders are in CCSID 500 format. But some of the orders have their CCSID changed to 1047.
When this is the case A-T interface stops and the orders have to be manually inserted into the databse.
Can you advise us under what circumstances this CCSID could change? And is there any configuration changes that could be made either at T or A side to prevent this happening ?
The CCSID is set by the application that does the MQPUT.
When it is left empty then it is filled by the underlyingin MQ installation.
The MQGET application can set a message get option to convert it to a desired CCSID.
There are tables in the appendix of the "application programming reference" in Knowledge center for all possible translations.
If you are dealing with MQFMT_STRING messages, you should be able to use GMO_CONVERT so all the messages get converted to the CCSID on the T side.
You may have an issue with missing translation tables on the receiving side. Check in the MQ installation directory /IBM/WebSphere MQ/conv/table.
Here's a little note from IBM describing the differences between EBCDIC code pages: https://www.ibm.com/support/knowledgecenter/SSEPEK_10.0.0/com.ibm.db2z10.doc.char/src/tpc/db2z_codeptdiffebcdic.dita
Source: http://www-01.ibm.com/support/docview.wss?uid=swg27005729

Error while creation of queue in WebSphere MQ for z/OS

The problem is regarding IBM z/OS and WebSphere MQ.
The task at hand is to create(define) a reply queue for WebSphere MQ.
This is the main WebSphere terminal:
IBM Websphere MQ for z/OS - Main Menu1
The reply queue is to be defined with all the properties of another predefined queue named SYSTEM.DEFAULT.LOCAL.QUEUE. It has to be named <userid>.REPLY, where <userid> is my mainframe ID. According to my comprehension, the 2. Define like Action has to be used to define a new object(queue in our case) based on an existing one. The Object type field can have either QUEUE or QLOCAL value.
As it is documented in the IBM-Infocenter, Name should hold the queue on whose attributes the new queue is to be defined; so Name gets SYSTEM.DEFAULT.LOCAL.QUEUE. Disposition is best declared A. Connect name is the name of the queue manager: CSQ1. The Target Queue Manager and Action queue manager is same as the Connect name.
Main Menu with entered fields2
These settings don't work and an error pops up:
--- CSQO014E MQOPEN of SYSTEM.COMMAND.INPUT unsuccessful. Reason code = 2035. ---
Referring to this site, I concluded that the reason for error maybe any of the two possibilities:
Insufficient storage, or
Authorization issues.
I raised these these concerns at the official IBM developer works community, and it was assured that if there were any technical issues they would get back to me. But no reply followed so that made me think if I were somehow at fault. So I tried almost all possible combinations of the available options and values, but every time one or the other error followed.
Your help would be much appreciated, Thank you.
That error message is pretty self explanatory. If you do not know what reason code 2035 (not authorized) is, did you look in the MQ Messages manual?
Are you the MQAdmin or just some user trying to define a queue? Because only the MQAdmin should be defining queues (or any other MQ objects). If you are not the MQAdmin then ask your MQAdmin to define the required queue.

Executing file to queue transfer with order?

We are currently implementing mq fte solution
One of the projects need to executive file to queue function because the target system reads only from mq .
We are looking for a way not only upload the files to queue but to keep the order of the files too.
We need that the oldest file will be uploaded first ( by modification or creation date ) and the the oldest file after him in the folder
Someone had this request on fte ? How did you handle it ?
The source system is windows .
Thanks for the assistance .
That depends on your setup. Is there a single queue manager in your scenario? Does the source system share the same local queue manager with the target system?
The order of messages might be guaranteed by default, as the MQ v7 Infocenter states in chapter Priority, in these cases:
If an application puts a sequence of messages on a queue, another
application can retrieve those messages in the same order that they
were put, provided:
The messages all have the same priority
The messages were all put within the same unit of work, or all put outside a unit of work
The queue is local to the putting application
If these conditions are not met, and the applications depend on the messages
being retrieved in a certain order, the applications must either
include sequencing information in the message data, or establish a
means of acknowledging receipt of a message before the next one is
sent.
If you do not meet these requirements (for example when the communication spans multiple queue managers), you can meet the requirements by:
ensuring that next message is put if and only if the recipient confirmed getting the previous one (for example by a MQ reply message)
using Message Groups to retrieve messages in logical order - that requires setting GroupId and MsgSeqNumber in the MQMD by the putting application and subsequently using MQGMO_LOGICAL_ORDER option by getting application (see chapter Logical and Physical ordering)

MQ (Websphere 7) persist message to file system

How would I set up MQ so that every message received is immediately written to file system?
I have the "redbooks", but at least need someone at least point me to a chapter or heading in the book to figure it out.
We are a .NET shop. I have written C# via API to read the queue, and we currently use BizTalk MQ adapter. Our ultimate goal is to write same message to multiple directories in file system to "clone" the feed for our various test environments (DEV, STAGE, TRAINING, etc..). The problem with BizTalk is that when we consume the message, we map it at the same time to a new message, so the message is already changed, and we want the original raw message to be cloned, not the morphed one. Our vendors don't offer multiple copies of the feed, for example, they offer DEV and PROD, but we have 4 systems internally.
I suppose I could do a C# Windows Service to do it, but I would rather use built-in features of MQ if possible.
There is no configuration required. If the message is persistent, WMQ writes it to disk. However, I don't think that's going to help you because they are not written as discrete messages. There's no disk file to copy and replication only works if the replicated QMgr is identical to the primary and is offline during the replication.
There are a number of solutions to this problem but as of WMQ V7, the easiest one is to use the built-in Pub/Sub functionality. This assumes that the messages are arriving over a QMgr-to-QMgr channel and landing on a queue where you then consume them.
In that case, it is possible to delete the queue and create an alias of the same name over a topic. You then create a new queue and define an administrative subscription that delivers messages on the topic into the new queue. Your app consumes from the new queue.
When you need to send a feed to another QMgr or application, define a new subscription and point it at the new destination queue. Since this is Pub/Sub, MQ will replicate the original message as many times as there are subscriptions and the first application and its messages are not affected. If the destination you need to send to isn't accessible over MQ channels (perhaps DEV and QA are not connected, for example), you can deliver the messages to the new queue, use QLoad from SupportPac MO03 to write them to a file and then use another instance of QLoad to load them onto a different QMgr. If you wanted to move them in real time, you could set up the Q program from SupportPac MA01 to move them direct from the new subscription queue on QMgr1 to the destination queue on QMgr2. And you can replicate across as many systems as you need.
The SupportPacs main page is here.
If all you are using is the Redbooks, you might want to have a look at the Infocenters. Be sure to use the Infocenter matching the version of WMQ you are using.
WMQ V7.0 Infocenter
WMQ V7.1 Infocenter
WMQ V7.5 Infocenter

Resources