Stuff
OS/400 Edition
Volume 1, Number 18 -- October 10, 2002

The Client Access Express Toolkit


by Shannon O'Donnell

Have you ever needed to write applications for a PC so that it could communicate with your AS/400? Perhaps you needed to query an AS/400 database and display it in a PC-based application. Or maybe you needed to send and receive data from the AS/400 to the PC via automated FTP. Whatever you need to do, chances are good that IBM has anticipated your needs and created tools to help you solve such problems. Check out the Client Access Express Toolkit!

display

The Toolkit

The Express Toolkit is a free component of Client Access Express. You can install it by using the Selective Installation program that comes with Client Access Express. Once the Toolkit has been installed, you can navigate to it by clicking the Windows Start button, the IBM AS/400 Client Access Express menu item, and then the Express Toolkit menu item. You'll be presented with a screen displaying a tree list of Client Access Express Toolkit topics.

Clicking any of the tree items will display sub-items for the selected category. Clicking the sub-items will display semi-detailed help for each item. Each topic is then broken down into the various programming tools and languages that the topic applies to.

Clicking the Database tree item, for example, uncovers entries for ActiveX, ADO/OLE DB, C/C++ APIs, Java, JDBC, and ODBC. Clicking the ActiveX sub-item will display a short help screen that tells you a little bit about the Database ActiveX objects available to you with Client Access Express. The information displayed in the help panel isn't terribly useful, but most help panels also contain a link back to IBM's Web site, where you can find dozens of code examples that show how to use the given object.

In fact, you can save yourself some time by going directly to IBM's Client Access Express Toolkit Web site. From there, you can navigate through the various topics and code samples.

A ToolKit Example

So what can you do with the information you find on the Web site or in the Toolkit documentation? Plenty! You can find code samples for making Visual Basic, C++, Java, Microsoft Access, and other applications communicate seamlessly with the AS/400. And that's pretty cool! Any programmer who has ever tried to communicate with some of the proprietary AS/400 objects, such as data queues and libraries, using standard Java or Windows APIs will really appreciate having a lot of the complexity wrapped up in easy-to-use controls and APIs.

Let's take a look at an example of something you might use the Toolkit for. The following example, named UNWEBAPP.htm, was taken directly from the IBM Web site, under the Visual Basic Script section. This example demonstrates how to use the Client Access Express "List" and "Tree" ActiveX objects to display the Client Access Express Operations Navigator tree in a Web browser.

Take a look at the HTML source for this sample. Surprisingly, it's very simple to understand. In fact, the only complex part of the code is inserting the ActiveX objects for the List and Tree controls into your HTML code. The nice thing about it, though, is that the most often needed properties for these ActiveX objects have been filled in for you in the sample, so if you want to use this code in your own HTML applications, simply copy and paste!

Let's take a quick peek at the relevant portion of the HTML code that instantiates the Client Access Express Tree and List ActiveX controls:

<OBJECT ID="Tree1" WIDTH=300 HEIGHT=500 align= hspace=60
vspace=20
 CLASSID="CLSID:D5BD7E23-00C4-11D0-B326-0004AC76C946"
 CODEBASE="UNOCXTL.OCX">
    <PARAM NAME="_Version" VALUE="65536">
    <PARAM NAME="_ExtentX" VALUE="7408">
    <PARAM NAME="_ExtentY" VALUE="10583">
    <PARAM NAME="_StockProps" VALUE="0">
</OBJECT>


<OBJECT ID="List1" WIDTH=500 HEIGHT=500 hspace=60
vspace=20
 CLASSID="CLSID:D5BD7E27-00C4-11D0-B326-0004AC76C946">
    <PARAM NAME="_Version" VALUE="65536">
    <PARAM NAME="_ExtentX" VALUE="7408">
    <PARAM NAME="_ExtentY" VALUE="10583">
    <PARAM NAME="_StockProps" VALUE="0">
</OBJECT>

In the above code, the first grouping specifies that the Operations Navigator Tree control will be used, and a few of the most common properties are set, including the CCSID and the initial size of the tree that will be displayed. In the second code grouping, the Client Access List control is instantiated and, again, a few of the most common property values are set. Note that the Tree and List controls are automatically installed on your PC when you install Client Access Express.

Although this is not an article on VBScript or using ActiveX objects in HTML, you can quickly see how useful the code sample shown here might be in your own applications.

Go Exploring

Take a look at the Client Access Express Toolkit or the IBM Web site. Explore. See what's available to you. There's a surprising amount of code out there that can be used in everything from simple HTML to very complex and robust Java and Visual Basic applications. If you are an AS/400 programmer who has been tasked with making your PC applications talk to your AS/400 host, you owe it to yourself to check out the Toolkit. Take it from someone who has wasted hours figuring out the hard way how to do something. Checking the Toolkit first can save you days of programming!


