| Author | 
		  Message
		 | 
		
		  | bobbee | 
		  
		    
			  
				 Posted: Tue Jul 12, 2022 2:30 pm    Post subject: pymqi MQRCCF_CFH_LENGTH_ERROR on MQCMD_INQUIRE_CHANNEL | 
				     | 
			   
			 
		   | 
		
		
		    Knight
 
 Joined: 20 Sep 2001 Posts: 546 Location: Tampa 
  | 
		  
		    
			  
				All this code worked on Linux. I then brought it over to AIX 7.1 and I am getting the 3002 on my first call into pymqi.
 
 
I did a GOOGLE and I see mention of this error under github/DSUCH. When I click on it I get 'page not found'.
 
 
Anyone know the reason for this error. I did build/Install pymqi in SERVER mode. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | hughson | 
		  
		    
			  
				 Posted: Tue Jul 12, 2022 11:40 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Padawan
 
 Joined: 09 May 2013 Posts: 1967 Location: Bay of Plenty, New Zealand 
  | 
		  
		    
			  
				Looking at the cached version of the webpage you found, it looks to be an endianness problem.
 
 
Can you change MQENC_NATIVE to 0x00000111 in CMQC.py file before running code on AIX?
 
 
Cheers,
 
Morag _________________ Morag Hughson @MoragHughson
 
IBM MQ Technical Education Specialist
 
Get your IBM MQ training here!
 
MQGem Software | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | markt | 
		  
		    
			  
				 Posted: Wed Jul 13, 2022 2:37 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Knight
 
 Joined: 14 May 2002 Posts: 512
  
  | 
		  
		    
			  
				It looks like there are a number of things in CMQC.py that assume a particular environment. For example, MQPL_NATIVE/MQAT_NATIVE appear to be always set to Windows. Similarly the various ENCODING constants (though only the combined ENC_NATIVE is really used).
 
 
That would not be important if the mapping structures are really only being initialised from the platform-specific cmqc.h, but it does look like __init__.py does make use of the CMQC.py setting. So it's wrong for any big-endian operating system, which would also include linux s390x.
 
 
At least you have the opportunity to edit that file to fix it locally. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bobbee | 
		  
		    
			  
				 Posted: Wed Jul 13, 2022 5:08 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Knight
 
 Joined: 20 Sep 2001 Posts: 546 Location: Tampa 
  | 
		  
		    
			  
				You just gotta love CACHE!!!! Changed the value and the script and MQ pymqi commands worked. now to get ride of the issues.
 
 
Thank you very much!!! | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | gbaddeley | 
		  
		    
			  
				 Posted: Wed Jul 13, 2022 3:48 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Knight
 
 Joined: 25 Mar 2003 Posts: 2538 Location: Melbourne, Australia 
  | 
		  
		    
			  
				https://pypi.org/project/pymqi/
 
   
	| Quote: | 
   
  
	PyMQI is a production-ready, open-source Python extension for IBM MQ (formerly known as WebSphere MQ and MQSeries).
 
 
For 20+ years, the library has been used by thousands of companies around the world with their queue managers running on Linux, Windows, UNIX and z/OS. | 
   
 
 
This tends to indicate that you are doing something wrong, such that the endian is incorrect. Copying the header from x86 Linux to Power AIX is not a good idea? _________________ Glenn | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | bobbee | 
		  
		    
			  
				 Posted: Thu Jul 14, 2022 3:52 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Knight
 
 Joined: 20 Sep 2001 Posts: 546 Location: Tampa 
  | 
		  
		    
			  
				| @gbaddeley, I can see what you are saying. The build and install were done directly from a download of the code on Github (1/12/8 ). So I am wondering if there is something amis in setup.py. They change that was suggest to the NATIVE variable in CMQC.py did fix the issue. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |