23
Sat, Nov
1 New Articles

Fitting Linux into an AS/400 World

Typography
  • Smaller Small Medium Big Bigger
  • Default Helvetica Segoe Georgia Times

Unless you’ve been sequestered in a monastery for the past year, you’ve heard of Linux. If you’ve read anything about this exciting operating system, you know that its two main attractions are that it’s 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/IP—It’s 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 wasn’t 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 I’ll 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 it’s still considered a closed, proprietary system by those who haven’t 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. It’s 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 lion’s 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 she’ll find herself lost when navigating through the various menus. With the command Start Qshell (STRQSH), she’ll 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 you’ve installed the QShell Utilities for AS/400 (PRPQ 5799-XEH), she’ll 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 aren’t suckered into using proprietary “enhancements” to the Java specification, you’ll 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.

Emulation—The Sincerest Form of Flattery

So you’re now convinced that the AS/400 has become open and that communication with Linux is possible. That’s 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 one’s a steal at $25 and is distributed as shareware. For further information or an online demo, visit www.mochasoft.dk.

It’s interesting to note that Core Technology and MochaSoft are using Java to create their emulation products. This is a trend I think you’ll 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 you’ll need to be working in a graphical environment. For Linux, that’s 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 that’s available. Michael Madore created this free software, which you can find at www. blarg.net/~mmadore. Madore’s 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 it’s the user feedback that has given them incentive to continue.

What’s 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 won’t 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 IBM’s 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, you’ll get all the advantages of IBM’s 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 user’s name. We configured Samba to point this share to the NetServer share to be used as the user’s 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 use—this 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 can’t 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 you’ve 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 you’re 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 you’ll 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 Corporation’s emulator applet adds a graphical flair to a 5250 session.





Fitting_Linux_into_an_AS-_400_World05-00.png 595x341





Fitting_Linux_into_an_AS-_400_World06-00.png 595x500

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

BLOG COMMENTS POWERED BY DISQUS

LATEST COMMENTS

Support MC Press Online

$

Book Reviews

