|   | 
	 
  
    | 
RSS Feed - WebSphere MQ Support
 | 
RSS Feed - Message Broker Support
 |   
 
  
	     | 
	 | 
   
 
  
	|  Loop error in MA0T Script | 
	« View previous topic :: View next topic »  | 
   
  
  	
	  
		
		
		  | Author | 
		  Message
		 |  
		
		  | psn | 
		  
		    
			  
				 Posted: Mon Feb 28, 2005 2:37 am    Post subject: Loop error in MA0T Script | 
				     | 
			   
			 
		   | 
		 
		
		   Disciple
 
 Joined: 30 Oct 2002 Posts: 193 Location: France 
  | 
		  
		    
			  
				Hi , 
 
 
I want to read each Messages from a Queue with the follow MA0T script but after the first message read the ForEver Loop is broken but their are more messages staing on that queue :
 
 
<?xml version="1.0"?>
 
<!-- Test GetMsg PutMsg functionality -->
 
<MsgTest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="D:\DATA\MsgTest\Schema\MsgTest.xsd">
 
    <Control>
 
        <Connection>
 
            <QMgr>QD01</QMgr>
 
            <Channel>SYSTEM.DEF.SVRCONN</Channel>
 
            <Host>199.41.242.11</Host>
 
            <Port>1999</Port>
 
        </Connection>
 
        <TestLog>
 
            <File>get_msg_QD01.log</File>
 
            <Dir>D:\DATA\MsgTest\TestScripts\RAIQ\Logs</Dir>
 
        </TestLog>
 
        <TestReport>
 
            <File>get_msg_QD01.rpt</File>
 
            <Dir>D:\DATA\MsgTest\TestScripts\RAIQ\Reports</Dir>
 
        </TestReport>
 
        <TestMaxWait>10</TestMaxWait>
 
        <NextLogMsgInterval>1</NextLogMsgInterval>
 
        <Concurrency>1</Concurrency>
 
        <ConcurrencyWait>1</ConcurrencyWait>
 
        <OnError>LOG</OnError>
 
    </Control>
 
    <Defaults/>
 
    <!-- Simple test of GetMsg from QD01 and PutFile  -->
 
    <!-- -->
 
    <Test Name="#1 Get binary message">
 
	<ForEver Name="Lauf" Format="%02d">
 
        <GetMsg MQMD="Get_MQMD">
 
            <Q>PSN.TESTQ</Q>
 
	      <BreakOnRC>2033</BreakOnRC>
 
        </GetMsg>
 
	  <PutFile>
 
	      <File>FileGet%Lauf%.bin</File>
 
            <Dir>D:\DATA\MsgTest\TestScripts\RAIQ\output\QD01</Dir>
 
		<MQMDFile MQMD="Get_MQMD">MQMDFileGet.mdf</MQMDFile>
 
	  </PutFile>
 
	</ForEver>
 
    </Test>
 
 </MsgTest>
 
 
That is the logfile :
 
 
11:23:18 **** MsgTest V1.2.1 Started.  **** Compiled on Feb 17 2005 at 06:00:12 ****
 
11:23:18 I028 MsgTest TestLog.File="D:\DATA\MsgTest\TestScripts\RAIQ\Logs\get_msg_QD01.log" opened.
 
11:23:18 I030 MsgTest TestReport.File="D:\DATA\MsgTest\TestScripts\RAIQ\Reports\get_msg_QD01.rpt" opened.
 
11:23:18 I040 MQCONNX to QMgr="QD01" successful, CC=0, RC=0
 
11:23:18 I049 Program invocation variable values.
 
11:23:18 I+++   None defined.
 
11:23:18 I049 <Default> variable values.
 
11:23:18 I+++   None defined.
 
11:23:18 I034 Test Num=001 Test=#1 Get binary message. Initialised.
 
11:23:18 I035 Test Num=001 Test=#1 Get binary message. Assigned to the active list.
 
11:23:18 I075 Test load phase completed. Test execution phase started.
 
11:23:18 I044 Test Num=001   Command=ForEver(Start) Name="Lauf" 1:1:1. Initialise.
 
11:23:18 I045 Test Num=001   Command=ForEver(Start) Name="Lauf" 1:1:1:1. Run.
 
11:23:18 I044 Test Num=001   Command=GetMsg. Initialise.
 
11:23:18 I+++ Test Num=001     Buffer=TestBuff BuffLen=32768 bytes allocated.
 
11:23:18 I054 Test Num=001     MQOPEN of TargQ="PSN.TESTQ" TargQMgr="" ConnQMgr="QD01" successful, CC=0, RC=0
 
11:23:18 I045 Test Num=001   Command=GetMsg MaxWait=10:0. Run.
 
11:23:18 I+++ Test Num=001     MsgId=0xc3e2d840d8c4f0f14040404040404040bca39dd63d82a280.
 
11:23:18 I+++ Test Num=001     CorrelId=.
 
11:23:18 I+++ Test Num=001     TargQ="PSN.TESTQ" TargQMgr="" ConnQMgr="QD01" GMO.Options=0x00002004 message get successful.
 
