Unless youve been sequestered in a monastery for the past year, youve heard of Linux. If youve read anything about this exciting operating system, you know that its two main attractions are that its free and that it runs on not only your brand new Pentium III system but also that old Intel hardware lying unused in your closet. What you may not know is what purpose it would serve in an AS/400 shop. This article gives you some suggestions on how you can take advantage of the power of Linux.
TCP/IPIts in There
Back in the days of kerosene computers, most, if not all, of the computer manufacturers had proprietary networking schemes. Each vendor was capable of networking its own hardware, but interoperability between vendors wasnt a high priority. Then came PCs. Users demanded ways of accessing the mainframe and minicomputer data from their desktops. Most of you have a favorite horror story from the vendors early attempts to accomplish this, so Ill skip everything up to what is arguably the event that opened up computing: the adoption by most vendors of TCP/IP as a network protocol.
The AS/400 certainly has this history, so much so that its still considered a closed, proprietary system by those who havent been keeping up with current events. Only recently, within the last few releases of OS/400, has it learned to speak TCP/IP with any fluency. Linux, however, is an open-source clone of UNIX and, therefore, speaks native TCP/IP. To paraphrase an old commercial: TCP/IP. Its in there.
Right out of the box (or download), Linux comes complete with a full TCP/IP suite, including all of the functions provided in OS/400. A partial list of the functions includes Telnet, FTP, POP, Domain Name System (DNS) server, Dynamic Host Configuration Protocol (DHCP), Network File System (NFS), Point-to-Point Protocol (PPP), Serial Line Internet Protocol (SLIP), and Network Address Translation (NAT). Also included is a widely used Web server, the Apache. Suffice it to say that, in terms of TCP/IP, Linux can do whatever the AS/400 can.
A Tale of Two Systems
UNIX has been used for both scientific and commercial applications for roughly 25 years. The Internet was built using UNIX servers, and it still holds the lions share of the Internet server market. The AS/400, being strictly a business machine, has been sitting quietly in
the data centers of corporate America for only half that time. As long as the Internet was nothing more than newsgroups and FTP sites, IBM was willing to allow the situation to continue. As soon as Web sites and e-commerce started to flourish, IBM had no choice but to make the AS/400 adapt to this new frontier. The resulting changes make OS/400 appear amazingly similar to UNIX and, therefore, Linux.
Drop a Linux programmer at an AS/400 command line, and shell find herself lost when navigating through the various menus. With the command Start Qshell (STRQSH), shell find herself at a familiar command line, albeit one with a peculiar habit of prompting for an additional command before presenting the output of the prior one. If youve installed the QShell Utilities for AS/400 (PRPQ 5799-XEH), shell even find it pleasant to navigate through the AS/400 Integrated File System (AS/400 IFS). Commands like List Directory (ls), Copy File (cp), and other typical Linux utilities work just as expected. If the standard scripting capabilities provided by QShell are insufficient, she can also use Perl, a scripting language available on both platforms.
The AS/400 IFS that OS/400 uses mimics the file system used by Linux. Both have a root directory, denoted by a forward slash (/). Other devices and file systems are mounted under root. For example, a library called BARRY on the AS/400 would be referred to as the AS/400 IFS directory /QSYS.LIB/ BARRY.LIB. The equivalent directory on Linux would be /home/barry. The AS/400 IFS notation for the tape drive with a device description name of TAP01 would be /QSYS.LIB/TAP01.DEVD. A small computer system interface (SCSI) tape drive on a Linux system would be /dev/st0. Just keep in mind that Linux, like the AS/400, does not make use of drive letters. There is no A: or B: drive in Linux; this is a machination of DOS and its ilk. Linux has /dev/fd0 and /dev/fd1 instead of A: and B:, respectively. These devices can be mounted anywhere on the file system, typically under /mnt.
The Network File System (NFS) is the UNIX equivalent of a LAN manager or Windows network drive. Both Linux and the AS/400 have the capability to be NFS servers or clients. What this means is that Linux clients can mount on their file systems whatever exports the AS/400 has available. The AS/400 files will appear as though they are local to the Linux system. Conversely, the AS/400 can mount a Linux NFS export so that the files located on the PC will appear in the AS/400 IFS. Conceptually, both systems appear to each other as one big file system.
Another feature shared by AS/400 and Linux is that of having a Java Virtual Machine (JVM). There are a couple of JVMs available for Linux, and even IBM has provided one. Its current version is 1.1.8 and can be found at www.alphaworks.ibm.com/tech/linuxjvm.
As long as you arent suckered into using proprietary enhancements to the Java specification, youll find that write once, run anywhere works well between the AS/400 and Linux. This is demonstrated whenever you access the 100% Pure Java Java Toolbox for AS/400, which works well under Linux.
EmulationThe Sincerest Form of Flattery
So youre now convinced that the AS/400 has become open and that communication with Linux is possible. Thats well and good, but we IT folks want to know what it can do for us. How can it possibly save us any money?
The first thing any self-respecting AS/400 guru is going to ask when evaluating this operating system is, Is there a 5250 emulation product available for it? The answer to this question is a resounding Yes! There are a number of commercial products currently available as well as an open-source product.
By the time you read this, Attachmate Corporation should have released the next version of its e-Vantage Host Access Server for AS/400. On the server side, this productsupports Red Hat Linux (for Intel) Version 5.2. Attachmate is currently developing client-
side applications for Linux and hopes to have the products available soon. For more information, visit www.attachmate.com.
Core Technology Corporation has three Java-based emulators available. One converts the screen to a graphical form, à la IBM Workstation Gateway Server. The other two have more of a green-screen appearance. All three of these live on the AS/400 and are served up as Java applets via a Java-enabled browser. For an online demonstration, visit www.ctc-core.com/ibm.
MochaSoft offers a Java-based 5250 client that runs either as a Java applet in a browser or as a full-fledged Java application. This ones a steal at $25 and is distributed as shareware. For further information or an online demo, visit www.mochasoft.dk.
Its interesting to note that Core Technology and MochaSoft are using Java to create their emulation products. This is a trend I think youll see more often. How much easier can it be to cover all platforms than by using Java? The implication of using a Java-based emulator is that youll need to be working in a graphical environment. For Linux, thats X Windows. Figure 1 shows the Core Technology emulator running in a Netscape browser session. Figure 2 shows the MochaSoft emulator running in an X window.
Of course, no discussion of Linux-based emulators would be complete without mentioning the open-source product thats available. Michael Madore created this free software, which you can find at www. blarg.net/~mmadore. Madores project has been around for a few years, but development stalled for a while until Linux picked up momentum and people started searching for a 5250 emulator. Since then, Jason Felice has joined Madore, and they have been working diligently to make it bug-free. Both Madore and Felice have said its the user feedback that has given them incentive to continue.
Whats useful about this emulator is that it runs in an Xterm(inal) or in a simple text-based console. If you have an old 386 computer around with a VGA monitor, 8 or 16 MB of memory, a 250-MB or larger hard drive, and a network interface card, you have a cheap terminal. Does this sound like a configuration that might be satisfied by that equipment stored in your basement?
Although the existence of these emulators may be flattering to IBM, it wont be profitable for IBM. None of them requires a Client Access/400 license. They all use the TN5250e protocol, which is TCP/IP-based.
Finally, no article about the AS/400 and Linux would be complete without mentioning IBMs Host On-Demand product. Host On-Demand is a Java-based host access tool you can use to connect to your AS/400 and other systems. Host On-Demand supports Telnet/5250, FTP, and printer emulation, and, most important, it runs on any machine that supports the JVM. In fact, since it is a Java-based product, it will run on your Linux platform without problems and without requiring you to perform any unique configurations. Host On-Demand is a fleshed out package, which means that if you use it, youll get all the advantages of IBMs AS/400 as well as Java experience and reliability, which should mitigate any bugs. Keep in mind, though, that you have to pay more for this product than most of the others, although, to be fair, you also get a lot more features for your money. For more information, point your browser to www-4.ibm.com/software/ network/hostondemand/.
May I Serve You?
One of the nicer features added to recent releases of OS/400 is NetServer, which allows the AS/400 to be a file-and-print server for Windows clients without the addition of the Client Access product. The AS/400 appears in the Network Neighborhood, as would any Windows peer or server. Linux provides even more functionality through Samba, an open- source product. This package enables Linux to do file-and-print serving, just like NetServer. In addition, Samba is capable of authenticating Windows 95/98 domains with support for Microsoft Windows NT domains currently being developed. The current release of Samba, 2.0.5a, is already quite usable as a primary domain controller for NT.
For information on Samba, visit www.samba.org. In our shop, we found a great way to use a combination of NetServer and Samba.
Recently, our shop migrated all of our desktop PCs to Windows NT. There are roughly 30 PC users, many of whom circulate among different desks throughout the day. An NT feature that would facilitate this movement is roaming profiles. No problem. All you need is one of the spiffy Integrated Netfinity Servers for AS/400 and a monitor, keyboard, mouse, and Windows NT Server license for 30 users. A quick calculation indicates an outrageous amount of money would need to be spent for this seemingly simple task.
An alternative solution came from the open-source community. We already had a Linux box on our network serving as a DNS server. We loaded Samba onto this machine and configured it to be an NT primary domain controller.
On the AS/400, a /home/user directory was created for each user with the Make Directory (MKDIR) command. This directory was then secured to the user profile with the Work with Authorizations (WRKAUT) command. Lastly, a NetServer share was created using Operations Navigator to export this directory to the Windows network using the user profile as the name of the share.
To complete the task, a Linux user profile matching the AS/400 profile in name, password, and user ID (uid) was created and added to Samba. Samba can be configured to create a share with a name that matches the users name. We configured Samba to point this share to the NetServer share to be used as the users home directory. Now, when users sign onto one of the Windows boxes, their desktops are loaded from the Linux box and they are automatically assigned a Z drive that points to the AS/400 NetServer share. Because all desktop applications are set up to default to saving to the Z drive, the application data moves along with the desktop. Another benefit is that this configuration allows the application data to be saved automatically during the nightly AS/400 backup. The desktop information, which resides on the Linux box, is saved by a script that runs nightly on the Linux box. This script mounts an NFS share on the AS/400 and transfers all important information to it.
Many AS/400 shops not connected directly to the Internet have requirements for dial-up access to the AS/400 or the LAN. With earlier versions of OS/400, it was possible to provide SLIP connections using an optional ASCII controller and modems. Later versions added PPP capabilities. Either of these methods certainly works, but neither seems to be particularly cost-effective, because they require expensive AS/400-specific hardware.
Once again, we can put Linux to usethis time as a PPP server. All of the software required to accomplish this task is included with Linux, and the exact steps required to configure everything are detailed in the Linux documentation. What makes this approach attractive, besides price, is scalability. Each simultaneous AS/400 PPP connection requires another costly IBM modem and available communications port. Most PCs come with two communications ports, and modems targeted at the PC market are fairly cheap. To add additional communications ports, you can use relatively inexpensive multiport communications boards, which are readily available for PCs. These commonly come in four- or eight-port configurations, and all of the ports on a given card can share the same hardware interrupt. Thus, the limiting factors to adding communications ports in this manner are the quantities of available slots, hardware interrupts, and input/output addresses.
Databases
You would be correct if you assumed that there are open-source databases available for the Linux platform. One of the popular ones is MySQL from T.c.X DataKonsultAB (www.mysql.com). A few commercial software companies have made the front page of
Call Me
trade journals because they have ported their databases to Linux. Although not the first to do so, IBM has recently ported DB2 Universal Database Server to the Linux platform.
Is your shop starting to develop software using Java? Are you developing Java servlets, Java applets, or other Web-based technologies? Many shops cant afford a development AS/400, but almost all have mothballed hardware that could be cobbled together. Load a Linux distribution on one of these boxes and add a JVM, an open-source or commercial database product, and associated Java Database Connectivity (JDBC) drivers, and youve got yourself a cheap development system.
What Next?
There is no question that IBM has been working overtime to make the AS/400 a true chameleon among computers. With all of the hardware and software features available, you can configure the box to accomplish nearly any task. Having everything in one box certainly has its advantages, but the trade-off is cost.
For those of you willing to roll up your sleeves and become somewhat of a do-ityourselfer, Linux might just be the solution to some of your current problems. The cost of entry is low; Linux distributions on CD-ROM are less than $100. These provide the easiest path to a Linux computer, offering fairly straightforward installation programs and printed documentation. The more adventurous and those with a T1 connection can download distributions from the Internet for free. Red Hat Linux, for example, offers its distributions at www.redhat.com/download.
If youre tired of rebooting your Windows PC multiple times a day (because it keeps crashing) and you want a more stable environment for your development, give Linux a try. The more you learn about it, the more tasks youll delegate to it.
Figure 3 shows my concept of networking nirvana, which also highlights some of the capabilities of Linux. To start your Linux education, point your browser to www.linux.org.
Figure 1: Core Technology Corporations emulator applet adds a graphical flair to a 5250 session.
Figure 2: The Java-based MochaSoft emulator simplifies function key access with a keyboard bar.
AS/400 Web Server Linux Web Server Linux-based Firewall
Internet
Figure 3: Here are just a few places where a Linux PC could fit in.
AS/400 Production System
Linux PC Development System(s)
Various Client Workstations
Linux Dial-in PPP Server and Fax Server
Modem Modem Modem
LATEST COMMENTS
MC Press Online