| Author | 
		  Message
		 | 
		
		  | mbscott | 
		  
		    
			  
				 Posted: Tue Jul 19, 2011 7:31 am    Post subject: Unable to write MRM message to queue | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 15 Jul 2011 Posts: 15
  
  | 
		  
		    
			  
				Hello,
 
 
 
         I am unable to send mrm message to queue and getting below exception.
 
 
ExceptionList
 
	RecoverableException
 
			File:CHARACTER:F:\build\S610_P\src\DataFlowEngine\ImbDataFlowNode.cpp
 
			Line:INTEGER:957
 
			Function:CHARACTER:ImbDataFlowNode::createExceptionList
 
			Type:CHARACTER:ComIbmMQInputNode
 
			Name:CHARACTER:TEST#FCMComposite_1_1
 
			Label:CHARACTER:TEST.MQInput
 
			Catalog:CHARACTER:BIPv610
 
			Severity:INTEGER:3
 
			Number:INTEGER:2230
 
			Text:CHARACTER:Node throwing exception
 
			RecoverableException
 
					File:CHARACTER:F:\build\S610_P\src\DataFlowEngine\ImbMqOutputNode.cpp
 
					Line:INTEGER:909
 
					Function:CHARACTER:ImbMqOutputNode::evaluate
 
					Type:CHARACTER:ComIbmMQOutputNode
 
					Name:CHARACTER:TEST#FCMComposite_1_2
 
					Label:CHARACTER:TEST.MQOutput
 
					Catalog:CHARACTER:BIPv610
 
					Severity:INTEGER:3
 
					Number:INTEGER:2230
 
					Text:CHARACTER:Caught exception and rethrowing
 
					ParserException
 
							File:CHARACTER:F:\build\S610_P\src\MTI\MTIforBroker\MtiImbParser2\MtiImbParser.cpp
 
							Line:INTEGER:1866
 
							Function:CHARACTER:MtiImbParser::refreshBitStreamFromElements - 9 par
 
							Type:CHARACTER:ComIbmMQInputNode
 
							Name:CHARACTER:TEST#FCMComposite_1_1
 
							Label:CHARACTER:TEST.MQInput
 
							Catalog:CHARACTER:BIPv610
 
							Severity:INTEGER:3
 
							Number:INTEGER:5286
 
							Text:CHARACTER:ImbRecoverableException caught from worker when attempting to write out the bitstream.
 
							Insert
 
									Type:INTEGER:5
 
									Text:CHARACTER:TESTCPY
 
							Insert
 
									Type:INTEGER:2
 
									Text:CHARACTER:1
 
							Insert
 
									Type:INTEGER:5
 
									Text:CHARACTER:Binary1
 
							Insert
 
									Type:INTEGER:5
 
									Text:CHARACTER:/msg_LMSA6001OUTPUT
 
							ParserException
 
									File:CHARACTER:F:\build\S610_P\src\cpi\pwf\cwf\cwfworker.cpp
 
									Line:INTEGER:430
 
									Function:CHARACTER:CWFWorker::write
 
									Type:CHARACTER:
 
									Name:CHARACTER:
 
									Label:CHARACTER:
 
									Catalog:CHARACTER:BIPv610
 
									Severity:INTEGER:3
 
									Number:INTEGER:5167
 
									Text:CHARACTER:CWF General Error
 
									Insert
 
											Type:INTEGER:2
 
											Text:CHARACTER:0
 
									Insert
 
											Type:INTEGER:5
 
											Text:CHARACTER:CWFWorker::write
 
									Insert
 
											Type:INTEGER:5
 
											Text:CHARACTER:msg_LMSA6001OUTPUT
 
									ParserException
 
											File:CHARACTER:F:\build\S610_P\src\cpi\pwf\cwf\cwfmessage.cpp
 
											Line:INTEGER:618
 
											Function:CHARACTER:CMessage::write
 
											Type:CHARACTER:
 
											Name:CHARACTER:
 
											Label:CHARACTER:
 
											Catalog:CHARACTER:BIPv610
 
											Severity:INTEGER:3
 
											Number:INTEGER:5350
 
											Text:CHARACTER:CWF Writing error
 
											Insert
 
													Type:INTEGER:2
 
													Text:CHARACTER:0
 
											Insert
 
													Type:INTEGER:5
 
													Text:CHARACTER:CMessage::write
 
											Insert
 
													Type:INTEGER:5
 
													Text:CHARACTER:msg_LMSA6001OUTPUT
 
											Insert
 
													Type:INTEGER:5
 
													Text:CHARACTER:/msg_LMSA6001OUTPUT/LMSA6001_RESULTS/LMSA6001_RESULT_ENTRY
 
											ParserException
 
													File:CHARACTER:F:\build\S610_P\src\cpi\pwf\cwf\cwfcontext.cpp
 
													Line:INTEGER:340
 
													Function:CHARACTER:CContext::CheckDefaultValue
 
													Type:CHARACTER:
 
													Name:CHARACTER:
 
													Label:CHARACTER:
 
													Catalog:CHARACTER:BIPv610
 
													Severity:INTEGER:3
 
													Number:INTEGER:5344
 
													Text:CHARACTER:CWF Logical Tree - Message Definition Mismatch
 
													Insert
 
															Type:INTEGER:5
 
															Text:CHARACTER:msg_LMSA6001OUTPUT
 
													Insert
 
															Type:INTEGER:5
 
															Text:CHARACTER:LMSA6001_LOCO_INIT
 
 
 
