The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,387 other followers

WebSphere MQ Client 5.3 and 7.0

Posted by jpluimers on 2011/09/07

After having worked earlier with other Message Queuing systems like AS/400 Data Queues, MSMQ, Apache ActiveMQ and Oracle AQ, I recently was involved using IBM WebSphere MQ. WebSphere MQ Clients are available for free on many platforms. The project involved using WebSphere MQ Client 5.3 and will most likely upgrade to 7.0, so here are some download links that help during the process of preparing for the upgrade:

One of the reasons for being at least at V6.0, is that it allows you to specify credentials during a MQCONNX call and using MQCNO_VERSION_5 which enables the use of the SecurityParams (a demo is here) of the MQCNO structure. There is much more to diff, so hopefully more on that later.

–jeroen

5 Responses to “WebSphere MQ Client 5.3 and 7.0”

  1. Murat Mutlu said

    http://www.milosev.com/Download/WebSphere/WebSphereD2009.rar

    This code worked for me (XE4).

  2. […] of the links in my post on WebSphere MQ Client 5.3 and 7.0 last year didn’t work any more, so below an updated  download link […]

    • Murat Mutlu said

      Hi from Turkey,

      I need to your code :) I’m using Delphi XE4 and i must develop the mq connection program. I have a units from http://www-01.ibm.com/support/docview.wss?rs=171&uid=swg24007060&loc=en_US&cs=utf-8&lang=en
      But i can not run it correctly. Client version is 6.0.2.3 but i have version 7 library.

      Sample code :

      procedure SetMQCD_CLIENT_CONN_DEFAULT(var struct: TMQCD);
      begin
      FillChar(struct, SizeOf(Struct), 0);
      with struct do
      begin
      ChannelName := #0;
      Version := 6;
      ChannelType := 6;
      TransportType := 2;
      Desc := #0;
      QMgrName := #0;
      XmitQName := #0;
      ShortConnectionName:= #0;
      MCAName := #0;
      ModeName := #0;
      TpName := #0;
      BatchSize := 50;
      DiscInterval := 6000;
      ShortRetryCount := 10;
      ShortRetryInterval := 60;
      LongRetryCount := 999999999;
      LongRetryInterval := 1200;
      SecurityExit := #0;
      MsgExit := #0;
      SendExit := #0;
      ReceiveExit := #0;
      SeqNumberWrap := 999999999;
      MaxMsgLength := 4194304;
      PutAuthority := 1 ;
      DataConversion := 0;
      SecurityUserData := #0;
      MsgUserData := #0;
      SendUserData := #0;
      ReceiveUserData := #0;
      UserIdentifier := #0;
      Password := #0;
      MCAUserIdentifier := #0;
      MCAType := 1;
      ConnectionName := #0;
      RemoteUserIdentifier:=#0;
      RemotePassword := #0;
      MsgRetryExit := #0;
      MsgRetryUserData := #0;
      MsgRetryCount := 10;
      MsgRetryInterval := 1000;
      HeartbeatInterval := 1;
      BatchInterval := 0;
      NonPersistentMsgSpeed:= 2;
      StrucLength := 1648;
      ExitNameLength := MQ_EXIT_NAME_LENGTH;
      ExitDataLength := MQ_EXIT_DATA_LENGTH;
      MsgExitsDefined := 0;
      SendExitsDefined := 0;
      ReceiveExitsDefined:= 0;
      MsgExitPtr := nil;
      MsgUserDataPtr := nil;
      SendExitPtr := nil;
      SendUserDataPtr := nil;
      ReceiveExitPtr := nil;
      ReceiveUserDataPtr := nil;
      ClusterPtr := nil;
      ClustersDefined := 0;
      NetworkPriority := 0;
      LongMCAUserIdLength:= 0;
      LongRemoteUserIdLength:= 0;
      LongMCAUserIdPtr := nil;
      LongRemoteUserIdPtr:= nil;
      MCASecurityId := MQSID_NONE;
      RemoteSecurityId := MQSID_NONE;
      SSLCipherSpec := #0;
      SSLPeerNamePtr := nil;
      SSLPeerNameLength := 0;
      SSLClientAuth := 1;
      KeepAliveInterval := (-1);
      LocalAddress := #0;
      BatchHeartbeat := 0;
      { HdrCompList := (MQCOMPRESS_NOT_AVAILABLE, MQCOMPRESS_NOT_AVAILABLE);
      MsgCompList := (MQCOMPRESS_NOT_AVAILABLE, MQCOMPRESS_NOT_AVAILABLE, MQCOMPRESS_NOT_AVAILABLE, MQCOMPRESS_NOT_AVAILABLE, MQCOMPRESS_NOT_AVAILABLE, MQCOMPRESS_NOT_AVAILABLE, MQCOMPRESS_NOT_AVAILABLE, MQCOMPRESS_NOT_AVAILABLE, MQCOMPRESS_NOT_AVAILABLE, MQCOMPRESS_NOT_AVAILABLE, MQCOMPRESS_NOT_AVAILABLE, MQCOMPRESS_NOT_AVAILABLE, MQCOMPRESS_NOT_AVAILABLE, MQCOMPRESS_NOT_AVAILABLE, MQCOMPRESS_NOT_AVAILABLE, MQCOMPRESS_NOT_AVAILABLE);
      CLWLChannelRank := 0;
      CLWLChannelPriority:= 0;
      CLWLChannelWeight := 50;
      ChannelMonitoring := MQMON_OFF;
      ChannelStatistics := MQMON_OFF}
      end;
      end;

      procedure TfMain.Button8Click(Sender: TObject);
      var
      pom: TMQCD;
      ConnectOpts : MQCNO;
      CompCode, Reason : MQLONG;
      QMgrName : MQCHAR48;
      i: Integer;
      begin
      SetMQCD_CLIENT_CONN_DEFAULT(pom);

      pom.ConnectionName := ”;
      for i := 1 to Length(edtConnName.Text) do
      pom.ConnectionName[i-1] := edtConnName.Text[i];

      pom.QMgrName := ”;
      for i := 1 to Length(edtQmgrName.Text) do
      pom.QMgrName[i-1] := edtQmgrName.Text[i];

      pom.ChannelName := ”;
      for i := 1 to Length(edtChnlName.Text) do
      pom.ChannelName[i-1] := edtChnlName.Text[i];

      ConnectOpts := MQCNO_DEFAULT;
      ConnectOpts.ClientConnPtr := @pom;
      ConnectOpts.Version := MQCNO_VERSION_2;

      MQCONNX ( @QMgrName, @ConnectOpts, @HConn, @Compcode, @Reason);
      if CompCode MQCC_OK then
      ShowMessage(‘Connect Failed’+#13+#13+’Error code : ‘ + IntToStr(Reason));
      end;

      It always give same error, if i compile on in Delpi 7 and run it : MQRC_Q_MGR_NAME_ERROR 2058
      It always give same error, if i compile on in XE4 and run it : MQRC_CNO_ERROR 2139

      If you want all codes, i can send you.

      Sorry for bad english and thank you

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

 
%d bloggers like this: