Troubleshooting
Problem
Resolving The Problem
There is no IBM i command to retrieve or print a list of TCP/IP addresses used in Remote Output Queues (RMTOUTQs), *LAN 3812 device descriptions, or *LAN *IPDS device descriptions.
This information can be retrieved manually for all *LAN printer device descriptions by doing the following:
1. | Use the Work with Device Descriptions (WRKDEVD) command with the Device description (DEVD) parameter set to *LANPRT. For example: WRKDEVD DEVD(*LANPRT) |
2. | Select Option 5=Display next to each printer device description in the list to see the value specified in the LAN attachment (LANATTACH) parameter. If the LANATTACH parameter is *LEXLINK, it is not using TCP/IP and will not have a TCP/IP address or host name. |
3. | If the LANATTACH parameter is *IP, look at the value specified in the Remote location name or address (RMTLOCNAME) parameter. |
4. | If the Remote location (RMTLOCNAME) parameter contains a TCP/IP address, record it. |
5. | If the RMTLOCNAME parameter contains a host name, use the Verify TCP/IP Connection (VFYTCPCNN or PING) command to resolve the host name to a TCP/IP address and record it. |
1. | Use the Work with Output Queue (WRKOUTQ) command with the Output queue (OUTQ) parameter set to *ALL. For example: WRKOUTQ OUTQ(*ALL) Note: If all of the RMTOUTQs follow a specific naming scheme (such as LANPRT01, LANPRT02), work with only those output queues by using a generic name in the OUTQ parameter. For example: WRKOUTQ OUTQ(*ALL/LANPRT*) |
2. | Select Option 8=Description next to each output queue in the list to see if the Remote system (RMTSYS) parameter is set to something other than *NONE and to see if the Connection type (CNNTYPE) parameter is set to *IP. If the RMTSYS parameter is *NONE, that output queue is not configured as a RMTOUTQ. If the CNNTYPE parameter is not set to *IP, it is configured as a RMTOUTQ but it is not using TCP/IP and will not have a TCP/IP address or host name. |
3. | If the CNNTYPE parameter is *IP, look at the value specified in the Remote system (RMTSYS) parameter. |
4. | If the RMTSYS parameter is set to *INTNETADR, look at the TCP/IP address specified in the Internet address (INTNETADR) parameter and record it. |
5. | If the RMTSYS parameter contains a host name, use the Verify TCP/IP Connection (VFYTCPCNN or PING) command to resolve the host name to a TCP/IP address and record it. |
Press F11=Display full
Copy/Paste or type the following:
CRTSRCPF FILE(QTEMP/QTXTSRC) and press <ENTER>
RTVCFGSRC CFGD(*ALL) CFGTYPE(*DEVD) SRCFILE(QTEMP/QTXTSRC) SRCMBR(PRINTERS) RTVOPT(*OBJ) and press <ENTER>
STRSQL and press <ENTER>
Press the Page Down key to get more space for typing/pasting the SQL commands:
To get the IP address from the device descriptions:
Copy/Paste or type the following:
create table QTEMP/work as (SELECT SRCDTA FROM QTEMP/QTXTSRC WHERE
(srcdta like '%DEVD%' and srcdta like '%DEVCLS(*LAN)%' and srcdta like
'%CRTDEVPRT%' ) or ( srcdta like '%RMTLOCNAME%' and srcdta not like
'%CRTDEVAPPC%' and srcdta not like '%CRTDEVHOST%')) with data
Copy/Paste or type the following:
SELECT cast( substr(A.srcdta, 16, position(')' in A.srcdta)-16)
as char(10)) as device, cast( substr(B.srcdta, position
('RMTLOCNAME('in B.srcdta)+12, position( ')' in substr(B.srcdta,
position('RMTLOCNAME(' in B.srcdta)+12, 50))-2)as char(50)) as
address FROM qtemp/work a, QTEMP/work b WHERE RRN(A) + 1 = RRN(B)
and A.srcdta like 'CRTDEVPRT%'
To get the IP addresses from remote output queue:
SELECT OUTPUT_QUEUE_NAME, OUTPUT_QUEUE_LIBRARY_NAME,
REMOTE_SYSTEM_NAME FROM QSYS2.OUTQ_DTL
WHERE NETWORK_CONNECTION_TYPE = '*IP'
*****************
An alternative would be to write a program that uses Application Programming Interfaces (APIs) to retrieve this information and output the results to a database file or a spooled file. The program must use a number of different APIs and commands including, but not limited to, the following:
o | Retrieve Output Queue Information (QSPROUTQ) API |
o | Retrieve Writer Information (QSPRWTRI) API |
o | Open List of Printers (QGYRPRTL) API |
o | Display Device Description (DSPDEVD) command |
o | Work with Output Queue (WRKOUTQ) command |
o | Using the Retrieve Configuration Source (RTVCFGSRC) command to retrieve the CL source statements for creating any *LAN 3812 printer device descriptions or *LAN IPDS printer device descriptions. |
o | Searching the Internet for any third-party or end-user utilities to retrieve the IP addresses for your printer device descriptions and Remote Output Queues (RMTOUTQs). |
o |
Submitting a Request for Enhancement to request that IBM i Development add an command or utility to a future version of IBM i that would provide and/or print a list of TCP/IP addresses used by RMTOUTQs and *LAN printer device descriptions.
For more information on submitting a Request for Enhancement: RFE (Request for Enhancement) for IBM i : http://www-01.ibm.com/support/docview.wss?uid=nas8N1015918
|
IBM i Knowledge Center
Information on Application Programming Interfaces (APIs) can be found via the API finder in IBM Knowledge Center:
Historical Number
29335725
Was this topic helpful?
Document Information
Modified date:
10 February 2020
UID
nas8N1016702