Actually LMSA6001_RESULT_ENTRY type has min 1 max 3. But In the code i am trying to pass 2 records. it got failing with above exception.
 
If i sent 3 records then working fine.
 
 
Here is the code
 
 
SET OutputRoot.Properties.MessageSet = 'DSVJEKC002001';
 
		SET OutputRoot.Properties.MessageType = 'msg_LMSA6001OUTPUT';
 
		SET OutputRoot.Properties.MessageFormat = 'Binary1';
 
		
 
		CREATE FIELD OutputRoot.MRM;
 
		DECLARE OutRef REFERENCE TO OutputRoot.MRM;
 
		
 
		SET OutRef.LMSA6001_RESPONSE_CODE = 'aaa';
 
		SET OutRef.LMSA6001_RESPONSE_MESSAGE = 'bbb';
 
		
 
		DECLARE I, J INT ;
 
		SET I = 1;
 
		SET J = 3;
 
		WHILE I < J DO
 
		
 
		SET OutRef.LMSA6001_RESULTS.LMSA6001_RESULT_ENTRY[I].LMSA6001_LOCO_ID.LMSA6001_LOCO_INIT  = 'cc';
 
		SET OutRef.LMSA6001_RESULTS.LMSA6001_RESULT_ENTRY[I].LMSA6001_LOCO_ID.LMSA6001_LOCO_NUM.LMSA6001_LOCO_FILLER = 'fi';
 
		SET OutRef.LMSA6001_RESULTS.LMSA6001_RESULT_ENTRY[I].LMSA6001_LOCO_ID.LMSA6001_LOCO_NUM.LMSA6001_LOCO_NUMBER = 'gg';
 
		SET OutRef.LMSA6001_RESULTS.LMSA6001_RESULT_ENTRY[I].LMSA6001_LOCO_IN_OUT = 'b';
 
		SET OutRef.LMSA6001_RESULTS.LMSA6001_RESULT_ENTRY[I].LMSA6001_LAST_PING_TS = 'dd';
 
		SET OutRef.LMSA6001_RESULTS.LMSA6001_RESULT_ENTRY[I].LMSA6001_NAME_OF_GEOFENCE = 'j';
 
		SET OutRef.LMSA6001_RESULTS.LMSA6001_RESULT_ENTRY[I].LMSA6001_ELAPSED_TIME = 'k';
 
		SET I = I + 1;
 
		END WHILE;
 
 
 
 
since min occur 1 , it should allow, but in this case its not. 
 
 
Can u guys Please help out, where the issue is. Thanks for your help again. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Tue Jul 19, 2011 7:49 am    Post subject: Re: Unable to write MRM message to queue | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| mbscott wrote: | 
   
  
	| Can u guys Please help out, where the issue is. | 
   
 
 
 
