Micro blog about Answer to the Ultimate Question of Life, the Universe, and Everything.
  • Home
    • List all categories
    • Sitemap
  • Downloads
    • WebSphere
    • Hitachi902
    • Hospital
    • Kryptonite
    • OCR
    • APK
  • About me
    • Gallery
      • Italy2022
      • Côte d'Azur 2024
    • Curriculum vitae
      • Resume
      • Lebenslauf
    • Social networks
      • Facebook
      • Twitter
      • LinkedIn
      • Xing
      • GitHub
      • Google Maps
      • Sports tracker
    • Adventures planning
  1. You are here:  
  2. Home
  3. IBM WebSphere MQ

Delphi 2009.

Details
Written by: Stanko Milosev
Category: IBM WebSphere MQ
Published: 01 September 2010
Last Updated: 30 November -0001
Hits: 6637

My MQIC.pas for Delphi 2009 you can download from here. File you will find in the rar.

Reason code:2102 - MQRC_RESOURCE_PROBLEM

Details
Written by: Stanko Milosev
Category: IBM WebSphere MQ
Published: 27 October 2008
Last Updated: 27 October 2008
Hits: 14004

If you are receiving error Reason code:2102 - MQRC_RESOURCE_PROBLEM, then try following:

Increase Log -> Log primary files and Log -> Log secondary files, to 20, for example,
Increase Extended -> Error log size.

Idea taken from here.

Transaction.

Details
Written by: Stanko Milosev
Category: IBM WebSphere MQ
Published: 24 October 2008
Last Updated: 12 December 2009
Hits: 6469

There are two posibillity to start transaction:

1. MQBegin - Queue-manager-coordinated global unit of work
2. MQPMO_SYNCPOINT - Queue-manager-coordinated local unit of work

MQBegin is trivial, so I will not explain it.

For MQPMO_SYNCPOINT you have to do something like

GetMsgOptions.Options:=GetMsgOptions.Options + MQPMO_SYNCPOINT;

Where  GetMsgOptions you use like:

MQGET ( Hconn, Hobj, @MsgDesc, @GetMsgOptions, BufferLength, @Buffer^, @DataLength, @intCompcode, @intReason);

In both cases you will use MQCMIT, and MQBACK to commit or reverse transaction back.

Taken from here.

Browse messages.

Details
Written by: Stanko Milosev
Category: IBM WebSphere MQ
Published: 23 October 2008
Last Updated: 12 December 2009
Hits: 8643

Question is, how to browse messages, without deleting them from MQ?

I did it with Delphi.

You will need to change GetMsgOptions, at me it is like:

MQGMO_DEFAULT : MQGMO = (StrucId:MQGMO_STRUC_ID;
  Version:MQGMO_VERSION_1;
 Options:MQGMO_NO_WAIT;
  WaitInterval:0;
  Signal1:0;
  Signal2:0;
  ResolvedQName:#0;
  MatchOptions:(MQMO_MATCH_MSG_ID+MQMO_MATCH_CORREL_ID);
  GroupStatus:MQGS_NOT_IN_GROUP;
  SegmentStatus: MQSS_NOT_A_SEGMENT;
  Segmentation:MQSEG_INHIBITED;
  Reserved1:' ';
  MsgToken:($0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0);
  ReturnedLength:MQRL_UNDEFINED;
  );

In MQIC.pas which I downloaded it from here, I changed MQGMO_DEFAULT to:

MQGMO_DEFAULT : MQGMO = (StrucId:MQGMO_STRUC_ID;
  Version:MQGMO_VERSION_1;
  Options:(MQGMO_BROWSE_NEXT + MQGMO_NO_WAIT);
  WaitInterval:0;
  Signal1:0;
  Signal2:0;
  ResolvedQName:#0;
  MatchOptions:(MQMO_MATCH_MSG_ID+MQMO_MATCH_CORREL_ID);
  GroupStatus:MQGS_NOT_IN_GROUP;
  SegmentStatus: MQSS_NOT_A_SEGMENT;
  Segmentation:MQSEG_INHIBITED;
  Reserved1:' ';
  MsgToken:($0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0,$0);
  ReturnedLength:MQRL_UNDEFINED;
);

I added MQGMO_BROWSE_NEXT, but, before geting messages, you will need to open MQ for browsing messages, you will do it like this:

Open(MQOO_FAIL_IF_QUIESCING + MQOO_INPUT_SHARED + MQOO_BROWSE, strObjectName, intReason, bolOk);

And that is all...

  1. The MQSC commands

Subcategories

IBM WebSphere MQ

Page 1 of 2

  • 1
  • 2