IBM AS/400 - Setup Telnet 5250 Server

Table of contents :

Introduction

The IBM AS/400 provides interactive access to the system through 5250 terminals. Traditionally this was done using Twinax terminals, but with the arrival of TCP/IP support, IBM introduced the Telnet server to allow 5250 sessions over the network.

In this article, we will see how to configure and start the Telnet 5250 service on an AS/400 running OS/400 V4R4, so that users can connect with 5250 emulators.

Requirements

Before enabling the Telnet server, make sure that:

  • TCP/IP is configured and active on your AS/400 (see this article on TCP/IP configuration)
  • You have security officer authority (`QSECOFR`)
  • A 5250 emulator (such as Mocha TN5250, tn5250j, or IBM Access Client Solutions) is available on your workstation

Starting TCP/IP

First, ensure that TCP/IP is active. You can check the status with:

```s WRKTCPSTS ```

If it is not active, start it:

```s STRTCP ```

Starting the Telnet server

The Telnet server is managed as a TCP/IP server job named `QTVTELNET`, which normally runs inside the subsystem `QSYSWRK`.

To start it, use:

```s STRTCPSVR SERVER(*TELNET) ```

You can confirm it is running with:

```s WRKACTJOB SBS(QSYSWRK) ```

Look for a job named `QTVTELNET`.

Enabling interactive subsystem

Telnet sessions require the interactive subsystem `QINTER` to be active. If it is not running, start it with:

```s STRSBS SBSD(QINTER) ```

Without `QINTER`, users will not receive a sign-on screen.

Allowing virtual terminals

Telnet 5250 sessions use virtual display devices named `QPADEVxxxx`. The system value `QAUTOVRT` controls how many such devices can be created.

Check its value with:

```s DSPSYSVAL QAUTOVRT ```

If it is `0`, no Telnet sessions can be created. Change it to a reasonable value (for example, 200):

```s CHGSYSVAL SYSVAL(QAUTOVRT) VALUE(200) ```

Testing the connection

From your workstation, start a 5250 emulator and connect to the AS/400 IP address on port 23.

If everything is configured correctly, you should see the sign-on screen:

At this point, you can log in with a valid AS/400 user profile.

Autostarting Telnet at IPL

To avoid manually starting Telnet after each IPL, you can configure it to autostart.

Method 1: Network server configuration

Enable autostart for the Telnet server:

```s CHGNETSVR SERVER(*TELNET) AUTOSTART(*YES) ```

Verify with:

```s WRKNETSVR ```

Method 2: Startup program

Alternatively, add the Telnet start command to the system startup program:

  1. Check the startup program: ```s DSPSYSVAL QSTRUPPGM ```
  2. Edit the CL program (usually `QSYS/QSTRUP`)
  3. Add: ```s STRTCPSVR SERVER(*TELNET) ``` after `STRTCP`

This ensures that Telnet starts automatically whenever the system IPLs.

Troubleshooting

  • If the connection stalls after `IBMRSEED`, make sure you are using a 5250 emulator, not a plain Telnet client.
  • Check that the subsystem `QINTER` is active and not limited by `MAXJOBS`.
  • Review the job logs of `QTVTELNET` and `QPADEVxxxx` devices for error messages: ```s DSPJOBLOG JOB(QTVTELNET) ```

References