| View previous topic :: View next topic | 
	
	
		| Author | Message | 
	
		| kumar26fl Beginner
 
 
 Joined: 08 Apr 2010
 Posts: 14
 Topics: 9
 
 
 | 
			
				|  Posted: Thu Dec 09, 2010 4:59 pm    Post subject: Mainframe Dataset  to CSV -  Any program/utility solution? |   |  
				| 
 |  
				| Hello, 
 I use the JCL in this link to save the formatted file to txt file. However, I would like to explore if there is any way that I can create a csv file out of the formatted file. Any solution involving jcl utilities is appreciated. I am trying to avoid cobol or for ex; SAS programming to read each field and add commas .
 
 http://www.mvsforums.com/helpboards/viewtopic.php?t=4670&highlight=comma+delimited+copybook
 
 Appreciate any suggestions or help to create a csv file from a formatted file using copybook
 
 Thanks
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kolusu Site Admin
 
  
 
 Joined: 26 Nov 2002
 Posts: 12394
 Topics: 75
 Location: San Jose
 
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| kumar26fl Beginner
 
 
 Joined: 08 Apr 2010
 Posts: 14
 Topics: 9
 
 
 | 
			
				|  Posted: Thu Dec 09, 2010 9:09 pm    Post subject: |   |  
				| 
 |  
				| Thanks Kolusu for the links, however this is not what I am looking for. I am familiar with these methods. Sorry if I did not make my question clearer in my previous post. 
 What I am looking for is not to code the offsets of the individual fields in the file layout. I am looking for a step that will get the offsets or the field mapping from the copybook layout and add the delimitor after the printed format data value of each field.
 
 I know fileaid has XML output option, but I am not sure if it gives data value for compressed or binary fields with xml tags. Fileaid xml is the closest that I have seen so far, if I have to avoid coding offsets for each field in the layout.
 
 
 Thanks again
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		| papadi Supermod
 
 
 Joined: 20 Oct 2009
 Posts: 594
 Topics: 1
 
 
 | 
			
				|  Posted: Fri Dec 10, 2010 2:37 pm    Post subject: |   |  
				| 
 |  
				| Suggest you reconsider. . . 	  | Quote: |  	  | I am trying to avoid cobol or for ex; SAS programming to read each field and add commas .
 | 
 
 Taking for granted there is some small program that already reads the file using the copybook, it is a simple matter of editing to clone this code into a new program, read the file, reformat the packed-decimal and/or binary fields into something more useful on the target system, STRING the fields and the delimiters into an output area and write the output record.
 
 Once you have the first one, it can be cloned for other files/formats.
 
 If you know how to EDIT code, you can create a new one every few minutes. . .
 
 What several of my clients have done is to write 2 files in the process that creates the file to be reformatted/delimited and save an additional read of the data.
 _________________
 All the best,
 
 di
 |  | 
	
		| Back to top |  | 
	
		|  | 
	
		|  | 
	
		|  |