|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|    |  |  
  
	| PHP mqseries inquire Qmanager info | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | vasilev | 
			  
				|  Posted: Thu Sep 12, 2024 4:41 am    Post subject: PHP mqseries inquire Qmanager info |   |  |  
		  |  Acolyte
 
 
 Joined: 31 Oct 2014Posts: 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 |  |  
		  |  |  
		  | gbaddeley | 
			  
				|  Posted: Sun Sep 15, 2024 5:47 pm    Post subject: |   |  |  
		  |  Jedi Knight
 
 
 Joined: 25 Mar 2003Posts: 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 |  |  
		  |  |  
		  | vasilev | 
			  
				|  Posted: Mon Sep 16, 2024 12:09 am    Post subject: |   |  |  
		  |  Acolyte
 
 
 Joined: 31 Oct 2014Posts: 71
 Location: Germany
 
 | 
			  
				| yes, this is different. Hm, ok so for now there is no way with PHP..
 _________________
 Regards
 V.Vasilev
 |  |  
		  | Back to top |  |  
		  |  |  
		  | gbaddeley | 
			  
				|  Posted: Mon Sep 16, 2024 3:11 pm    Post subject: |   |  |  
		  |  Jedi Knight
 
 
 Joined: 25 Mar 2003Posts: 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 |  |  
		  |  |  
		  | vasilev | 
			  
				|  Posted: Mon Sep 23, 2024 12:19 am    Post subject: |   |  |  
		  |  Acolyte
 
 
 Joined: 31 Oct 2014Posts: 71
 Location: Germany
 
 |  |  
		  | Back to top |  |  
		  |  |  
		  | RogerLacroix | 
			  
				|  Posted: Mon Sep 23, 2024 3:13 pm    Post subject: |   |  |  
		  |  Jedi Knight
 
 
 Joined: 15 May 2001Posts: 3265
 Location: London, ON  Canada
 
 | 
			  
				| 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 |  |  
		  |  |  
		  | gbaddeley | 
			  
				|  Posted: Tue Sep 24, 2024 8:55 pm    Post subject: |   |  |  
		  |  Jedi Knight
 
 
 Joined: 25 Mar 2003Posts: 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 |  |  
		  |  |  
		  | vasilev | 
			  
				|  Posted: Thu Sep 26, 2024 9:27 am    Post subject: |   |  |  
		  |  Acolyte
 
 
 Joined: 31 Oct 2014Posts: 71
 Location: Germany
 
 | 
			  
				| Thanks for the info! Will try to male it happen somehow  _________________
 Regards
 V.Vasilev
 |  |  
		  | Back to top |  |  
		  |  |  
		  |  |  |  
  
	|    |  | Page 1 of 1 |  
 
 
  
  	| 
		
		  | 
 
 | 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
 
 |  |  |  |