I'm looking for a way to read out the information that is provided by NETSTAT for the connected system. Is there a tool or a simple way to direct the information to a file?
Unfortunately, the NETSTAT (or WRKTCPSTS) command does not have *OUTFILE support. This command can only be run interactively, too.
However, the display screen for this command does have an F6 key defined that will print this information. You could then write a simple CLP to copy the spool file output (CPYSPLF) into a database file.
I don't know how useful this will be though, especially since you would not be able to submit this process to batch due to the "interactive only" requirement of the command.
I would like to see IBM change this process and add *OUTFILE support and allow us to run this command in a batch environment!
================================== MORE INFORMATION ON THIS TOPIC ==================================
The Best Web Links: tips, tutorials and more.
Ask your OS/400 questions -- or help out your peers by answering them -- in our live OS/400 discussion forums.
Ask the Experts yourself: Our OS/400 gurus are waiting to answer your questions.
Check out this Search400.com Featured Topic: 20 ways to ensure a smooth OS upgrade
This was first published in July 2004