Logo: TUG TORONTO USERS GROUP for Midrange Systems
e -server magazine

May 1997: Volume 12, Number 5

The AS/400 5250-to-HTML Workstation Gateway

By Miles Jenkins Figure 1.

n all of computerdom, is there anything less sexy than a 5250 screen? This time-honoured, standard interface to the AS/400 and its forebears has some of the characteristics of a John Deere tractor: it’s functional, dependable, and green. But once you’ve coded the “Blink” and “High-intensity” attributes on a display field, you’ve pretty much exhausted its attention-grabbing potential.

Contrast that with HTML (HyperText Markup Language): what could be more seductive, more alluring, than the language used to render World Wide Web pages on the Internet? With its embedded graphics, hot links, and even animation and sound, how could HTML even be mentioned in the same breath as 5250?

Well, in a tour de force that rivals Mother Nature’s miraculous caterpillar-to-butterfly trick, IBM developers have built into the latest versions of OS/400 a 5250-to-HTML conversion capability, that works on-the-fly to transform the 5250 data stream, normally destined for a dumb terminal or terminal emulator, into HTML documents that can be routed to, and displayed by, web browser programs connected to the Internet (or intranet, or extranet, or whatevernet).

Thus, the umpteen thousand AS/400 business applications all become universally accessible via the Internet: no special 5250 hardware or emulation software is required on the client side. Any client that can get a TCP/IP connection to your AS/400, be it a Mac, a PC, or a UNIX workstation, can become a “terminal”.

Figure 2.

Figures 1 to 4 show the transformation that takes place when ordinary 5250 screens are converted to HTML (Note that there may be slight differences in appearance for different browsers). Figure 1 is a typical AS/400 menu screen, and Figure 2 is its HTML equivalent. Note that the input-capable field becomes an entry box. Also, along the top of the screen, several utility buttons are provided: for example Refresh, to refresh the display, Time, to display time connected, and Close, to end the session. At the bottom of the screen are some keyboard equivalent buttons for mouse chauvinists, such as Enter, Page Up, and Page Down. Note also the 24 function key buttons at the bottom of Figure 2. These can be replaced by a pull-down menu (as in Figure 4) by clicking the Style button at the top of the screen. Finally, the General menu box provides access to some additional 5250 functions like Print Screen and System Request, and the Help button is, one hopes, self-explanatory.

In manuals and other literature, the 5250-to-HTML conversion function goes by the name of the Workstation Gateway Server, or WSG Server. With versions V3R2 (CISC) and V3R7 (RISC) it is incorporated into OS/400, at no additional charge. To use it, all you need on your client workstation is a web browser and a TCP/IP connection to your AS/400. Client Access/400 (or any other equivalent AS/400 client software) is not a requirement. Following are the steps you need to take to configure and start the WSG Server:

The WSG Server is, like all other Internet capabilities of the AS/400, a TCP/IP application, and in order to use it TCP/IP must be active on your system. In the last issue of the TUG News Magazine (March 1997) I outlined how you can configure and start TCP/IP on your system if you haven’t already. The TCP/IP Fastpath Setup manual (SC41-3430) will serve just as well. When a web browser connects to the WSG server, a virtual controller and device is created. (QPACTLnn and QPADEVnnnn are the names given to them). You should set the System Value QAUTOVRT to the maximum number of devices that you want automatically created by the system.

The command CHGWSGA (Change WSG Attributes) brings together on one screen all the parameters affecting the WSG server:

Figure 3.

Figure 4.

The last three parameters will only apply if you have foreign language requirements:

Starting the WSG Server on the AS/400 to enable client connections (assuming it hasn’t already been started via AUTOSTART *YES) is as simple as issuing the command STRTCPSVR SERVER (*WSG). On the client side, to start a session, you need to enter the URL (Universal Resource Locator) of the AS/400 WSG Server in your web browser, as follows:

http://acme400. acme.ca:5061/WSG

where acme400. acme.ca is the domain name of your AS/400, and 5061 is the default TCP port of the WSG Server. Press Enter, and you’ll shortly see a signon display. Congratulations! You’ve helped to knock down the Berlin Wall of proprietary networking, and your AS/400 applications are now potentially accessible to the millions of Internet users around the world (gulp!). Yes, even that old hockey pool program you wrote years ago, back when Joe Clark was Prime Minister, can live again -- now with an international audience!

For more details on configuring and using the Workstation Gateway Server, refer to Chapter 14 in the OS/400 TCP/IP Configuration and Reference (SC41-3420). As noted above, the online help for the WSG Server can be made accessible to the user at the push of a button on the browser screen (Section 4.14.8 in the manual explains how to do this). This help information -- and all sorts of other information on the latest PTFs, performance tips, etc. -- is available on the Internet at this address: http://www.as400.ibm.com/htmlgate Also, IBM has a "Web Builder's Workshop" page on the Internet: www.as400.ibm.com/workshop/webbuild.htm T < G