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.

>
EXPERT RESPONSE
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
SQL statement history storage
Setting up an automatic reply in the system reply list
Clearing physical member file records
Drive space management commands
Group PTFs
i5/OS defect when submitting a CHGPF command to an existing physical file
Get descriptive headers in Excel tables when transferring data
How do I retrieve the source for an output queue description to put in to a CL program?
Is there a way to get and modify the source for QDSIGNON2?
Configuring the iSeries to send email

Performance
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
What is the relationship between QZDAOSINIT jobs and QDBSRVnn tasks?
Performance degradation
Top admin tips of 2005
Tuning the auto-tuner
Readers respond to Fast400 settlement

iSeries system performance and monitoring
Checking on System i disk space requires creating a new command: XRTVSYSSTS
Drive space management commands
Viewing netstat information
IBM System i APIs at Work, Second Edition -- Chapter 10
System i's future in your shop
Top System i admin tips for 2006
System i virtualization prevents T-Mobile busy signal
Just how invincible is the iSeries (AS/400)?
System i revenues slide
i5 error messages: What you need to know

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

HomeNewsTopicsITKnowledge ExchangeTipsBlogsAsk the ExpertsMultimediaWhite PapersProducts
About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




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