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 (like the InfoWindow II), but with the arrival of TCP/IP support, IBM introduced a 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 9401-150 running OS/400 V4R4, so that users can connect with 5250 emulators remotely.

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 can log in with 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:

WRKTCPSTS

If it is not active, start it:

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:

STRTCPSVR SERVER(*TELNET)

You can confirm it is running with:

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:

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:

DSPSYSVAL QAUTOVRT

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

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:

CHGNETSVR SERVER(*TELNET) AUTOSTART(*YES)

Verify with:

WRKNETSVR

Method 2: Startup program

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

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

This ensures that Telnet starts automatically whenever the system IPLs.

References