Sponsored By
WORKSRIGHT SOFTWARE

CASS Certification
What is it? Why do you need it?

CASS stands for "Coding Accuracy Support System." This is a test developed by the U.S. Postal Service to determine whether ZIP Code software can accurately assign ZIP Codes to mailing addresses. CASS-certified software is intended to improve the accuracy of carrier route, 5-digit ZIP, ZIP+4, and delivery point codes.

CASS certified means the software has passed the test. When you use CASS software to update and maintain your mailing file, then your mailing file becomes CASS certified. What does this mean to you?

CASS certification is the first step in qualifying for postage discounts. Look at the mail you receive at home and at work; you will see that a lot of it was mailed for less than the regular 37 cent rate.

Despite all the glitz and glamour of the Internet, email, and such, the wheels of America's economy are lubricated by the ordinary envelope and the U.S. Postal Service.

If your company sends out a lot of mail, there is a good chance CASS certification can cut your postage expense. There are other steps you must perform to get these discounts, but CASS is the first step.

Your mail must be printed, sorted, and then packaged according to postal regulations. It takes some effort, but the potential savings make it worthwhile.

Exactly what happens when you process your mailing files with CASS software? The software breaks the address down into its individual elements: state, city, street name, and so forth. Then the information is compared to the national ZIP+4 database. If a match is found, the ZIP Code, ZIP+4, delivery point, and carrier route are assigned. Also the delivery line is standardized to comply with Postal Service preferences.

If an address can't be matched, no action is taken. This has the positive effect of allowing you to identify addresses in your mailing files which possibly can't be delivered, will be delayed in delivery, or at the very minimum need some minor correction to one of the address elements.

Using CASS certified software has many side benefits. You will be able to identify addresses that are potentially undeliverable. It has been estimated that as much as 30% of all advertising mail is never delivered.

That means the costs of postage, printing, paper, and overhead for undelivered mail are wasted. That means if you spend $100,000 on a direct mail campaign, as much as $30,000 could be completely wasted.

CASS software provides a number of intangible benefits. With CASS certification and bar coding there is a good likelihood that that your mail will be delivered sooner. If your invoices are delivered one day sooner, you may receive payment one day sooner.

If you CASS certify your mailing file, you can move on to the next step which is postal automation. This means applying a POSTNET bar code.

POSTNET is that little row of tall and short bars you see on your mail. POSTNET is a special bar code used by the Postal Service to allow automatic sorting machines to work.

It has been reported that bar code standard class (the old third class) mail gets delivered about as soon as first class, instead of the usual 2 or 3 weeks.

The bottom line is that using CASS software will help you keep your customers' address information in much better shape than they would be otherwise. Your mail may be delivered sooner at less cost and that means more bottom-line dollars for your company.

If you would like more information about CASS and CASS software,
contact your local post office or
call WorksRight Software, Inc. at 601-856-8337.

Are FedEx, United Parcel, and Airborne charges
for incorrect addresses eating into your budget?

Every bad address can result in a $5 to $10 charge. Even seemingly small addressing errors such as misspelled street names, or missing suite numbers can result in the same penalty as if the address were totally wrong.

Our PER/ZIP4 addressing matching software will match your addresses to the national ZIP+4 postal database. Based on the match PER/ZIP4, will update your addresses to postal standards. Our sophisticated address logic can add missing directionals, correct minor misspellings, and standardize the address format. If PER/ZIP4 can't match the address, then you know that there is likely a serious error in the address that needs to be corrected.

PER/ZIP4 can be used in a batch mode to update an entire file or interactively to update individual address one at a time. We provide a search function so that you can search the national ZIP+4 database to verify a specific address.

Visit our Web site www.worksright.com for more information and to order a free, no-hassle, 30-day trial. Or call WorksRight Software, Inc. at 601-856-8337.


THIS ISSUE
SPONSORED BY:

T.L. Ashford
Magic Software
LANSA
ASNA
Profound Logic Software
WorksRight Software


BACK ISSUES

TABLE OF CONTENTS
Performing Surgery on the Windows Registry

Back to Basics: Side-by-Side Subfiles

Referential Integrity: Ensuring Your Database Contains Only Valid Data

Qshell String Manipulation

Exploring Data-Type Acronyms

The Client Access Express Toolkit


Editors
Shannon O'Donnell
Kevin Vandever

Managing Editor
Shannon Pastore

Contributing Editors:
Howard Arner
Joe Hertvik
Ted Holt
David Morris
Richard Shaler

Publisher and
Advertising Director:

Jenny Thomas

Contact the Editors
Do you have a gripe, inside dope or an opinion?
Email the editors:
editors@itjungle.com



Last Updated: 10/10/02
Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.