ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » General IBM MQ Support » PHP mqseries inquire Qmanager info

Post new topic  Reply to topic
 PHP mqseries inquire Qmanager info « View previous topic :: View next topic » 
Author Message
vasilev
PostPosted: Thu Sep 12, 2024 4:41 am    Post subject: PHP mqseries inquire Qmanager info Reply with quote

Acolyte

Joined: 31 Oct 2014
Posts: 71
Location: Germany

Hello,
I am trying to make some tests with mqseries of the PHP.
Does somebody know if I can use/install PCF modules with PHP ?

connection, and inquire objects are working but Qmanager inquire, channel status, queue status not..

Code:
$mqcno = array(
            'Version' => MQSERIES_MQCNO_VERSION_2,
            'Options' => MQSERIES_MQCNO_STANDARD_BINDING,
            'MQCD' => array('ChannelName' => "channel",
            'ConnectionName' => "host(port)",
            'TransportType' => MQSERIES_MQXPT_TCP)
        );
   
//such thing cannot be done without PCF ?

        mqseries_connx("QM", $mqcno, $conn, $comp_code,$reason);
        if ($comp_code !== MQSERIES_MQCC_OK) {
            printf("Connx CompCode:%d Reason:%d Text:%s<br>\n", $comp_code, $reason, mqseries_strerror($reason));
            exit;
        }


$int_attr = array();
        $char_attr = "";
mqseries_inq($conn, $obj, 1, array(MQSERIES_MQCA_Q_MGR_NAME), 0, $int_attr, 48, $char_attr, $comp_code, $reason);
   




thank you!


source:
https://www.php.net/manual/en/function.mqseries-inq.php
https://www.ibm.com/docs/en/ibm-mq/9.2?topic=calls-mqinq-inquire-object-attributes[/code]
_________________
Regards
V.Vasilev
Back to top
View user's profile Send private message Visit poster's website
gbaddeley
PostPosted: Sun Sep 15, 2024 5:47 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

I've used PHP, but not mqseries services.

It looks like PCF message structure handling functions are not provided.

The mqseries_inq function https://www.php.net/manual/en/function.mqseries-inq.php allows an application to inquire on attribute values of an open queue. This is not PCF !
_________________
Glenn
Back to top
View user's profile Send private message
vasilev
PostPosted: Mon Sep 16, 2024 12:09 am    Post subject: Reply with quote

Acolyte

Joined: 31 Oct 2014
Posts: 71
Location: Germany

yes, this is different.
Hm, ok so for now there is no way with PHP..
_________________
Regards
V.Vasilev
Back to top
View user's profile Send private message Visit poster's website
gbaddeley
PostPosted: Mon Sep 16, 2024 3:11 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

There will be a way with PHP. It is not impossible. I would call it an interesting challenge.

You will need to write functions that generate the PCF request structure in the required format, and interpret the structure in the reply message.

You could share your code in the MQ GIT repo. It could be useful for someone else.
_________________
Glenn
Back to top
View user's profile Send private message
vasilev
PostPosted: Mon Sep 23, 2024 12:19 am    Post subject: Reply with quote

Acolyte

Joined: 31 Oct 2014
Posts: 71
Location: Germany

if somebody can provide me with information on how to start, I can try.
how to define such classes in PHP.. and compile them:

https://www.ibm.com/docs/nl/ibm-mq/9.2?topic=mcj-pcfagent


thank you
_________________
Regards
V.Vasilev
Back to top
View user's profile Send private message Visit poster's website
RogerLacroix
PostPosted: Mon Sep 23, 2024 3:13 pm    Post subject: Reply with quote

Jedi Knight

Joined: 15 May 2001
Posts: 3264
Location: London, ON Canada

vasilev wrote:
if somebody can provide me with information on how to start, I can try.
how to define such classes in PHP.. and compile them:

https://www.ibm.com/docs/nl/ibm-mq/9.2?topic=mcj-pcfagent

PCFAgent in the link is for Java and is an encapsulating class. I wouldn't go down that path.

You should be looking at C examples for PCF messages. Or you could try using "Escape PCF".

If you are doing one-off then Escape PCF messages are probably simpler but you will need to parse the returned output because it is just plain text (MQSC results).

later
Roger
_________________
Capitalware: Transforming tomorrow into today.
Connected to MQ!
Twitter
Back to top
View user's profile Send private message Visit poster's website
gbaddeley
PostPosted: Tue Sep 24, 2024 8:55 pm    Post subject: Reply with quote

Jedi Knight

Joined: 25 Mar 2003
Posts: 2538
Location: Melbourne, Australia

I agree with Roger. PHP has much in common with C. Start with minimal required code to implement the MQ PCF Escape command.
_________________
Glenn
Back to top
View user's profile Send private message
vasilev
PostPosted: Thu Sep 26, 2024 9:27 am    Post subject: Reply with quote

Acolyte

Joined: 31 Oct 2014
Posts: 71
Location: Germany

Thanks for the info! Will try to male it happen somehow
_________________
Regards
V.Vasilev
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » General IBM MQ Support » PHP mqseries inquire Qmanager info
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.