Thank you everyone .... So far. You've proved once again you guys are a group I'm proud to be part of.

Get Outlook for Android<https://aka.ms/AAb9ysg>
________________________________
From: Rob Williams <qpgmr400@xxxxxxxxxxxxxxx>
Sent: Tuesday, February 10, 2026 7:53:25 PM
To: 'Midrange Systems Technical Discussion' <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: Michael Mayer <michael.mayer@xxxxxxxxxxxxx>
Subject: RE: WRKQRY question ...

Hi Michael,

Take a look at the following IBM document on extracting information from
*QRYDFN's.

https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ibm.com%2Fsupport%2Fpages%2Fextract-information-qrydfn-object-types&data=05%7C02%7Cmichael.mayer%40ermco-eci.com%7C5318d6edd4c14e85ea8908de6907f86a%7Cd2deeaf270e4425c91d7d99d784e89d6%7C0%7C0%7C639063680157089094%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=qY5bph4u3VaI7Lkb53jex9mIhDHrdmqblYSCyq8N0bs%3D&reserved=0<https://www.ibm.com/support/pages/extract-information-qrydfn-object-types>

It will allow you to automate the printing of the Query Definition (option 6
from WRKQRY).

You will still need to copy the spooled file to a PF, then query it with SQL
to extract the output type and printer. But that should be a rather simple
task to do in a small program.

It should be much easier than manually placing a '6' by each query in
WRKQRY.,

I'm not sure about *QMQRY's.

Rob W.

-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of
Michael Mayer via MIDRANGE-L
Sent: Tuesday, February 10, 2026 2:47 PM
To: Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: Michael Mayer <michael.mayer@xxxxxxxxxxxxx>
Subject: WRKQRY question ...

Good day all. I happened to run into a developer conversation today about
the WRKQRY command that I found interesting. These guys were trying to
figure out if there was a way to kick out all wrkqry's and QM query's to an
outfile and then be able to run a query over the outfile to show the WRKQRY
printer device.

I ran this and couldn't find it.
DSPOBJD OBJ(QGPL/ECOPENORDS) OBJTYPE(*QRYDFN *QMQRY) DETAIL(*SERVICE)
OUTPUT(*OUTFILE) OUTFILE(QRYLIB/TESTFILE).

My mind went blank trying to figure it out. Maybe an SQL could pull that
info out but I'm not sure what to run.

I see it if I print out a WRKQRY definition - sample below:

Selected output attributes
Output type . . . . . . . . . . . . . . Printer
Form of output . . . . . . . . . . . . Summary only
Line wrapping . . . . . . . . . . . . . No Printer Output
Printer device . . . . . . . . . . . . ABCD1234 *---------
Report size
Length . . . . . . . . . . . . . . . 66 (default)
Width . . . . . . . . . . . . . . . . 132

The IBM i community is amongst the smartest group of creative people I know
of.
Any idea's to jumpstart my brain would be appreciated.
MM


Respectfully,
Michael Mayer
INFOR Junior LN ERP Administrator
IBM i on Power System Admin
ERMCO-ECI
2225 Industrial Rd
Dyersburg, Tennessee 38024
Cell, Office and Text Messages: 518.641.8906
Email: michael.mayer@xxxxxxxxxxxxx<mailto:michael.mayer@xxxxxxxxxxxxx>
https://www.ermco-eci.com<https://www.ermco-eci.com/>
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fermcopower.com%2F&data=05%7C02%7Cmichael.mayer%40ermco-eci.com%7C5318d6edd4c14e85ea8908de6907f86a%7Cd2deeaf270e4425c91d7d99d784e89d6%7C0%7C0%7C639063680157113356%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=2%2B%2F862L38X3OyCBluvSA7AraL9%2BrzUnDXgINHpZ8KcU%3D&reserved=0<https://ermcopower.com/>
IBM i Award Winning Blog Site:
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fibmireference.blogspot.com%2F&data=05%7C02%7Cmichael.mayer%40ermco-eci.com%7C5318d6edd4c14e85ea8908de6907f86a%7Cd2deeaf270e4425c91d7d99d784e89d6%7C0%7C0%7C639063680157130328%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=41cNqIIygB4HzhbC8dlQpafgrlcsTqLoHdh2Q7eOx3c%3D&reserved=0<https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Fibmireference.blogspot.com%2F&data=05%7C02%7Cmichael.mayer%40ermco-eci.com%7C5318d6edd4c14e85ea8908de6907f86a%7Cd2deeaf270e4425c91d7d99d784e89d6%7C0%7C0%7C639063680157147299%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=nzHAI0lDqyGzJhocuKccu2Vpa0x2q9htJkGD8jiwZ5o%3D&reserved=0><https://ibmireference.blogspot.com/>
Awarded IBM 2024/2025 Advocate, Contributor, Influencer and IBM i Ready
Badges.
[cid:image001.jpg@01DC9AAC.27BC0C40]



--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxxxxxxxx To subscribe,
unsubscribe, or change list options,
visit: https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.midrange.com%2Fmailman%2Flistinfo%2Fmidrange-l&data=05%7C02%7Cmichael.mayer%40ermco-eci.com%7C5318d6edd4c14e85ea8908de6907f86a%7Cd2deeaf270e4425c91d7d99d784e89d6%7C0%7C0%7C639063680157162657%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=CDz5bKjsHTjFA8UJVbEdjrPn2hFAORqyC0VU%2BXQcbO4%3D&reserved=0<https://lists.midrange.com/mailman/listinfo/midrange-l>
or email: MIDRANGE-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives at
https://nam12.safelinks.protection.outlook.com/?url=https%3A%2F%2Farchive.midrange.com%2Fmidrange-l&data=05%7C02%7Cmichael.mayer%40ermco-eci.com%7C5318d6edd4c14e85ea8908de6907f86a%7Cd2deeaf270e4425c91d7d99d784e89d6%7C0%7C0%7C639063680157178340%7CUnknown%7CTWFpbGZsb3d8eyJFbXB0eU1hcGkiOnRydWUsIlYiOiIwLjAuMDAwMCIsIlAiOiJXaW4zMiIsIkFOIjoiTWFpbCIsIldUIjoyfQ%3D%3D%7C0%7C%7C%7C&sdata=nrsrw0A2HUDKjAduvpM4tZoB9P2Rq3YzZpFTDOhzLjg%3D&reserved=0<https://archive.midrange.com/midrange-l>.

Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.

.

As an Amazon Associate we earn from qualifying purchases.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.