| Author | Message | 
		
		  | andrewhirst | 
			  
				|  Posted: Tue May 20, 2008 12:11 am    Post subject: Unable to change variables in debug |   |  | 
		
		  |  Apprentice
 
 
 Joined: 06 Jul 2004Posts: 33
 Location: UK
 
 | 
			  
				| Hi, 
 I've come across a funny using the toolkit in debug mode that prevents the value of some variables from being changed.
 
 The code hits a breakpoint and halts. I've tried to change the value of variables directly in the variables tab and also using the Change Value item in the context sensitive menu. The new value is correctly displayed, but in fact the variable is not changed.
 
 The variable in question is a CHAR that is a copy of SQLCODE.
 
 
   
	| Code: |  
	| SET sqlCode = SQLCODE; |  
 I am able to modify other CHAR variables, but not sqlCode.
 
 Any ideas?
 
 I'm running these versions:
 ToolKit: 6.1.0.1-20080303_1143
 Broker: 6.1.0.1 CMVC Lev S610-FP01 DH610-GOLD
 MQ: 6.0.2.1
 
 Many thanks.
 _________________
 Andrew Hirst
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Gaya3 | 
			  
				|  Posted: Tue May 20, 2008 12:58 am    Post subject: |   |  | 
		
		  |  Jedi
 
 
 Joined: 12 Sep 2006Posts: 2493
 Location: Boston, US
 
 | 
			  
				| how you modified the other char variables, and what is the SQLCODE contains.. 
 Regards
 Gayathri
 _________________
 Regards
 Gayathri
 -----------------------------------------------
 Do Something Before you Die
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | dp111443 | 
			  
				|  Posted: Tue May 20, 2008 2:56 am    Post subject: |   |  | 
		
		  | Voyager
 
 
 Joined: 25 Feb 2004Posts: 82
 
 
 | 
			  
				| Also, have you tried running a debug trace on your code to see what that gives you? _________________
 Integration Design/Developer
 
 IBM Certified System Administrator -
 WebSphere MQ V5.3
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | elvis_gn | 
			  
				|  Posted: Tue May 20, 2008 4:40 am    Post subject: |   |  | 
		
		  |  Padawan
 
 
 Joined: 08 Oct 2004Posts: 1905
 Location: Dubai
 
 | 
			  
				| Hi guys, 
 Hmmm....is SQLCODE a char in the first place ? I think you need to do a cast, right ? Or did you already ?
   
 Regards.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | andrewhirst | 
			  
				|  Posted: Tue May 20, 2008 5:10 am    Post subject: |   |  | 
		
		  |  Apprentice
 
 
 Joined: 06 Jul 2004Posts: 33
 Location: UK
 
 | 
			  
				| I modified the variables either by typing directly into the cell on the variable tab or right clicking and editing it in the dialogue box. 
 Looking at the trace I see this:
 
 
   
	| Code: |  
	| SET sqlCode = SQLCODE;
 
 IF SQLCODE <> 0 THEN
 
 |  The IF statement in the trace is not the same as the source code.
 
 I'd spotted the mistake with the type and corrected it. Still misbehaves.
 
 Regards,
 
 Andrew.
 _________________
 Andrew Hirst
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | andrewhirst | 
			  
				|  Posted: Tue May 20, 2008 6:45 am    Post subject: |   |  | 
		
		  |  Apprentice
 
 
 Joined: 06 Jul 2004Posts: 33
 Location: UK
 
 | 
			  
				| I renamed sqlCode to sqlRetCode and the problem has gone. 
 Also my ToolKit has been updated from 6.1.0.1-20080303_1143 to 6.1.0.1-20080408_1404.
 
 Many thanks for your help.
 
 Andrew.
 _________________
 Andrew Hirst
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |