Dear Sir,

Here is how all the structures look in MQGET. I am not sure which ones to disable and 
replace with the memset. If you could send me your ideas so I can build another 
version.
Thank you


MQOD                    mqod    = {MQOD_DEFAULT};             // Object
description
MQMD                    mqmd    = {MQMD_DEFAULT};             // Message
Descriptor
MQGMO                   mqgmo   = {MQGMO_DEFAULT};            // Get
message options
MQCNO                   mqcno   = {MQCNO_DEFAULT};            //
Connection Options
MQCD                    mqcd    = {MQCD_CLIENT_CONN_DEFAULT}; // Client
Definition

mqcno.Version           = MQCNO_VERSION_2;
mqcno.ClientConnPtr     = &mqcd;

mqod.ObjectType         = MQOT_Q;

mqmd.Version            = MQMD_VERSION_2;                             //
Version-2 message descriptor structure
mqmd.Encoding       = MQENC_NATIVE;                                   //
Native machine encoding.
mqmd.CodedCharSetId = MQCCSI_Q_MGR;                                   //
Queue manager's coded character set identifier.

mqgmo.Version           = MQGMO_VERSION_2;                            //
Version-2 get-message options structure.
mqgmo.Segmentation      = MQSEG_INHIBITED;                            //
Segmentation not allowed.

//No -O was specified.
if (bDefaultOptions) {
        mqgmo.Options   = MQGMO_NO_WAIT |                             //
Return immediately if no suitable message.  
                        MQGMO_FAIL_IF_QUIESCING |               // Fail if
queue manager is quiescing.
                        MQGMO_CONVERT |                         // Convert
message data.
                        MQGMO_COMPLETE_MSG |                    // Only
complete logical messages are retrievable.
                        MQGMO_ALL_MSGS_AVAILABLE |      // All messages in
group must be available. 
                        MQGMO_ALL_SEGMENTS_AVAILABLE;   // All segments in a
logical message must be available.
        }
        mqgmo.MatchOptions      = MQMO_NONE;
// No matches.

        iOpenOptions            = MQOO_INPUT_AS_Q_DEF |       // Open queue to get
messages using queue-defined default.
                MQOO_FAIL_IF_QUIESCING;         // Fail if queue manager is
quiescing.


David COHEN




-----Message d'origine-----
De : Peter Uranyi [mailto:[EMAIL PROTECTED]] 
Envoyé : mercredi 8 janvier 2003 13:20
À : [EMAIL PROTECTED]
Objet : Re: MQSeries 5.2.1 and 2046 error between Win2000 cleint and IBM MVS server 
(mq 2.1)


David,

You are using a get option that is not valid on MVS.
My first guess would be that in your program you have something like this:

gmo.Version = MQGMO_VERSION_2; /* Avoid need to reset Message  */ gmo.MatchOptions = 
MQMO_NONE;  /* ID and Correlation ID before */
                               /* every MQGET                  */

This does work if you connect to a queue manager on Windows or Unix but not on MVS.

Instead of using the above options, you have to reset the Message ID and Correlation 
ID before every(!) MQGET.

Like this:

memcpy(md.MsgId, MQMI_NONE, sizeof(md.MsgId)); memcpy(md.CorrelId, MQCI_NONE, 
sizeof(md.CorrelId));

I hope this helps.
Peter

--- COHEN David <[EMAIL PROTECTED]> wrote:
> Dear all
>
> I have a question regarding MQSeries 5.2.1 installed on an Windows 
> 2000 as a client And MQSeries 2.1 installed on an IBM MVS as a server. 
> When trying to do an MQGET on a queue I receive an error message 2, 
> 2046.
>
> The MQGET connects fine to the Channel and to the Queue but when 
> trying to retrive the message on the IBM MVS side the error 2, 2046 
> appears. We can see on the IBM MVS side the error
>
> Csqx 208E error receiving data code 461
>
> I do not know if it is related
>
> *******
> Changing current directory to c:\rightfax\production\bin Connected to 
> 'RightFAX' (0,0) Opened Queue 'RF_Queue'  (0,0)
> Creating primary buffer of size 64 Ko Unable to retrieve message error 2,
> 2046
> *******
>
> If I install an MQSeries 5.2.1 on another Windows 2000 as a server and 
> define the queues the same way as on the IBM everything works fine
>
> Any idea ?
>
> David COHEN
>
> Thank you
>
> Instructions for managing your mailing list subscription are provided 
> in the Listserv General Users Guide available at http://www.lsoft.com
> Archive: http://vm.akh-wien.ac.at/MQSeries.archive

Instructions for managing your mailing list subscription are provided in the Listserv 
General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive

Instructions for managing your mailing list subscription are provided in
the Listserv General Users Guide available at http://www.lsoft.com
Archive: http://vm.akh-wien.ac.at/MQSeries.archive

Reply via email to