SIGWAITINFO

IBM i 5250 and Navigation

2023-01-27

I work at a company that has an IBM i as a central part of its business. I used to call this system a “legacy” system, but after some time, I’ve realized that’s a bit of a mischaracterization. Although many people may still call it an AS/400, the truth is the AS/400 (and its operating system OS/400) are truly gone and have been for decades. In 2000, the AS/400 was replaced with the iSeries (still running OS/400), which was then replaced with the System i in 2006 running i5/OS. But since 2008, it’s all just been IBM i running on a POWER server. The OS is supported and regularly updated. It would be like calling Windows 11 a legacy system because previously it was Windows NT 4.

And all that having been said, since becoming familiar with a 5250 terminal emulation screen, I’ve been able to spot IBM i out in the wild at a number of places including various hotels, Lowes, and Costco. If you consider it legacy or not, it’s certainly still in use by many companies. For these reasons and some others, I’ve been doing a much more thorough deep dive into IBM i.

5250

For those familiar with IBM model numbers, you may recognize the 4-digit number as the common IBM model number scheme (e.g. the original IBM PC is the 5150, the PC XT is the 5160, the PC AT is the 5170). The IBM 5250 was a line of terminal computers that connected to an SNA network via twinax cables. These terminals were the original terminals for IBM’s midrange computers and were used by the AS/400. As these older SNA networks fell out of favor for TCP/IP stacks, the 5250 SNA protocol was ported to Telnet (sometimes called tn5250). These days, most interaction with IBM i is through a program that uses the 5250 over telent protocol to emulate these terminals. The details of this protcol are actually documented in RFC 1205 - 5250 Telnet Interface and RFC 2877 - 5250 Telnet Enhancements.

The MAIN menu screen as seen on a 5250 emulator.  For most users, this is the default menu when logging into an IBM i

Using a 5250 terminal session may take a little getting used to, but it’s certainly not difficult to use once you know the basics. One of the best parts of IBM i is that you can move the cursor to a section and hit the F1 key to bring up help about that item. And a lot of times it will bring up good info. For instance, if you just press F1 on the MAIN menu, you’ll get the following help message.

This is the help screen you will get by pressing F1 on any random spot on the MAIN menu

However, if you move the cursor to option 3 (General system tasks) and press F1, you’ll get this specialized help message.

Help message for Option 3 of MAIN menu, General system tasks

Pressing the F3 key will exit the screen you’re on. Pressing the F12 key will “cancel” or go back to the previous screen. When you see the text More... on the bottom right, you can use the Page Down key to go to the next scren of text (and Page Up to go back). You can press the Tab key to go to the next input line and Shift+Tab to go to the previous input line. By default, typing is in overwrite mode and not insert mode, which can get pretty frustrating at times if you made a typo. Some terminal emulators will let you turn on insert mode, some will not.

You may see that it may ask you to use function keys beyond F12 (F13-F24). To type F13, you press Shift+F1. To type F14, you press Shift+F2. This goes on to Shift+F12 for F24.

Another cool feature of IBM i is the commands (called Control Language, or CL) are built off of common “words” and are easy to build and find. One of these “words” is CRT for “Create”. Any creation command will start with CRT, such as CRTPF (Create Physical File) or CRTOUTQ (Create Output Queue). And if you forget a command, but know it starts with something, you can always type the part you know, and then type *. For instance, to get every command that starts with CRT, you can just run the command CRT*, and it will take you to a list you can pick through.

Listing of all commands that start with “CRT”

For a different breakdown of all CL commands, you can type GO MAJOR to go to the Major Command Groups menu. Here commands are organized by major groups like Verb Commands and File Commands.

The GO command allows you to immediately go to any menu. Menus are identified by their name in the top left of the screen (e.g. MAIN, MAJOR, SYSTEM, PROGRAM, etc.).

What I think is probably the most impressive feature is the F4 key to “Prompt”. You can type a command…

A full command typed out on the command line, in this case WRKMBRPDM (Work with Member in Program Development Manager)

…and instead of having to remember the exact syntax of all the arguments, you can hit the F4 key to go into a Prompt screen that will walk you through all the possible arguments.

Prompt screen for WRKMBRPDM

When you’re done you can press enter, and it will either run the command with all the arguments specified in the prompt or generate the command with all the arguments on the command line for you to run.

Immediately sent into PDM in the specified library and source file with the member listed

Where To Get a 5250 Emulator

IBM has an official emulator packed in their IBM Access Client Solutions. It’s all built on Java, so it runs on Windows, Mac, or Linux. However to get IBM ACS, you need to have an IBM i license on top of a license for ACS. If you work for a company with an IBM i, it’s likely you can get this license if you ask the right people.

For those who do not have access to an IBM i, there’s good news. You can go to PUB400 and get a free account to an IBM i. This has been an incredibly useful resource in my learning journey. They’ve had some problems with some big name e-mail providers, but I used a Mailfence account and got my account with a bit of a delay.

As for 5250 emulators you can use that don’t cost an arm and a leg, there are options:

Understanding how to use the 5250 session will let you go far in working on the IBM i. The next entry on IBM i will be related to the filesystems available and how to think about files and objects and members.