(IBM i fans only) Extracting Data from DB2 to Excel with ODBC
Configuring ODBC is the first crucial step to enable data transmission between your PC and the IBMi server (AS400).
In my example, I am using the Windows 10 operating system and want to extract data from the public IBMi server PUB400.COM. However, make sure to configure ODBC to point to your specific IBMi environment.
1. Open "ODBC Data Sources" in either 32-bit or 64-bit (in my case, 64-bit).
2. Select "iSeries Access ODBC Driver" and click "Add".
3. Fill in the nine configuration tabs:
In my example, I am using the Windows 10 operating system and want to extract data from the public IBMi server PUB400.COM. However, make sure to configure ODBC to point to your specific IBMi environment.
ODBC Configuration on Windows:
1. Open "ODBC Data Sources" in either 32-bit or 64-bit (in my case, 64-bit).
2. Select "iSeries Access ODBC Driver" and click "Add".
3. Fill in the nine configuration tabs:
4. Once the tabs are filled, click "Apply" and "OK".
Extracting Data to Excel:
1. Open Excel.2. Go to "Data" and then "Get Data".
3. Select "From Other Sources" and choose "From Microsoft Query".
4. Select the ODBC data source and click "OK".
7. Click "Finish" and then "OK".
The C00X00F file is now imported into Excel.
C00X00F Record Layout:
Here is the structure of the C00X00F record:C00X00F Record Format (Phisical File Description):
Content of C00X00F on IBMi:
You can view the content of C00X00F using "Display Physical File Member" on IBMi.Let me know if you encountered any difficulties while implementing ODBC and reading files from DB2.
Every feedback is highly appreciated!
Thank you Aldo for this "treasure"!
ReplyDeleteBut to thanks Holger Scherer is better to say is his "baby" more than public server, don't you think? 😉
You're absolutely right! PUB400 is more like Holger Scherer's 'brainchild' than just a public server. Let’s say it’s a public service with a personal touch! 😉 Big thanks to Holger for keeping it running for all of us!
DeleteThank you for this very useful information!
ReplyDeleteBut don't you think that is better to say the server is from Holger Scherer more than public? 😉
I wonder if is possible to adapt to an IBM Z DB2?
Good question! While IBM i and IBM Z are like distant cousins in the IBM family, both speaking DB2, aren't they?
Delete