Troubleshooting
Problem
This document explains that Work with TCP/IP Network Status (NETSTAT) *CNN does not have an OUTPUT option to generate a spooled output or a database file.
Resolving The Problem
This document explains that Work with TCP/IP Network Status (NETSTAT) *CNN does not have an OUTPUT option to generate a spooled output or a database file.
The System i Software Support Tools Library is a collection of tools used by the System i Global Software Support Center. These programs are being provided as is without warranty or guarantee. There is no APAR support for this library. QSPTLIB is available in the RETAIN FDL in the following SAVEFILE PTFs:
o SE24152 - R540
o SE32507 - R610
o SE45610 - R710
To install the savefile PTF, you would do a RSTLIB of QSPTLIB from the savefile.
To use the Retrieve Netstat Information (NETSTAT2) command, you should do the following:
1. Issue the ADDLIBLE QSPTLIB command.
2. Issue the NETSTAT2 command.
3. Press F4 to prompt.
Retrieve Netstat Information (NETSTAT2)
Type choices, press Enter.
File to receive output . . . . . NETSTAT2 Name
Library . . . . . . . . . . . MYLIB Name, *LIBL, *CURLIB
Output member options:
Member to receive output . . . *FIRST Character value
Replace or add records . . . . *REPLACE *REPLACE, *ADD
Specify the file name and its library to receive the output, and press the Enter key.
To view the receive output in your database file, you should issue the STRSQL command.
Fields in the database file are as follows:
Field | Type | Length |
RMTADR | CHARACTER | 15 |
RMTPRT | DECIMAL | 10 |
LCLADR | CHARACTER | 15 |
LCLPRT | DECIMAL | 10 |
TCPSTA | CHARACTER | 15 |
IDLTIM | DECIMAL | 10 |
BYTIN | DECIMAL | 20 |
BYTOUT | DECIMAL | 20 |
CNNOPNTYP | CHARACTER | 10 |
NETCNNTYP | CHARACTER | 10 |
"DATE" | CHARACTER | 10 |
"TIME" | CHARACTER | 8 |
RMTADRN | NUMERIC | 12 |
To see all fields, you should issue the following command:
SELECT * FROM MYLIB/NETSTAT2
To see specific fields, you should issue the following command:
SELECT RMTADR, RMTPRT, LCLADR, LCLPRT, TCPSTA, CNNOPNTYP, NETCNNTYP, "DATE", "TIME", RMTADRN FROM MYLIB/NETSTAT2
To generate a spooled output within STRSQL, you should do the following:
1. Press F13=Services.
2. Select Option 1. Change session attributes.
3. SELECT output . . . . . . . . 2 1=Display, 2=Printer 3=File
4. Run your SELECT statement.
Historical Number
649183719
Was this topic helpful?
Document Information
Modified date:
18 December 2019
UID
nas8N1010729