Discover millions of ebooks, audiobooks, and so much more with a free trial

Only $11.99/month after trial. Cancel anytime.

i5/OS and Microsoft Office Integration Handbook
i5/OS and Microsoft Office Integration Handbook
i5/OS and Microsoft Office Integration Handbook
Ebook518 pages5 hours

i5/OS and Microsoft Office Integration Handbook

Rating: 5 out of 5 stars

5/5

()

Read preview

About this ebook

In this, the third edition of the perennial best-seller, iSeries gurus Chris Peters and Brian Singleton have completely updated this essential resource to reflect all of the latest changes and enhancements of iSeries Access and Express Client and Microsoft Office. Now, you can use iSeries Access or Express Client to combine the presentation capabilities of all versions of Microsoft Office with the database capabilities of the i5/iSeries to provide your company with the best of both worlds. Tasks that used to be almost impossible are now an easy reality...if you know the integration secrets revealed in this book. Discover how to use your iSeries output with PC data-formatting tools, make visually appealing reports using iSeries data, use visual query tools to point and click to create sophisticated information output, analyze and summarize the detailed and often cumbersome iSeries reports, tap into the power of Microsoft's powerful Universal Data Access using ADO.NET, ODBC, and OLE DB, and much more. Singleton and Peters provide you with the essential knowledge you need to use iSeries Access or Express Access as a means to integrate iSeries or AS/400 data with Microsoft Office applications. i5/OS and Microsoft Office Integration Handbook, Third Edition covers installing and configuring iSeries Access or Express Client, using ODBC to seamlessly integrate iSeries with Microsoft Office, and leveraging the iSeries Access data transfer function. The book also explains how to bring data from the iSeries to your PC by using NetServer, TCP/IP's FTP file transfer function, and/or Universal Data Access with OLE DB and ADO.NET. Other chapters of the book explore the multitude of Microsoft Office functions by devoting a specific chapter to each Office application to show you how to use each function with the i5/iSeries. You'll learn how to use Excel, Word, Query, Access, and Outlook to generate spreadsheets, mailing labels, form letters, and envelopes; to produce querie
LanguageEnglish
PublisherMC Press
Release dateMay 1, 2012
ISBN9781583477373
i5/OS and Microsoft Office Integration Handbook
Author

Chris Peters

Chris Peters caught the hockey bug while growing up on Chicago’s South Side and traveling from rink to rink with his dad to watch the Chicago Blackhawks. He played the sport throughout his youth and managed to turn his passion for the game into a career, not as a player, but as a writer. Peters has written for numerous publications and websites and has published three other books on hockey. He currently covers the NHL, NHL Draft, and hockey prospects across the globe for ESPN. Peters resides in North Liberty, Iowa, with his wife and two children.

Read more from Chris Peters

Related to i5/OS and Microsoft Office Integration Handbook

Related ebooks

Computers For You

View More

Related articles

Reviews for i5/OS and Microsoft Office Integration Handbook

Rating: 5 out of 5 stars
5/5

2 ratings2 reviews

What did you think?

Tap to rate

Review must be at least 10 words

  • Rating: 5 out of 5 stars
    5/5
    Liked reading and referencing it. Well explained concepts with examples.
  • Rating: 5 out of 5 stars
    5/5
    very useful techniques explained in straight forward manner. Recommended for anyone having to interface between iseries and windows platforms

Book preview

i5/OS and Microsoft Office Integration Handbook - Chris Peters

TROUBLESHOOTING

INTRODUCTION

Welcome to The i5/OS Microsoft Office Integration Handbook—Third Edition. This book describes some of the techniques you can use to unite applications in the Microsoft Office 2000/2003 product suite with data from your iSeries (i5). If you’ve been around the iSeries world for a while, you’ll recognize that it hasn’t always been easy to retrieve data from the iSeries for use with other systems. PC Support, IBM’s old solution to PC connectivity, was often cumbersome to use and not very flexible. Furthermore, productivity applications, such as word processors and spreadsheets, weren’t designed to offer a great amount of flexibility for interfacing with external data.

Luckily, all of that has changed. IBM’s iSeries Access or Client Access Express for Windows is a very capable tool that provides you with seamless integration between Windows desktops and iSeries information.

Note: Throughout this book, the term iSeries is used exclusively. With a few exceptions, iSeries capabilities extend to V4 versions of the AS/400, as well. Similarly, references to i5/OS will generally include OS/400 machines.

COMBINING CAPABILITIES

Combining the presentation capabilities of Microsoft Office with the database capabilities of the iSeries provides the best of both worlds. For example, using the Microsoft Access report writer, you can create reports that use live iSeries data in a fraction of the time that it would take you to create them on the iSeries. And they look better, to boot.

You’re reading the right book if you’ve ever done any of the following:

Looked at an iSeries’ output and thought to yourself, Gee, I wish I could use my PC data-formatting tools on this iSeries data.

Wondered about an easier way to make nice-looking reports with iSeries data.

Wanted to use visual query tools to create sophisticated information output.

ABOUT THIS BOOK

The first section of this book introduces you to the various methods you can use to retrieve data from the iSeries using IBM’s iSeries Access. Some of these methods are easier or better than others for retrieving data. You can decide which one works best in your situation.

Chapter 1 looks at using iSeries Access to integrate iSeries data with Microsoft Office applications. This chapter provides a brief overview of some of the issues you should be aware of when installing and configuring iSeries Access to retrieve data from your iSeries. You should read this chapter to get an understanding of the methods available to you.

Chapters 2 through 8 describe individual methods used to move data between the iSeries and your PC and Office. While the main focus is on ODBC, which provides the most seamless method of iSeries integration with Office, other methods covered include the data-transfer and network-drive functionality of iSeries Access. The iSeries Access data-transfer function is the component of iSeries Access that allows you to retrieve data from your iSeries and store it in PC files. Also included is information on how TCP/IP’s FTP function can be used to bring data to your PC.

For each of the Office applications that can use iSeries data, a specific chapter shows you how the two can be used together. For example, Microsoft Word can easily be used to create mailing labels, form letters, and envelopes from data on your iSeries. With Microsoft Excel, you can bring data into spreadsheets, perform calculations on the data, and even refresh the data to retrieve updated information with just a mouse click.

Microsoft Query, included with Office, is a helper application that provides sophisticated querying and data-retrieval capabilities. While Query can be used as a stand-alone application, its capabilities really shine when combined with another Office application, such as Word or Excel.

Microsoft Access is a veritable Swiss army knife when it comes to managing data. Its many features include the capability to query iSeries data and to create beautiful, sophisticated reports. Wizards even lead you through the process.

Microsoft Outlook is the email client and personal-information manager included with the Office suite. A very powerful tool, Outlook’s many uses include retrieving email from the iSeries when the iSeries is set up as an email server.

In spite of Microsoft’s best efforts, more than half of the world’s data is stored in non-Microsoft databases provided by companies like Oracle and IBM. Included in non-Microsoft databases is DB2, the iSeries’ native DBMS (database management system).

Chapter 11 provides an overview of Microsoft’s follow-on technology to ODBC: Universal Data Access and ADO.

As you will see, the combination of the iSeries and Office gives you a powerful set of useful tools that can be leveraged in many different ways to make your job of delivering information easier.

FOLLOWING ALONG WITH THE SAMPLE DATA

Many of the samples and exercises throughout this book are performed with sample data. Having a separate library with some sample data that you can play with ensures that you are free to learn and experiment with the Office products and iSeries data without worrying about somehow causing a problem with production data.

Installing the sample data allows you to follow along with the exercises in each chapter. This is the same data that was used to create the examples and screen images for this book. However, if you choose not to install the sample data for some reason, you should still be able to apply the examples to your own data. The sample data is provided for illustration purposes only.

The sample data comes in the form of a database that can be downloaded from Midrange Computing. To find out how to download the data to your PC, point your browser to this Web page:

www.mcpressonline.com

Select Site Help → → MC Product Support → Product Updates. Then, select this book’s title.

Once the data has been copied to your PC, you can upload it to your iSeries and follow along with the exercises.

Without further ado, let’s dive right in!

1

CONNECTIVITY OVERVIEW

Interaction between two computers, like an iSeries system and a PC, requires a coordination of efforts. The two systems, each operating in its own time and for its own purpose, must work together at several levels. When systems like these are to communicate, there will typically be the following:

Some hardware involved, to provide a physical communications link

Software to interact with the specific communications hardware at the lowest level

Basic utilities to allow interaction with data and programs on the systems

At the highest level, application programs to interface with users and create comprehensive computing systems

This book deals with the two highest-level aspects of communication: utilities and application systems. Both of these come into play in developing solutions in a cooperative iSeries and Windows PC environment.

The commercial software packages involved in this book are Microsoft Office and IBM iSeries Access. These are the systems that facilitate the communications and the applications for most iSeries and iSeries business concerns. These packages also furnish the most common benefit.

IBM ISERIES ACCESS AND EXPRESS CLIENT

Before you can access data residing on your iSeries and use it in a PC-based application, you must have a connection between the iSeries and a client PC. Physically, the connection will be some form of TCP/IP networking, like Ethernet, Token Ring, or Point-to-Point Protocol. Once a physical connection has been established, there has to be some communication software that provides data and services over the network. For any application except generic utilities like FTP and Telnet, the communications software developed specifically by IBM for the iSeries will be required.

iSeries Access (also called Express Client or iSeries Access, depending on the version) is an IBM package of communications software written for the iSeries and PCs that provides low-level data exchange and communication services. A variety of communication services come with iSeries Access, like ODBC and ADO. It pays to take some time to get to know your options within iSeries Access, and what you can do to maximize convenience and productivity when exchanging data between Microsoft Office and the iSeries.

ISERIES ACCESS COMPONENTS

iSeries Access is a collection of tools and components that perform different functions to help PCs and the iSeries interact. Several of these components are useful for moving data between an iSeries and a PC. The following list ranks some of the more prominent iSeries Access components in what we think is their importance in connecting to Office applications:

ODBC. ODBC is part of the iSeries Access’s base support, and it is one of the primary methods used by Office applications to retrieve data from external data sources such as the iSeries. Figure 1.1 shows the ODBC Configuration Program. (Chapter 2 provides detailed information on ODBC.)

Figure 1.1: ODBC is part of the iSeries Access base support.

OLE DB/ADO. As Microsoft’s follow-on technology to ODBC, OLE DB/ADO (ActiveX Data Object) provides a contemporary ActiveX interface to data and processing. It also improves performance in certain applications on a variety of platforms, including the iSeries.

Data-Transfer Function. The data-transfer function shown in Figure 1.2 (formerly known as the file-transfer function) is another useful method for retrieving data from the iSeries for Office applications. While not quite as flexible as ODBC or OLE DB/ADO, it is a solution that stands by itself; no additional programs are required to use it for bringing iSeries data to your PC. It can also be easily automated, and it has a specific function for bringing data into Microsoft Excel. (Chapter 9 provides more information on the data-transfer function.)

Figure 1.2: The Data-Transfer Function screen lets you define the origin and target of the data to be transferred.

NetServer. The iSeries can participate in a Windows network at a peer level using an i5/OS technology called NetServer. NetServer lets you access your iSeries system as if it were just another Windows server on your network. While this might not be the speediest solution, it has a lot to offer in terms of convenience. (Chapter 8 provides more information on NetServer and the network-drive function.)

File Transfer Protocol. If your PCs are connected to the iSeries over a TCP/IP communications link (such as Ethernet, Token-Ring, or PPP), you may use the iSeries native support for standard FTP. Similar to the iSeries Access data-transfer function, FTP is a standard service available within iSeries TCP/IP utilities for transferring data or program objects and executing iSeries-side commands. (Common utilities like FTP and Telnet are part of base TCP/IP support, not part of iSeries Access or Express Client.)

NetServer, the data-transfer function, FTP, ODBC, and OLE DB/ADO are the main iSeries Access components for actually transferring data between the iSeries and a PC. The following additional components are useful in other circumstances, such as performing configuration operations:

PC5250. The terminal emulator included with iSeries Access is called PC5250. As shown in Figure 1.3, it is the portal to the familiar iSeries green screen. As such, it is probably the most frequently used component of iSeries Access.

The iSeries Navigator. The iSeries Navigator, shown in Figure 1.4, is an excellent tool for managing many different aspects of your iSeries. It gives the iSeries a PC-based graphical user interface and can greatly ease such common tasks as managing users, setting system and resource security, and configuring system options. (Several components within iSeries Access can be configured from the iSeries Navigator only; they have no 5250 command-line equivalents.)

Figure 1.3: This familiar terminal emulator is included with iSeries Access.

Figure 1.4: You can manage many functions of your iSeries with the iSeries Navigator.

ISERIES ACCESS LICENSES

IBM provides some iSeries Access functionality as part of the base i5/OS operating system, without requiring the purchase of an iSeries Access license. This can have a great effect on the tools you use to retrieve data from Office applications. Figure 1.5 shows a dialog box displayed during the installation of iSeries Access or Express Client. It details which components require a license and which don’t, within a particular release of iSeries Access or Express Client.

The main iSeries Access components used for iSeries and Office data integration are OLE DB/ADO and ODBC. Fortunately, both of these are no-charge options. Unless IBM’s license agreements have changed since this book was published, you should be able to install and use the iSeries Access ODBC driver and OLE DB/ADO support without worrying that you are in violation of a license agreement.

Another tool that falls into the no-license category is iSeries Navigator. As mentioned previously, this tool is useful for interacting with the iSeries using a GUI interface.

Figure 1.5: This Express Client dialog box details license requirements.

INSTALLING MICROSOFT OFFICE INTEGRATION

Installing iSeries Access is much like installing any other Windows application. The setup program leads you through several screens to determine which aspects of iSeries Access you want to install, as shown in Figure 1.6.

Figure 1.6: Choose the options to install with iSeries Access or Express Client.

Your configuration of iSeries Access will depend on your particular version, but at a minimum you should locate and install the following:

iSeries Navigator

ODBC

OLE DB/ADO provider support

The iSeries Access Toolkit

CONFIGURING A CONNECTION

Configuring a connection from a PC to an iSeries is easy. Assuming the physical connection between your PC and the iSeries is in place, you only have to know the IP address or host name of your iSeries.

Note: If you don’t know your iSeries’ IP address, go to a green-screen command line, type CFGTCP, and press Enter. A menu will be displayed. Select option 1, Work with Interfaces, to display a screen like that shown in Figure 1.7. On this screen, look for the line that connects your iSeries to your PC. In the example shown, this will be the line with a type of ELAN (Ethernet LAN). (Note that the *LOOPBACK line is used for internal testing only.) Next, find the IP address that the iSeries has associated with the line (68.75.95.97, in Figure 1.7). This IP address is essentially the name of the iSeries that you’ll use in your iSeries Access configurations.

Figure 1.7: This is the iSeries’ Work with TCP/IP Interfaces display.

Many iSeries networks are configured to use a regular text name like S101901R to identify their iSeries, instead of an IP address. This method generally works well and has some advantages over using the straight IP address, but there is also a downside. Ultimately, all TCP/IP communication is done by IP address, not by host name. Therefore, any text host name must first be cross-referenced to an actual IP address by one method or another, which can sometimes be a source of problems.

Once you have a valid IP address or host name for your iSeries, the usual next step is to configure a PC5250 session on your PC. This is an easy process and will also serve to confirm your physical connection and IP address. Click the Windows Start button, and locate Start or Configure Session, depending on your version of iSeries Access, under Emulator (or the equivalent). Select the option and follow the on-screen instructions. You’ll be asked to specify the IP address or host name of your iSeries, which you acquired earlier. You might also be asked to supply the name of the workstation that the iSeries will use to identify your PC. If so, you’ll have to find an unused name, or ask your iSeries network administrator for one. In most installations, the iSeries will automatically configure the iSeries line and device descriptions required to form a green-screen connection, and you’ll be greeted with a sign-on display.

Creating a connection from your PC to the iSeries in this manner will dynamically update iSeries Access on your PC with the iSeries connection information. This information will be used by other iSeries Access tools (iSeries Navigator, for example).

In the course of getting your PC set up for iSeries Access, you may specify that a default user ID and password be used when starting communications services. You might want to give this some thought. If you do not specify a default user ID and password, certain automated solutions might pause in midstream and ask the user to manually key the information. On the other hand, storing a user ID and password to be automatically used might violate your security policy, or restrict access to unauthorized objects in the iSeries.

More information regarding setting up iSeries Access can be found at IBM’s Information Center, http://publib.boulder.ibm.com/pubs/html/as400/infocenter.htm, or at the iSeries Access Family Library, http://www-1.ibm.com/servers/eserver/iseries/access/calib.htm.

2

ODBC

ODBC (Open Database Connectivity) is a specification, or agreement, about how data that resides in a given database is made universally accessible to applications. Most ODBC arrangements involve several participants, including an ODBC server program running on the host, an ODBC user program running on a client, and an ODBC driver that provides the details about how to get to a specific database. A number of ODBC drivers are available for the iSeries; here, we will use the ODBC driver that comes with iSeries Access for Windows.

Microsoft Office makes extensive use of ODBC to connect to the iSeries and retrieve data. This chapter shows you how to configure the iSeries Access ODBC driver for use with Office. It also covers the security issues involved with client/server technologies like ODBC, and provides some iSeries-specific ODBC tips.

WHAT IS ODBC?

ODBC is a data-access standard created by Microsoft and other vendors to allow application programs to access data from any type of database that supports the standard. It’s also one of IBM’s preferred means of client/server connectivity for the iSeries. Combined support from industry giants such as IBM and Microsoft ensures that ODBC will be a perennial standard for database access, so it is worth your while to learn how it works.

With step-by-step instructions, this chapter explains how to configure IBM’s iSeries Access for Windows ODBC driver. Before you begin, however, you need some background information on ODBC.

WHY USE ODBC?

Since IBM already has a function for transferring data to clients, why include ODBC? ODBC by itself does not transfer data to clients. It is merely a tool to enable the transfer of that data. Client programs are required to take the data from the iSeries and put it into a format useful for the PC. In contrast, the data-transfer function will, by itself, transfer data from the iSeries to your PC’s hard drive. Both methods are useful in different circumstances. Use the data transfer function in the following cases:

Offline data access is required or desired.

No ODBC client utilities are available to perform the transfer.

ODBC security is a concern.

Use ODBC in these cases:

Up-to-date information is required.

The data is too big to exist on the PC.

The data-transfer program does not provide the necessary functionality.

In addition, if you are doing application development, ODBC is better than the file-transfer function. While the file-transfer function performs static file transfers, ODBC can dynamically update records on the iSeries in real time.

As explained in later chapters of this book, many client applications work directly with ODBC databases. This seamlessly enables you to take advantage of the functionality of those applications, without having to go to an external program to retrieve the data. This can be a real time-saver, improving ease of use and providing the capability to take advantage of the client functionality. For example, a large number of third-party tools are ODBC-enabled, allowing them to work directly with iSeries data in ways that you might not have imagined.

ARCHITECTURE

ODBC consists of three layers:

Driver manager

ODBC driver

Data sources

These layers function together as shown in Figure 2.1 to bring the data to your application.

Figure 2.1: The ODBC architecture isolates the application from the database.

The driver manager is a Microsoft utility that manages the individual ODBC drivers installed on your system. It provides the interface between the applications and the drivers, allows for the management of data sources, and handles some of the application programming functionality.

ODBC drivers are the programs that translate between the external data source and the ODBC programming interface. There are specific drivers for many different data sources, including local PC database

Enjoying the preview?
Page 1 of 1