0

Does anyone know if it is possible to run an automated Telnet test (to a specific port) on an IBM AS400 platform in batch?

Ideally the output of the telnet test should be written to QsysOpr or a file in the IFS if possible.

The target platform is v7r3.

Appreciate any suggestions.

greenage
  • 399
  • 3
  • 13
  • So you want run the test on the IBM i? Or on a PC to the IBM i? – Charles Apr 06 '20 at 17:43
  • Run the test on IBM-I, telnet'ing to an IP on a specific port. – greenage Apr 06 '20 at 21:32
  • The only approach I can think of is to create a shell script on a Linux Server, which SSH's to the IBM-I and then performs a telnet to the specified IP. But looking for a cleaner way, the less steps the better. – greenage Apr 06 '20 at 21:36
  • does it have to be initiated from a PC, or can you initiate from the Job scheduler on IBM i? – jmarkmurphy Apr 06 '20 at 21:55
  • What do you want to achieve? Is it really telnet or do you simply want to check if a port is open? – PoC Apr 07 '20 at 09:52
  • The aim is to ensure a port on a remote connection is available – greenage Apr 07 '20 at 23:17

1 Answers1

0

Take a look at Albert York's TNAPI project...

TNAPI - An API that allows batch programs to run interactive commands and programs and RUNTNSCR a utility that runs scripts using TNAPI

Another option might be the virtual terminal APIs built into the OS...

Charles
  • 21,637
  • 1
  • 20
  • 44