How to download DB2 table data into a file or excel sheet?

This is a Mainframe COBOL forum - you can post your queries on Mainframe COBOL, VS COBOL II, COBOL/370 , Enterprise COBOL

Moderators: dbzTHEdinosauer, Moderator Group

Post Reply
Posts: 1
Joined: Tue Feb 25, 2014 1:17 pm

How to download DB2 table data into a file or excel sheet?

Post by toravi.etl » Tue Feb 25, 2014 1:22 pm


Any one can please help me How to download DB2 table data into a file or excel sheet into my machine.Im new to mainframes.Please explain step by step any one.


Active Member
Posts: 650
Joined: Sun Jul 24, 2011 5:27 pm
Location: Down on the pig farm

Post by NicC » Tue Feb 25, 2014 7:00 pm

Are you unloading the entire table or selected data? Are you using a bespoke program to get this data or a utility. If a bespoke program then you can write it to produce its output as a CSV which can then be FTP'd to you desktop. Ensure that the unloaded data is eye-readeble (without packed decimal fields).

Your best bet as to how to do it is to consult with the person who gave you the task and your co-workers.

Posts: 1001
Joined: Fri Jul 22, 2011 8:39 am
Location: usa

Post by DikDude » Tue Feb 25, 2014 11:01 pm

Work with somone who knows db2 on the mainframe to select the data you want to load kinto the spreadsheet(s).
Create a data-delimited file on the mainframe (i prefer the tab character - x'05').
When downloaded to the pc, it will import directly into Excel.
Have a good one

Posts: 12
Joined: Tue Jan 14, 2014 1:20 pm

Post by payilagamch » Wed Feb 26, 2014 3:02 pm

You can use BMC ADUUMAIN utility to unload the table into a dataset in CSV format. Then you can FTP the dataset to Excel sheet and delimit the comuns in the excel sheets by going to DATA --> Text to columns in Excel
Payilagam Chennai

Post Reply


Free tutorials from mainframegurukul
  • JCL Tutorial
    Covers all important JCL concepts.
  • Cobol Tutorial
    This tutorials covers all Cobol Topics from STRING to COMP-3.
  • DB2 Tutorial
    DB2 Tutorial focuses on DB2 COBOL Programming.
  • SORT Tutorial
    This Tutorial covers all important aspects of DFSORT with examples
  • CICS Tutorial
    This CICS tutorial covers CICS concepts and CICS Basics, CICS COBOL Programming.
Mainframe Interview questions

Other References
Mainframe Tools and others