11:23:18 I+++ Test Num=001     Buffer=TestBuff BuffLen=32768 DataLen=272 MsgLen=272.
 
11:23:18 I+++ Test Num=001     Data="................................ !"#$%&'()*+,-./...".
 
11:23:18 I038 Test Num=001   Command=GetMsg completed successfully.
 
11:23:18 I044 Test Num=001   Command=PutFile. Initialise.
 
11:23:18 I061 Test Num=001     Value resolution "FileGet%Lauf%.bin" to formatted string "FileGet01.bin".
 
11:23:18 I+++ Test Num=001     Dir=D:\DATA\MsgTest\TestScripts\RAIQ\output\QD01 File=FileGet01.bin.
 
11:23:18 I+++ Test Num=001     Buffer=TestBuff BuffLen=32768 DataLen=272.
 
11:23:18 I045 Test Num=001   Command=PutFile. Run.
 
11:23:18 I+++ Test Num=001     Put file=D:\DATA\MsgTest\TestScripts\RAIQ\output\QD01\FileGet01.bin.
 
11:23:18 I+++ Test Num=001     Buffer=TestBuff BuffLen=32768 DataLen=272.
 
11:23:18 I+++ Test Num=001     Data="................................ !"#$%&'()*+,-./...".
 
11:23:18 I+++ Test Num=001     Put MQMDFile=D:\DATA\MsgTest\TestScripts\RAIQ\output\QD01\MQMDFileGet.mdf.
 
11:23:18 I038 Test Num=001   Command=PutFile completed successfully.
 
11:23:18 I045 Test Num=001   Command=ForEver(End)   Name="Lauf" 1:1:1:1. Run.
 
11:23:18 I045 Test Num=001   Command=ForEver(Start) Name="Lauf" 1:1:1:2. Run.
 
11:23:18 I044 Test Num=001   Command=GetMsg. Initialise.
 
11:23:18 I045 Test Num=001   Command=GetMsg MaxWait=10:0. Run.
 
11:23:18 I+++ Test Num=001     MsgId=0xc3e2d840d8c4f0f14040404040404040bca39dd63d82a280.
 
11:23:18 I+++ Test Num=001     CorrelId=.
 
11:23:18 I118 Test Num=001     GetMsg CC=2 RC=2033 matched <BreakOnRC> condition. Ending For/ForEver/ForEach loop Name=Lauf
 
11:23:18 I038 Test Num=001   Command=ForEver(End)   Name="Lauf" completed successfully.
 
11:23:18 I164 Test Num=001 TotalPutFile=1 SuccessfulPutFile=1 FailedPutFile=0.
 
11:23:18 I166 Test Num=001 TotalGetMsg=2 SuccessfulGetMsg=1 FailedGetMsg=0.
 
11:23:18 I036 Test Num=001 Test=#1 Get binary message. Completed successfully.
 
11:23:18 I056 Test Num=001 MQCLOSE of TargQ="PSN.TESTQ" TargQMgr="" ConnQMgr="QD01" successful, CC=0, RC=0
 
11:23:18 I196 MQBACK from QMgr="QD01" successful, CC=0, RC=0
 
11:23:18 I042 MQDISC from QMgr="QD01" successful, CC=0, RC=0
 
11:23:18 I165 TotalPutFile=1 SuccessfulPutFile=1 FailedPutFile=0.
 
11:23:18 I167 TotalGetMsg=2 SuccessfulGetMsg=1 FailedGetMsg=0.
 
11:23:18 I062 Test results Total=1 Successful=1 Failed=0 Incomplete=0.
 
11:23:18 I063 Total concurrency wait time=0 milliseconds.
 
11:23:18 **** MsgTest V1.2.1 Finished. ****
 
 
Have you an idea why the Loop is broken when ever message stay on the queue ?
 
 
Thanks
 
 
PSN | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | psn | 
		  
		    
			  
				 Posted: Tue Mar 01, 2005 2:29 am    Post subject:  | 
				     | 
			   
			 
		   | 
		 
		
		   Disciple
 
 Joined: 30 Oct 2002 Posts: 193 Location: France 
  | 
		  
		    
			  
				I have found it . I had forget to reset MsgId and CorellId in the MQGet
 
 
PSN | 
			   
			 
		   | 
		 
		
		  | Back to top | 
		  
		  	
		   | 
		 
		
		    | 
		 
		
		  | timjohnarm | 
		  
		    
			  
				 Posted: Sat Apr 23, 2005 1:40 am    Post subject:  | 
				     | 
			   
			 
		   | 
		 
		
		   Apprentice
 
 Joined: 28 Sep 2004 Posts: 40 Location: Melbourne Australia 
  | 
		  
		    
			  
				Glad you resolved your problem so quickly. I don't always have time to monitor what happening at mqseries.net. If you have any other problems I'd be happy to look into them for you. As the users guide says I can be contacted at ta882324@bigpond.net.au.
 
 
Just curious are you still using ma0t? If so how are you finding it and what if any other features would you like to see?
 
 
Regards
 
Tim Armstrong | 
			   
			 
		   | 
		 
		
		  | 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
  | 
  		 
	   
	 | 
   
 
  	 | 
	  |