| Author | 
		  Message
		 | 
		
		  | shalabh1976 | 
		  
		    
			  
				 Posted: Thu Oct 18, 2007 12:47 pm    Post subject: Message Set creation question | 
				     | 
			   
			 
		   | 
		
		
		    Partisan
 
 Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India 
  | 
		  
		    
			  
				I wanted to use TDS to create a message with the following structure:
 
Row 1 Length 5 n occurances
 
Row 2 Length 10 m occurances
 
Row 3 Length 6 x occurances.
 
n,m,x > 1 and unbounded.
 
All lines end with <CR><LF>
 
I know that I can't use Tagged delimited because the length is the only parameter to distinguish Row 1,2 or 3.
 
Using fixed length wants a value on MaxOccurances other than -1
 
I can only think of variable length delimited and all elements delimited.
 
But their usage is not working either.
 
I know I am setting some properties incorrectly or looks like this cannot be done without using a data pattern.
 
I am sure this was doable on 2.1
 
My current environment is V5.
 
Please advise _________________ Shalabh
 
IBM Cert. WMB V6.0
 
IBM Cert. MQ V5.3 App. Prog.
 
IBM Cert. DB2 9 DB Associate | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Thu Oct 18, 2007 12:52 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				There's an option somewhere for "repeat til end of bitstream".  That's what you want, I think.
 
 
Unless you mean that n is unbounded AND m is unbounded AND x is unbounded?  That's probably going to be tricky.
 
 
Or is is that there will only be three <cr><lf>'s in there? _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | shalabh1976 | 
		  
		    
			  
				 Posted: Thu Oct 18, 2007 12:54 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Partisan
 
 Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India 
  | 
		  
		    
			  
				Jeff,
 
All m,n,x are unbounded.
 
Wasn't end of bitstream somewhere in CWF? and not TDS? _________________ Shalabh
 
IBM Cert. WMB V6.0
 
IBM Cert. MQ V5.3 App. Prog.
 
IBM Cert. DB2 9 DB Associate | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | jefflowrey | 
		  
		    
			  
				 Posted: Thu Oct 18, 2007 1:00 pm    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		   Grand Poobah
 
 Joined: 16 Oct 2002 Posts: 19981
  
  | 
		  
		    
			  
				I think you'll have to use data patterns for this.  But again, you may have issues if you have [row1<cr><lf>][row1<cr><lf>]...[row2<cr><lf>]...
 
 
Because there's not going to be anything that can tell the parser that row 1 has stopped repeating and row 2 has started. _________________ I am *not* the model of the modern major general. | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | shalabh1976 | 
		  
		    
			  
				 Posted: Fri Oct 19, 2007 4:25 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Partisan
 
 Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India 
  | 
		  
		    
			  
				Shouldn't the length of each line help me in distinguishing that?
 
But I think the parser needs to know before hand what kind of data it is handling and doesn't get around to determining an element type from its length. _________________ Shalabh
 
IBM Cert. WMB V6.0
 
IBM Cert. MQ V5.3 App. Prog.
 
IBM Cert. DB2 9 DB Associate | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | shalabh1976 | 
		  
		    
			  
				 Posted: Fri Oct 19, 2007 5:22 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Partisan
 
 Joined: 18 Jul 2002 Posts: 381 Location: Gurgaon, India 
  | 
		  
		    
			  
				I haven't used data patterns in MB before.
 
Is there a tutorial or something available?
 
I need to be able to map the length though as each row can be uniquely identified that way only. _________________ Shalabh
 
IBM Cert. WMB V6.0
 
IBM Cert. MQ V5.3 App. Prog.
 
IBM Cert. DB2 9 DB Associate | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | kimbert | 
		  
		    
			  
				 Posted: Sat Oct 20, 2007 2:54 am    Post subject:  | 
				     | 
			   
			 
		   | 
		
		
		    Jedi Council
 
 Joined: 29 Jul 2003 Posts: 5543 Location: Southampton 
  | 
		  
		    
			  
				
   
	| Quote: | 
   
  
	| the length is the only parameter to distinguish Row 1,2 or 3.  | 
   
 
You can set Data Element Separation to 'Use Data Pattern' and use a data pattern something like '.*(100)\r\n' where the 100 is the length of the line. 
 
This assumes, of course, that each row type has a fixed length.
 
 
By the way - this is very strange message format. Why doesn't the source application identify the lines with a tag? What application is your flow replacing, and how does that application parse these records? | 
			   
			 
		   | 
		
		
		  | Back to top | 
		  
		  	
		   | 
		
		
		    | 
		
		
		  | 
		    
		   |