What does LMAS6001_RESULT_ENTRY and it's children default to when all 3 possible elements are not present? _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mbscott | 
		  
		    
			  
				 Posted: Tue Jul 19, 2011 8:29 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 15 Jul 2011 Posts: 15
  
  | 
		  
		    
			  
				
   
	| Code: | 
   
  
	| What does LMAS6001_RESULT_ENTRY and it's children default to when all 3 possible elements are not present? | 
   
 
 
 
all 3 possible elements are not present getting same exception. 
 
 
If we set default values, all 3 elements comes with default value.
 
 
IF we set values for 1 element in output msg  , and set default values in msgset, 1 element has that values and remaining 2 has default values.
 
 
My understand is Output expecting always max occurs. Don't know why. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Tue Jul 19, 2011 9:39 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| mbscott wrote: | 
   
  
	| My understand is Output expecting always max occurs.  | 
   
 
 
 
Because that's what the message set configuration is set to. You don't mention how you've created the message set (long hand or importing) but the CWF is set to have 3 elements at the end. This was why I asked about the defaults; if the defaults are being set for the missing elements then the message set declares them as mandatory.
 
 
Check the configuration. _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mbscott | 
		  
		    
			  
				 Posted: Tue Jul 19, 2011 10:29 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 15 Jul 2011 Posts: 15
  
  | 
		  
		    
			  
				| Ok. Message definition created by importing cobol copy book.  In Message set Policy for missing elements set usedefaultvalues. So we must specify default values.. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Tue Jul 19, 2011 10:34 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				
   
	| mbscott wrote: | 
   
  
	| Message definition created by importing cobol copy book.  | 
   
 
 
 
So does the copy book describe that group as OCCURS or OCCURS DEPENDING ON? _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mbscott | 
		  
		    
			  
				 Posted: Tue Jul 19, 2011 12:05 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 15 Jul 2011 Posts: 15
  
  | 
		  
		    
			  
				This is the cpy i am using
 
 
 01  LMSA6001-OUTPUT.
 
        05  LMSA6001-RESPONSE-CODE          PIC X(008) VALUE SPACES.
 
        05  LMSA6001-RESPONSE-MESSAGE       PIC X(080) VALUE SPACES.
 
 
        05  LMSA6001-RESULTS                           VALUE SPACES.
 
         10  LMSA6001-RESULT-ENTRY       OCCURS 100 TIMES.
 
             15  LMSA6001-LOCO-ID.
 
                 20  LMSA6001-LOCO-INIT             PIC X(004).
 
                 20  LMSA6001-LOCO-NUM.
 
                     25  LMSA6001-LOCO-FILLER       PIC X(004).
 
                     25  LMSA6001-LOCO-NUMBER       PIC X(006).
 
             15  LMSA6001-LOCO-IN-OUT               PIC X(001).
 
             15  LMSA6001-LAST-PING-TS              PIC X(026).
 
             15  LMSA6001-NAME-OF-GEOFENCE          PIC X(256).
 
             15  LMSA6001-ELAPSED-TIME              PIC X(012)
 
for unit testing i changed to 3 occurs. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | Vitor | 
		  
		    
			  
				 Posted: Tue Jul 19, 2011 12:12 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Grand High Poobah
 
 Joined: 11 Nov 2005 Posts: 26093 Location: Texas, USA 
  | 
		  
		    
			  
				That copybook doesn't define an element that occurs from 1 to 100 times - it defines an element that occurs 100 times. If you change it to 3 it will define an element that occurs 3 times. So what did you mean in you OP when you said:
 
 
   
	| mbscott wrote: | 
   
  
	| Actually LMSA6001_RESULT_ENTRY type has min 1 max 3.  | 
   
 
 
 
Where do you think that varying capacity has been set up? Does the receiving application think it varies? If so, you need their copybook not that one. _________________ Honesty is the best policy.
 
Insanity is the best defence. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | mbscott | 
		  
		    
			  
				 Posted: Tue Jul 19, 2011 12:45 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Novice
 
 Joined: 15 Jul 2011 Posts: 15
  
  | 
		  
		    
			  
				| Yes. you are correct. It might be occurs 100 times. I need to confirm with App team. if so i will set default values for missing elements. Thank you. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |