NETSTAT_JOB_INFO view

The NETSTAT_JOB_INFO view returns information about jobs using IPv4 and IPv6 network connections.

The values returned for the columns in the view are closely related to the values returned by Retrieve Network Connection Data API. Refer to the API for more detailed information.

The following table describes the columns in the view. The system name is NS_JOB. The schema is QSYS2.

Table 1. NETSTAT_JOB_INFO view
Column Name System Column Name Data Type Description
CONNECTION_TYPE CONN_TYPE CHAR(4) The type of connection.
IPV4
The connection is an IPv4 connection.
IPV6
The connection is an IPv6 connection.
REMOTE_ADDRESS RMT_ADDR VARCHAR(45) The internet address of the remote host.
For IPv4:
  • The address is in IPv4 address format. A value of 0.0.0.0 indicates that either the system is waiting for a connection to open or that a UDP socket is being used. A value of 0 means that the connection is a listening or UDP socket so this field does not apply.
For IPv6:
  • The address is in IPv6 address format. A value of :: means that the connection is a listening socket so this field does not apply.
REMOTE_PORT RMT_PORT INTEGER The remote host port number. A value of 0 means that the connection is a listening or UDP socket, so this field does not apply.
REMOTE_PORT_NAME RMT_NAME VARGRAPHIC(14) CCSID 1200
Nullable
The remote host well-known port name or the name from the service table entry.

Contains null if there is no well-known port name.

LOCAL_ADDRESS LOCAL_ADDR VARCHAR(45) The local address of this connection on this system.
For IPv4:
  • The address is in IPv4 address format. A value of 0.0.0.0 indicates that either the system is waiting for a connection to open or that a UDP socket is being used.
For IPv6:
  • The address is in IPv6 address format. A value of :: means the local application specified that any local internet address can be used.
LOCAL_PORT LOCAL_PORT INTEGER The local system port number.
LOCAL_PORT_NAME LOCAL_NAME VARGRAPHIC(14) CCSID 1200
Nullable
The local system well-known port name or the name from the service table entry.

Contains null if there is no well-known port name.

AUTHORIZATION_NAME USER_NAME VARCHAR(10)
Nullable
The effective user profile of the thread for which information is being retrieved. This name may differ from the user portion of the job name.

Contains null when SLIC_TASK_NAME is not null or if JOB_NAME is the special value *SIGNON.

JOB_NAME JOB_NAME VARCHAR(28)
Nullable
The qualified job name. Can also contain the following special value:
*SIGNON
This connection is a telnet connection and the system is performing sign-on processing or is displaying a sign-on prompt on it.

Contains null when SLIC_TASK_NAME is not null.

SLIC_TASK_NAME SLIC_TASK VARCHAR(16)
Nullable
The task name as identified to the system.

Contains null when JOB_NAME is not null.

INTERNAL_JOB_ID JOB_ID BINARY(16)
Nullable
A value that can be used by system APIs to speed the process of locating the job on the system.

Contains null if JOB_NAME is the special value *SIGNON or if SLIC_TASK_NAME is not null.

JOB_TYPE JOB_TYPE VARCHAR(11)
Nullable
The type of job:
AUTOSTART
The job is an autostart job.
BATCH
The job is a batch job.
INTERACTIVE
The job is an interactive job.
MONITOR
The job is a subsystem monitor job.
READER
The job is a spooled reader job.
SCPF
The job is the SCPF system job.
SYSTEM
The job is a system job.
WRITER
The job is a spooled writer job.

Contains null if JOB_NAME is the special value *SIGNON or if SLIC_TASK_NAME is not null.

Example

Return information about all jobs using IPv4 network connections.

SELECT * FROM QSYS2.NETSTAT_JOB_INFO
  WHERE CONNECTION_TYPE = 'IPV4'