|  | 
 
  
    | RSS Feed - WebSphere MQ Support | RSS Feed - Message Broker Support |  
 
  
	|    |  |  
  
	| Message set for Cobol Copy book | « View previous topic :: View next topic » |  
  	| 
		
		
		  | Author | Message |  
		  | kash3338 | 
			  
				|  Posted: Mon Oct 03, 2011 8:25 pm    Post subject: Message set for Cobol Copy book |   |  |  
		  | Shaman
 
 
 Joined: 08 Feb 2009Posts: 709
 Location: Chennai, India
 
 | 
			  
				| Hi, 
 I have a COBOL Copy book file through which I have generated a CWF message set. Sample copy book message,
 
 01POLOGNE   410INVOIC-MI0222032
 10INV163689      08257011
 15INV163689      OLSMICHELIN OL
 16INV163689
 17INV163689      E001ATTENTION
 20INV163689      SF00100ML24589
 25INV163689      001          0
 40INV163689      0201FRAIS DE F
 40INV163689      0202FRAIS D'AP
 40INV163689      0400FRAIS D'AS
 60INV163689      00000000018950
 990000010
 
 All lines are fixed length of 500.
 There will be so many records starting from 01,05,10,15,16,17,20,25,30,40,60,70,80,90 and 99. But many are optional in this (05,30,70,80,90).
 
 But when I try to parse my message, it always tries to parse even the 05 (which is optional) even after setting the min occurs to 0. Also, is there a way i can specify a Tag for each complex type like in TDS?
 |  |  
		  | Back to top |  |  
		  |  |  
		  | kimbert | 
			  
				|  Posted: Tue Oct 04, 2011 12:44 am    Post subject: |   |  |  
		  |  Jedi Council
 
 
 Joined: 29 Jul 2003Posts: 5543
 Location: Southampton
 
 | 
			  
				| If your data is tagged then you must use TDS. You can use the logical structure created by the COBOL importer - just delete the CWF physical format and add a TDS physical format. Remember to
 - set Data Element Separation to 'Tagged Fixed Length' on the complex type which contains the records.
 - set a tag on the elements that represent each type of record.
 |  |  
		  | Back to top |  |  
		  |  |  
		  | fjb_saper | 
			  
				|  Posted: Tue Oct 04, 2011 5:05 am    Post subject: |   |  |  
		  |  Grand High Poobah
 
 
 Joined: 18 Nov 2003Posts: 20767
 Location: LI,NY
 
 | 
			  
				| From your example it looks like the 01 and 99 identify a special type of line. (header/footer)?
 INV identifies the type of document (Invoice ?)
 163689 is either an account or a cost account ref (capital expense?)
 variable length field depending on first 2 digits in line
 Line item description
 .....
 debit / credit indicator
 amount...
 _________________
 MQ & Broker admin
 |  |  
		  | 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
 
 |  |  |  |