TechTip: Download Physical Files Using Microsoft Excel
Written by Paul Weyer
Thursday, 02 September 2004
Use iSeries Access for Windows to transfer iSeries physical file data into an Excel spreadsheet.
Many end
users of iSeries applications need specific data to analyze their business, and
they require different views of this data. The development staff often provides
these views in the form of reports either by creating a high-level language
program (RPG or COBOL) or by writing a query.
iSeries shops have given
end users the ability to write their own queries via either the standard OS/400
commands or third-party software products. However, some of the sequences that
the users choose can have a detrimental effect on system
performance.
Furthermore, one limitation of both the application programs
and the query options is that a new program or query must be written for every
different view of the data. Wouldn't it be nice if there were a tool that would
allow the end user to sequence and group the data without having to write and
run individual programs and/or queries? Well, there is! That tool is Microsoft
Excel. Once data is transferred into an Excel spreadsheet, sort and hide
functions can manipulate that data. Also, transferring the data to a PC
eliminates the potential for performance degradation on the
iSeries.
Here's how to use the iSeries data transfer function:
Open
Microsoft Excel.
Click on the Data option in the toolbar.
Click on the double arrow to expand the option list.
Look for Transfer Data from iSeries.
If you see the Transfer
Data from iSeries option, the capability to perform data transfer is available.
If you don't see the option, confirm that IBM iSeries Access for Windows (V5R1
and later) or Client Access (prior to V5R1) is installed. If it is not
installed, install it.
Now, enable the add-in:
Click on the Add-Ins option.
Scan the Add-Ins list for the iSeries Access Data Transfer option.
Click on the box to enable it.
If you don't see the iSeries
Access Data Transfer option, click the Browse button. Using the Look in box,
navigate to c:/program files/ibm/client access/shared/ and select file
cwbtfxla.xll.
Now, it's time to perform the data transfer:
Open
Microsoft Excel.
Click on the Tools option in the toolbar.
Click on the iSeries Access Data Transfer option. If the iSeries Access Data
Transfer option is not displayed, click on the double arrow.
A Transfer Data window will open.
Select Create New and choose whether to include column headings.
Click the OK button.
Select the iSeries server the data is to be downloaded from and click the
Next button.
If you know the library/file (member), type it in and click the Next button;
otherwise, click the Browse button. If you click the Browse button, a new window
to connect to the iSeries may be displayed. If so, type in the user ID and
password. A list of libraries in the library list is displayed. Click on the
plus sign (+) next to the library where the file exists. The list expands to
show all the files in that library. If the file contains members, the list
expands to display the list of members. Double-click on the member that is to
have the data transferred to the Excel spreadsheet, and click on the OK button.
Click the Next button.
On the next screen, click the Next button.
If this transfer request will be used again, type in a file name and
location to where it is to be saved; otherwise, leave the File name box
empty.
Click the Finish button.
The data transfer function has now
populated the Excel spreadsheet with the file records.
There is a
limitation of a maximum of 65,535 records that can be transferred from an
iSeries physical file to an Excel spreadsheet.
Stay tuned! Future tips
will discuss..
Other file transfer destinations, such as Microsoft Access
databases
Other file types to be transferred, such as message
files
Paul Weyer is a consultant with
New Resources Consulting. He has worked on the iSeries (AS/400) since 1987. His
background includes both hardware configuration/installation and software
development. Paul is a subject matter expert (SME) with COMMON in the areas of
LPAR, IT Optimization, Performance, Availability/Business Continuity, iSeries
Operations, and Managing Beyond Your Server. His language background includes
both COBOL and RPG, and he has been using SQL since 1987. Email Paul at
This e-mail address is being protected from spam bots, you need JavaScript enabled to view it
.
TechTip: Download Physical Files Using Microsoft Excel Oct 08 2004 13:55:00
I have a VB program that opens an Excel workbook and then refresh the data. It works if I run the VB program, but when I create an .exe file and run it from the AS400 using STRPCCMMD, the refresh doesn't work. What can I do to make sure the refresh data is done before it executes the next line of code? <p>Winnie
TechTip: Download Physical Files Using Microsoft Excel Sep 16 2004 07:01:00
While in Excel, open TOOLS, ADD-Ins. <p>When the list of Add-ins appears there should be an option to "Add" an Add-in, select that, and a file-open box should appear. <p>Select the cwbrfxla file, and then the add-in should appear within Excel. <p>Dave
TechTip: Download Physical Files Using Microsoft Excel Sep 15 2004 22:48:00
I'm using Excel 2002 and there is no option for data transfer from the iSeries. I can find the file cwbtfxla. But nothing happens when I open it. Unfer the "Data" menu option in Excel there is an "Import External Data" option but nothing in there indicates an option to x-fer from iSeries. Where am I going wrong ?
TechTip: Download Physical Files Using Microsoft Excel Sep 05 2004 17:16:00
Chuck Ackerman wrote:<BR>
> Correct me if I'm wrong, but isn't Excel similar to Access in that<BR>
> the query will ALWAYS be performed on the client machine? If so,<BR>
> that means all of the data will be retrieved but only the selected<BR>
> data will be presented.<BR>
<P>
Nope, the data selection is done on the 400. You can even prove this to<BR>
yourself by running a query and looking at the open files for that session.<BR>
<P>
Bill<BR>
<P>
<P>
TechTip: Download Physical Files Using Microsoft Excel Sep 03 2004 15:59:00
David,<BR>
<P>
It's still the limit in Office 2003.<BR>
<P>
chuck<BR>
Opinions expressed are not necessarily those of my employer.<BR>
<P>
"David Abramowitz" <David_Abramowitz@mcpressonline.com> wrote in message<BR>
news:6b16f7c6.7@WebX.WawyahGHajS...<BR>
> AFAIK, the 65535 limitation is an Excel limitation in many versions, not<BR>
an iseries limitation.<BR>
><BR>
> To get around it, download to a CSV, and then bring the data into MS<BR>
Access.<BR>
><BR>
> Dave<BR>
<P>
<P>
TechTip: Download Physical Files Using Microsoft Excel Sep 03 2004 14:14:00
AFAIK, the 65535 limitation is an Excel limitation in many versions, not an iseries limitation. <p>To get around it, download to a CSV, and then bring the data into MS Access. <p>Dave
TechTip: Download Physical Files Using Microsoft Excel Sep 03 2004 14:07:00
Actually, it turns out that if you specify a data transfer from within Excel, you cannot create a library list prior to browsing. You can however type in a library name eg MYLIB and then click to browse, which will reflect the library you just entered. Furthermore, it doesn't appear to accept comma delimeted lists of Libraries unless you fully qualify LIB/FILE. An alternative would be to create the transfer request definition via Client Access Transfer-->Receive File From Host. This not only allows you to define a transfer request which can be used with Exel, but also allows defining of a true query.
TechTip: Download Physical Files Using Microsoft Excel Sep 03 2004 13:53:00
The article says, "There is a limitation of a maximum of 65,535 records that can be transferred from an iSeries physical file to an Excel spreadsheet". <p>I'm not sure what release it started in, but i think that at least as of V4R5, when there is more than 65,535 records returned, additional worksheets will be added to accomodate the overflow.
TechTip: Download Physical Files Using Microsoft Excel Sep 03 2004 12:14:00
When using the Browse button, how is the library list determined? All we see currently is QGPL. Do we need to change something in iSeries Navigator or somewhere else?
TechTip: Download Physical Files Using Microsoft Excel Sep 03 2004 11:50:00
Yes you can use Excel Query. It is a very powerful tool. However, it can also create a lot of overhead on the iSeries if the query needs to build an access path. The intent of the article is to provide the basics of downloading data via Excel.
TechTip: Download Physical Files Using Microsoft Excel Sep 03 2004 11:25:00
Correct me if I'm wrong, but isn't Excel similar to Access in that the query<BR>
will ALWAYS be performed on the client machine? If so, that means all of<BR>
the data will be retrieved but only the selected data will be presented.<BR>
<P>
chuck<BR>
Opinions expressed are not necessarily those of my employer.<BR>
<P>
"finncoiv" <finncoiv@mcpressonline.com> wrote in message<BR>
news:6b16f7c6.0@WebX.WawyahGHajS...<BR>
> Why not use EXCEL query vs. transfering a whole physical file?<BR>
> Joins and data selections make the process very easy<BR>
<P>
<P>
TechTip: Download Physical Files Using Microsoft Excel Oct 08 2004 13:55:00
This is a discussion about <B>TechTip: Download Physical Files Using Microsoft Excel</b>.<p align='center'><a href=http://www.mcpressonline.com/mc?1@232.1KNKfHX1eQT.17@.6b16d2c2>Click here for the article</a>.</p>