Search code examples
excelmainframezos

How to extract (import) data from a mainframe dataset to excel table


I want to build a little application that calculates the critical batch of a batch flow. As input I need to use a Mainframe dataset. If possible, being dynamic, that is, I can choose the fields that apply at the time.

I've searched the internet about that but found nothing that suited what I wanted to do. Is there a way to do that?


Solution

  • You've got some good information in the comments, consensus appears to be conversion to CSV (or TSV to avoid commas embedded in your data) is the easiest route. Here is a bit more information, copied from another answer...

    I would strongly suggest you get the files into a text format before transferring them to another box with a different code page. Trying to deal with mixed text (which must have its code page translated) and binary (which must not have its code page translated but which likely must be converted from big endian to little endian) is harder than doing the conversion up front.

    The conversion can likely be done via the SORT utility on the mainframe. Mainframe SORT utilities tend to have extensive data manipulation functions. There are other mechanisms you could use (other utilities, custom code written in the language of your choice, purchased packages) but this is what we tend to do in these circumstances.

    Once you have your flat files converted such that all data is text, you can transfer them via FTP or SFTP or FTPS.

    ...and thanks for coming back and adding more information. Hopefully the people here have provided enough information to help you solve your problem.