Under Gnu/Linux, we can do this with different software, and each one has is pros and cons.
Personally i used the tn5250 software for simply terminal emulation, but also the IBM iSeries Access for Linux can be used for most advanced functions.
tn5250 – Linux tn5250 emulator
Under Debian and Debial-like distros (like Kubuntu, that i use), first step is install the tn5250 software
sudo apt-get install tn5250
or use your preferred package manager (synaptic, kpackage, others)
After this, you are virtually ready to connect to your AS400. Just run the following command (172.16.1.1 is the IP address of my AS400):
The software, like the tn5250 protocol itself, has lot of options, but for my needs the most important are:
map: set the translation table between ASCII and EBCDIC. In my case, i use an italian translation map, corresponding to the code 280. For a list of all translation maps, run this command: man tn5250rc and search for the Translation Maps section
- env.DEVNAME: set the device name for the AS/400 to assign to the 5250 session. In my case, this name is DSP002A
- env.TERM: Set the terminal model name for the emulation session to use. In my case is IBM-3477-FC (80×132 color mode). For a list of all terminal models, run the same command of above, man tn5250rc, and search for Display Types section
- font_80: the font used when terminal is in 80 column mode
- font_132: the font used when terminal is in 132 column mode
Ok, with this parameters, my launch string became:
/usr/bin/xt5250 map=280 env.DEVNAME=DSP002A env.TERM=IBM-3477-FC font_80=10×20 font_132=10×20 172.16.1.1
I put this string in a new menu entries, using the icon from the file /usr/share/pixmaps/tn5250-48×48.png
Joke is done :)
Little trick: with Ctrl + Right click over the tn5250 window, you can access to the “VT Fonts” menu, and with Ctrl + Left click you can access to the “Main Options” menu.