At a glance…

Customer profile:

Customers across the nation purchase MWI veterinary products over the Internet. An early adopter of technology, MWI has always sought to find ways to meet their business tenet “do whatever it takes to respond to the customer.”

Situation:

MWI upgraded their IBM i sales software which enabled them to maintain customer- specific pricing. Sluggish and difficult to manage connection with ODBC and JDBC, dictated that new approaches had to be sought to highlight this benefit to customers.

Solution:

MWI’s IT team used AVR for .NET to create .NET managed objects that when combined with DataGate created fast, reliable connections to the IBM i to improve customer service.

Benefits:

  • Web solution showing customer specific pricing for products with only one program to maintain
  • Quick and reliable connection to the AS400
  • Ability to call OS/400 program objects

Products:

AVR.NET, DataGate, Importa, IBM i, OS/400, DB2/400, Visual Basic .NET

Download MWI Veterinary Supply Company Case Study (PDF)

Veterinary Supply Company runs on the simplest, but most effective, of business tenets: To do whatever it takes to respond to customer needs. And, as a business with customers nationwide buying animal health care products for nearly 30 thirty years, there is clearly a lot to do. One of the ways MWI is able to keep customers happy is with its use of information technology. An early champion of data processing and information technology, MWI has been using some form of data processing/IT management for more than 23 years. MWI’s IT team recently used ASNA Visual RPG to further improve customer service by more tightly integrating IBM i- centric customer pricing information with the company’s Windows Web server.

How the Web was won

MWI has used an IBM i as its line-of-business database server for a long time. Over the last couple of years, Kent L. Berggren, MWI’s Internet Developer Manager, has built several Web applications for MWI. These web applications use load-balanced Microsoft Windows Web servers with Microsoft SQL Server as the data server. For these applications, all MWI’s data is stored on the IBM i and then transferred nightly (using SQL Server’s Data Transformation Service) from the IBM i to SQL Server. COM objects, written with Visual Basic, render the data to the Web pages.

MWI recently upgraded their IBM i sales software. With this upgrade came a new and complex pricing scheme that enables MWI to maintain customer-specific pricing. Instead of duplicating the pricing portion of the sales software in the Web applications, MWI sought to access the data directly on the IBM i (thereby eliminating the nightly DTS step required to make the pricing info available). Berggren tried several solutions using ODBC and JDBC connections to the IBM i. The connections were sluggish and the jobs on the IBM i were difficult to manage. In a world where speed on the Internet is everything, these approaches were unacceptable.

After disappointingly slow pricing fetches via ODBC and JDBC, ASNA’s Visual RPG (AVR) came to Berggren’s attention. MWI wasn’t necessarily looking for an RPG solution to their problem, but AVR’s siren call of building 100% managed .NET objects with a fast and reliable connection to the IBM i was irresistible. With VB.NET experience under his belt, an RPG programmer to help with the occasional RPG issue, and ASNA’s tech support at the ready, Berggren rolled up his sleeves to put AVR through its paces. “I’m not an RPG programmer,” says Berggren, “but I quickly understood the underlying concepts of ASNA’s AVR for .NET. AVR’s enhanced RPG syntax was intuitive to me. I was comfortable with the language in just a couple of days.”

I’m not an RPG programmer, but I quickly understood the underlying concepts of ASNA’s AVR for .NET. AVR’s enhanced RPG syntax was intuitive to me. I was comfortable with the language in just a couple of days.
Kent L. Berggren, Internet Developer Manager

Leaving IBM i programming logic intact

One of AVR’s flagship components is DataGate, AVR’s server component that runs on the IBM I. DataGate provided Berggren with two important things: fast, record-level access to IBM i data and the ability to call OS/400 program objects. MWI had several OS/400 program objects that provided the pricing information their Web app needed and the ability to call these objects from a Web page was key for Berggren. MWI’s pricing is very complex with multiple levels of decisions taking place before pricing is determined. Replicating the logic in another language wasn’t an option for MWI.

“Our pricing logic is available with simple program calls on the IBM i. Our pricing matrix is powerful and quite complex—its logic is key to us correctly providing pricing to our customers. With AVR for .NET, calling our programs on the IBM i was a simple matter of using CALL/PARM in RPG. For a VB programmer, I was feeling good pretty quickly about my new-found RPG programming skills,” relates Berggren. “In literally two days, I had gone from installing AVR for .NET to getting my first program up and running. I didn’t know RPG initially but once I familiarized myself with its syntax, and made a few calls to ASNA’s technical support, moving from VB.NET and C# to AVR for .NET was actually fairly easy.” In two days, Berggren has accomplished his initial goal and IBM i-hosted pricing module could be effectively called, to fetch either one price, or a group of them, quickly and effectively.

The icing on the cake

At this point in the project, AVR had let Berggren do exactly what he set out to do. MWI’s IBM ibased pricing was now available through MWI’s Web site. The solution was scalable, performed well, and was secure. It was, in short all that Berggren wanted. But, then, another thought occurred to him.

He explains, “Our business is truly a 24×7 operation. At any given moment we have customers around the country contacting our Web site and doing business with us. Our Web site has to be operational all of the time.” Load balanced multiple Web servers take care of the times when one of the Windows Web servers needs to come down for maintenance or upgrades. The IBM i platform was more troublesome. Not because it exhibited any unreliability, but because, even when it’s down briefly for maintenance or upgrades, product pricing on MWI’s Web site is not available. Berggren set his sights on using AVR to solve this problem.

Because AVR is, at its core, an RPG compiler, Berggren was able to use ASNA’s Importa product to import his existing IBM i RPG programs into AVR. Once imported, and with minimal tweaks, these RPG programs were compiled to run on the Windows server. Explains Berggren, “With this system in place, prior to performing a Web-based pricing request we check the status of the IBM i connection. If the IBM i is down for maintenance, our Web app automatically gets pricing info from our Windows 2000 server using the Windows-hosted AVR for .NET pricing module. With our new pricing system in place, we can make a pricing change on the IBM i and instantly the prices are reflected company-wide on all platforms. This eliminates the time-consuming and error-prone steps we used to have to do to implement and test the same pricing change on multiple servers. The system gains us many hours a month of unnecessary maintenance and I’m sure, over time, we’ll be able to measure increased customer satisfaction.”

Just the beginning

Berggren is very happy with his decision to use AVR to upgrade MWI’s pricing system. So happy, in fact, that he’s going to further use AVR for other purposes. MWI has both VB and RPG programmers, and Berggren sees AVR as just the application development environment to bring the two camps together. Says Berggren, “Some of us are going to attend some of ASNA’s AVR training classes so that we can better learn how to exploit the product for our purposes. At MWI we just scratched the surface as to all the problems AVR can solve for us.”