Resource Center

  • SB Profound WC 5536 Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application. You can find Part 1 here. In Part 2 of our free Node.js Webinar Series, Brian May teaches you the different tooling options available for writing code, debugging, and using Git for version control. Brian will briefly discuss the different tools available, and demonstrate his preferred setup for Node development on IBM i or any platform. Attend this webinar to learn:

  • SB Profound WP 5539More than ever, there is a demand for IT to deliver innovation. Your IBM i has been an essential part of your business operations for years. However, your organization may struggle to maintain the current system and implement new projects. The thousands of customers we've worked with and surveyed state that expectations regarding the digital footprint and vision of the company are not aligned with the current IT environment.

  • SB HelpSystems ROBOT Generic IBM announced the E1080 servers using the latest Power10 processor in September 2021. The most powerful processor from IBM to date, Power10 is designed to handle the demands of doing business in today’s high-tech atmosphere, including running cloud applications, supporting big data, and managing AI workloads. But what does Power10 mean for your data center? In this recorded webinar, IBMers Dan Sundt and Dylan Boday join IBM Power Champion Tom Huntington for a discussion on why Power10 technology is the right strategic investment if you run IBM i, AIX, or Linux. In this action-packed hour, Tom will share trends from the IBM i and AIX user communities while Dan and Dylan dive into the tech specs for key hardware, including:

  • Magic MarkTRY the one package that solves all your document design and printing challenges on all your platforms. Produce bar code labels, electronic forms, ad hoc reports, and RFID tags – without programming! MarkMagic is the only document design and print solution that combines report writing, WYSIWYG label and forms design, and conditional printing in one integrated product. Make sure your data survives when catastrophe hits. Request your trial now!  Request Now.

  • SB HelpSystems ROBOT GenericForms of ransomware has been around for over 30 years, and with more and more organizations suffering attacks each year, it continues to endure. What has made ransomware such a durable threat and what is the best way to combat it? In order to prevent ransomware, organizations must first understand how it works.

  • SB HelpSystems ROBOT GenericIT security is a top priority for businesses around the world, but most IBM i pros don’t know where to begin—and most cybersecurity experts don’t know IBM i. In this session, Robin Tatam explores the business impact of lax IBM i security, the top vulnerabilities putting IBM i at risk, and the steps you can take to protect your organization. If you’re looking to avoid unexpected downtime or corrupted data, you don’t want to miss this session.

  • SB HelpSystems ROBOT GenericCan you trust all of your users all of the time? A typical end user receives 16 malicious emails each month, but only 17 percent of these phishing campaigns are reported to IT. Once an attack is underway, most organizations won’t discover the breach until six months later. A staggering amount of damage can occur in that time. Despite these risks, 93 percent of organizations are leaving their IBM i systems vulnerable to cybercrime. In this on-demand webinar, IBM i security experts Robin Tatam and Sandi Moore will reveal:

  • FORTRA Disaster protection is vital to every business. Yet, it often consists of patched together procedures that are prone to error. From automatic backups to data encryption to media management, Robot automates the routine (yet often complex) tasks of iSeries backup and recovery, saving you time and money and making the process safer and more reliable. Automate your backups with the Robot Backup and Recovery Solution. Key features include:

  • FORTRAManaging messages on your IBM i can be more than a full-time job if you have to do it manually. Messages need a response and resources must be monitored—often over multiple systems and across platforms. How can you be sure you won’t miss important system events? Automate your message center with the Robot Message Management Solution. Key features include:

  • FORTRAThe thought of printing, distributing, and storing iSeries reports manually may reduce you to tears. Paper and labor costs associated with report generation can spiral out of control. Mountains of paper threaten to swamp your files. Robot automates report bursting, distribution, bundling, and archiving, and offers secure, selective online report viewing. Manage your reports with the Robot Report Management Solution. Key features include:

  • FORTRAFor over 30 years, Robot has been a leader in systems management for IBM i. With batch job creation and scheduling at its core, the Robot Job Scheduling Solution reduces the opportunity for human error and helps you maintain service levels, automating even the biggest, most complex runbooks. Manage your job schedule with the Robot Job Scheduling Solution. Key features include:

  • LANSA Business users want new applications now. Market and regulatory pressures require faster application updates and delivery into production. Your IBM i developers may be approaching retirement, and you see no sure way to fill their positions with experienced developers. In addition, you may be caught between maintaining your existing applications and the uncertainty of moving to something new.

  • LANSAWhen it comes to creating your business applications, there are hundreds of coding platforms and programming languages to choose from. These options range from very complex traditional programming languages to Low-Code platforms where sometimes no traditional coding experience is needed. Download our whitepaper, The Power of Writing Code in a Low-Code Solution, and:

  • LANSASupply Chain is becoming increasingly complex and unpredictable. From raw materials for manufacturing to food supply chains, the journey from source to production to delivery to consumers is marred with inefficiencies, manual processes, shortages, recalls, counterfeits, and scandals. In this webinar, we discuss how:

  • The MC Resource Centers bring you the widest selection of white papers, trial software, and on-demand webcasts for you to choose from. >> Review the list of White Papers, Trial Software or On-Demand Webcast at the MC Press Resource Center. >> Add the items to yru Cart and complet he checkout process and submit

  • Profound Logic Have you been wondering about Node.js? Our free Node.js Webinar Series takes you from total beginner to creating a fully-functional IBM i Node.js business application.

  • SB Profound WC 5536Join us for this hour-long webcast that will explore:

  • Fortra IT managers hoping to find new IBM i talent are discovering that the pool of experienced RPG programmers and operators or administrators with intimate knowledge of the operating system and the applications that run on it is small. This begs the question: How will you manage the platform that supports such a big part of your business? This guide offers strategies and software suggestions to help you plan IT staffing and resources and smooth the transition after your AS/400 talent retires. Read on to learn: