| Author | Message | 
		
		  | Gralgrathor | 
			  
				|  Posted: Thu Aug 13, 2009 6:21 am    Post subject: MBFE: Write multiple copybook records to file |   |  | 
		
		  | Master
 
 
 Joined: 23 Jul 2009Posts: 297
 
 
 | 
			  
				| Hi. 
 I'm new to MBFE (and copybook, and WMB, and ...) and I'm having a little trouble for which I cannot find the solution in the MBFE manuals or on the web.
 
 I am reading a CSV file, and transforming it into a copybook format file. I am running WMB 6.0 with MBFE 5.
 
 I am running into the following issues:
 
 1. I am using Input Propagation Policy = record by record, because as soon as I build a copy book structure containing multiple records in the OutputRoot.MRM, only the first record gets written to file. I want to use the whole file setting. Can anybody tell me what I am doing wrong, or where to find a solution?
 
 2. I have tried to define a TDS format and map it onto a message type so that I can let the built in parsers do the dirty work of slicing up the CSV input file, but for the life of me I cannot figure out how to get this to work. So in stead I've had to write some really ugly ESQL code that does the slicing. Does anyone know of a simple howto/tutorial/example/case where CSV is read and transformed to - well, anything, but preferably CPY? One where they give me all the settings and some ESQL code as well?
 
 Thanks in advance for your advice.
 
 
 Gr, Gr.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | smdavies99 | 
			  
				|  Posted: Thu Aug 13, 2009 6:37 am    Post subject: |   |  | 
		
		  |  Jedi Council
 
 
 Joined: 10 Feb 2003Posts: 6076
 Location: Somewhere over the Rainbow this side of Never-never land.
 
 | 
			  
				| Have you read the tutorial available via the 'sticky' post at the top of this forum? That will help you a lot in sorting out your message model 
 I can't quite understand this bit in your post
 
 
   
	| Quote: |  
	| I am using Input Propagation Policy = record by record, because as soon as I build a copy book structure containing multiple records in the OutputRoot.MRM, only the first record gets written to file. I want to use the whole file setting. Can anybody tell me what I am doing wrong, or where to find a solution?
 
 
 |  
 Can you post an example of what your output tree looks like from a TraceNode placed just before the MBFE FileOUtputNode.
 _________________
 WMQ User since 1999
 MQSI/WBI/WMB/'Thingy' User since 2002
 Linux user since 1995
 
 Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Gralgrathor | 
			  
				|  Posted: Thu Aug 13, 2009 6:54 am    Post subject: |   |  | 
		
		  | Master
 
 
 Joined: 23 Jul 2009Posts: 297
 
 
 | 
			  
				| 
   
	| smdavies99 wrote: |  
	| Have you read the tutorial available via the 'sticky' post at the top of this forum? |  
 Yes, the tutorial contained useful information. I haven't got (2) to work just yet, but I think I'll drop the issue now.
 
 
 
   
	| smdavies99 wrote: |  
	| Can you post an example of what your output tree looks like from a TraceNode placed just before the MBFE FileOUtputNode |  
 Coming up:
 
 
 
   
	| Code: |  
	| (0x01000021):MRM        = ( ['mrm' : 0x3950344]
 (0x01000000):RECORD = (
 (0x01000000):RECORD_ID_X       = (
 (0x03000000):RECORD_ID = 1 (INTEGER)
 )
 (0x03000000):RECORD_EXT_KEY = '8' (CHARACTER)
 )
 (0x01000000):RECORD = (
 (0x01000000):RECORD_ID_X       = (
 (0x03000000):RECORD_ID = 63 (INTEGER)
 )
 (0x03000000):RECORD_EXT_KEY = '123456789  WAT EEN VREEMDE' (CHARACTER)
 )
 (0x01000000):RECORD = (
 (0x01000000):RECORD_ID_X       = (
 (0x03000000):RECORD_ID = 65 (INTEGER)
 )
 (0x03000000):RECORD_EXT_KEY = '234567890  KAASBALLETJES ZIJN LEKK' (CHARACTER)
 )
 (0x01000000):RECORD = (
 (0x01000000):RECORD_ID_X       = (
 (0x03000000):RECORD_ID = 66 (INTEGER)
 )
 (0x03000000):RECORD_EXT_KEY = '345678901' (CHARACTER)
 )
 )
 
 
 |  
 I am copying the OutputLocalEnvironment from the InputLocalEnvironment.
 
 Only the first record is written to the output file. I am fairly sure I am missing something very obvious, but I've been staring at the documentation for days now, and I'm afraid I simply can't hack it without outside help...
 
 Thanks!
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | somsayan | 
			  
				|  Posted: Sun Aug 16, 2009 10:05 pm    Post subject: |   |  | 
		
		  | Apprentice
 
 
 Joined: 06 Apr 2007Posts: 49
 
 
 | 
			  
				| What is the current broker fixpack that has been installed in your system? |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Gralgrathor | 
			  
				|  Posted: Sun Aug 16, 2009 11:38 pm    Post subject: |   |  | 
		
		  | Master
 
 
 Joined: 23 Jul 2009Posts: 297
 
 
 | 
			  
				| 
   
	| somsayan wrote: |  
	| What is the current broker fixpack that has been installed in your system? |  
 WMB runtime shows as 6.0.0.9, and the toolkit shows 6.0.2.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Gralgrathor | 
			  
				|  Posted: Wed Aug 19, 2009 1:27 am    Post subject: |   |  | 
		
		  | Master
 
 
 Joined: 23 Jul 2009Posts: 297
 
 
 | 
			  
				| Status update: 
 I've accepted the fact that I can - for some reason - not access the entire content of the file and then write to output the entire batch of resulting records in a single propagate. A bit of a shame that. In stead, I've programmed the flow to log just the first and the last record. I'm still looking for an answer to the problem though; it would be nice to know how.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | somsayan | 
			  
				|  Posted: Wed Aug 19, 2009 1:39 am    Post subject: |   |  | 
		
		  | Apprentice
 
 
 Joined: 06 Apr 2007Posts: 49
 
 
 | 
			  
				| There are few cases in which this can happen, as far as i know. 
 1. Broker having fixpack below 5 doesn't support multiple lines through MBFE.
 2. The output message set doesn't have max records at -1.
 3. The MBFE output node has the property "Disposition" set to "Replace".
 
 Since the broker has fixpack 9, the first case is ruled out. Can you check the other 2.
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  | Gralgrathor | 
			  
				|  Posted: Wed Aug 19, 2009 5:36 am    Post subject: |   |  | 
		
		  | Master
 
 
 Joined: 23 Jul 2009Posts: 297
 
 
 | 
			  
				| I suspect that it might be 
 
 
   
	| somsayan wrote: |  
	| 2. The output message set doesn't have max records at -1. |  
 What object contains this "max records" field?
 |  | 
		
		  | Back to top |  | 
		
		  |  | 
		
		  |  |