• Post Reply Bookmark Topic Watch Topic
  • New Topic

importing data from a VSAM file  RSS feed

 
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So we have some Data in a Mainframe, that is in VSAM files. And we need to be able to import the data into a DB2 Database using Java. Any ideas ?

One that I was thinking about was converting the VSAM data to a flat file CSV and then going from there. Anyone know how to convert VSAM files to CSV ? Any other approaches?
 
(instanceof Sidekick)
Ranch Hand
Posts: 8791
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use a COBOL program or file utility (maybe FileAide?) to export from VSAM to fixed length fields in flat text, and then read that in Java. Substring out the fields using from and length information.

CSV is a bit trickier write and read because you have to escape commas and quotes and such.

Do fixed-length records sound like something you could try?
 
For my next feat, I will require a volunteer from the audience! Perhaps this tiny ad?
ScroogeXHTML 7.1 - RTF to HTML5 / XHTML converter
https://coderanch.com/t/690611/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!