Find OUTQ’s without an associated printer device

15 pts.
OUTQ management

We just completed a major system-i consolidation, and I need to generate a list of all outq in a particular library which do not have an associated printer DEVD.  We are trying to clean up the system.

We had quite a number of OUTQ in QUSRSYS without an associated printer, and those didn't restore to the new system.  We have the old libs from the old systems, and those contain all the outq.

How do I get a list of OUTQ without an associated printer in LIBA?

Thanks in advance!


Software/Hardware used:
i5OS V5R4M0 system-i 550

Answer Wiki

Thanks. We'll let you know when a new response is added.

<i>SQL:</i> DELETE FROM prt WHERE not ODOBAT like ‘%PRT%’
<i>SQL:</i> SELECT * FROM outq a WHERE a.ODOBNM [not] in (SELECT b.ODOBNM FROM prt b)</pre>
That uses DSPOBJD to create a file of all device descriptions. I named my example file PRT and put it in QTEMP. I then used interactive SQL to DELETE all devices that were not any kind of printer.

And it uses DSPOBJD again to create a file of all *OUTQs. (In my case, I chose all *OUTQs in my library list. You can set a library if you wish.) I named that file OUTQ and created it also in QTEMP. I then used interactive SQL to SELECT all *OUTQs from the file that had a matching *DEVD object name in the previous PRT file. You could insert the [not] operator if you wanted to list *OUTQs that <i>did not have</i> a matching *DEVD.

That’s one basic outline of a possible procedure you could follow.


Discuss This Question: 3  Replies

There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.
  • BruceU
    Tom - Thanks much for the information (and the code). I'll use it for all 19 sites which are now consolidated. One more 520 to wipe and deliver to IBM, and we can get on to configuring 6500 users, all the secuirty, etc etc ad infinitum. Thank you again. Bruce
    15 pointsBadges:
  • TomLiotta
    @Bruce: There are numerous possible ways. I would personally use appropriate APIs and significantly more detailed code. But the question was fairly basic, so it seemed that a basic sample of an overall method seemed best. If any details beyond that (very) basic approach is needed, ask away. Tom
    125,585 pointsBadges:
  • TomLiotta
    BTW, it's very likely a good thing to have a number of outq's that are not associated with printers. At least some of them are explicitly intended not to be associated. Tom
    125,585 pointsBadges:

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

Thanks! We'll email you when relevant content is added and updated.


Share this item with your network: