Home > Ask the AS/400 Experts > iSeries Systems Management Questions & Answers > Retrieving output queue IP addresses
Ask The iSeries 400 Expert: Questions & Answers
EMAIL THIS

Retrieving output queue IP addresses

Glen H. Bunnell EXPERT RESPONSE FROM: Glen H. Bunnell

Pose a Question
Other iSeries 400 Categories
Meet all iSeries 400 Experts
Become an Expert for this site


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


>
QUESTION POSED ON: 11 March 2004
I need to write a CL program to obtain the IP addresses for all printers (LAN & RMTOUTQ) that we have on our system. The only OS command I can find is WRKOUTQD, but this does not allow output to *file and only one can be specified. I was wondering if there is an API I can call that does this.

>
There is a process that you can go through to create this information. I have an example CL available for you to use that will create an external file with all the information that you require. You will need to write an RPG program or query to retrieve the desired information. The following are the steps that you need to do in order to make the CL work properly:

1. Create a externally described physical file for use by the CL. Below are the field specifications that will be needed:

 

        *************** Beginning of data ** 
0001.00      A          R SPOOLTR           
0007.00      A              FILL1               1A 
0007.01      A              TEXT1          43A 
0007.02      A              OPTION       87A 
        ****************** End of data ***** 

2. Execute the following command:

DSPOBJD OBJ(QSYS/QGPL) OBJTYPE(*LIB) OUTPUT(*OUTFILE) OUTFILE(XXXX/DSPOBJ (replace the XXXX with the library that you want the information stored into.)

3. Create the following CL:

 
    PGM                                                 
                                                                  
              DCLF       FILE(XXXX/DSPOBJ)                       
                                                                  
              CLRPFM     FILE(XXXX/SPOOLT)                       
                                                                  
              DSPOBJD    OBJ(*ALL/*ALL) OBJTYPE(*OUTQ) +         
                           OUTPUT(*OUTFILE) OUTFILE(GLEN/DSPOBJ) 
 START:                                                           
                                                                  
              RCVF       RCDFMT(QLIDOBJD)                         
                                                                  
              MONMSG     MSGID(CPF0864) EXEC(GOTO CMDLBL(END))   
                                                                  
              WRKOUTQD   OUTQ(&ODLBNM/&ODOBNM) OUTPUT(*PRINT)     
                                                              
              CPYSPLF    FILE(QPDSPSQD) TOFILE(XXXX/HHHHHH) + 
                           SPLNBR(*LAST) MBROPT(*ADD)         
                                                              
            DLTSPLF    FILE(QPDSPSQD) SPLNBR(*LAST)     

              GOTO       CMDLBL(START)                         
                                                              
 END:         ENDPGM    

Replace the XXXX with the library name of where the object was created. Replace the HHHHHH with the name of the file that was created in step one.

4. Run the CL.

5. With the file created in step one, you can use an RPG program, iSeries query or even download the file and get all the necessary information that you need.

==================================
MORE INFORMATION ON THIS TOPIC
==================================

The Best Web Links: Tips, tutorials and more.

Ask your systems management questions--or help out your peers by answering them--in our live discussion forums.

Read this Search400.com Featured Topic: Managing your iSeries.

Ask the Experts yourself: Our systems management gurus are waiting to answer your technical questions.


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   



RELATED CONTENT
iSeries Systems Management
Transfer files from one environment to another without closing all other AS/400 sessions
Send a *LMSG successfully on AS/400 using the SNDDST command
Extend storage capacity on an IBM i without negatively effecting system performance
Configure the iSeries v5r4 to open the HTTPS port for incoming connections
Changing system CCSID
Changing user password expiration
Detecting system changes made by outside IP address
HIPER PTF installation and cover letters for SF99097
Library QUSRSYS not completely installed
SQL statement history storage

Performance
Will overloaded discs impact iSeries performance?
Extend storage capacity on an IBM i without negatively effecting system performance
Database drivers on the i: MySQL vs. IBM Toolbox
Performance tuning for IBM i: The basics and beyond
IBM releases new Power products for the midrange
Top System i admin tips for 2006
Catholic Charities keeps track of homeless with iSeries
i5 error messages: What you need to know
IBM races for clock speed
System shutting down after cleanup

iSeries system performance and monitoring
Analyze the health of your IBM i server with iScore
Translating Linux for IBM i admins: Working with jobs and networking
Database performance comparisons on IBM i
How to: Monitoring job activity on the AS/400
Performance tuning for IBM i: The basics and beyond
How to: Reduce the percentage of ASP used on the AS/400
Detecting system changes made by outside IP address
AS/400 system values quiz
Checking on System i disk space requires creating a new command: XRTVSYSSTS
Drive space management commands

RELATED GLOSSARY TERMS
Terms from Whatis.com − the technology online dictionary
CIW  (Search400.com)

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary



Search and Browse the Expert Answer Center
Search and browse more than 25,000 question and answer pairs from more than 250 TechTarget industry experts.
Browse our Expert Advice



iSeries Networking - Printing, Remote Access, TCP/IP
HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides technology professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective purchase decisions and managing their organizations' technology projects - with its network of technology-specific websites, events and online magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Site Map




All Rights Reserved, Copyright 1999 - 2009, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts