× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



On 26-Jul-2010 13:43, Jerry Adams wrote:
Is there a way to get a list of the *QRYDFN objects that use a
printer? I have a couple of utilities from the trade mags that
will list the database files, but none that includes the printer
files.

This is a quick and dirty one-off so I'm looking for something
to an outfile, but an API will be acceptable.


The query definition choice of output device\type is a run-time attribute which can be specified, possibly with duplicity, in the *QRYDFN object. A query definition may be defined to have both *OUTFILE and *PRINTER defined, yet saved having as its default run-time effect of OUTTYPE(*DISPLAY); it is the RUNQRY that decides the run-time device, which may or may not use OUTTYPE(*RUNOPT) to extract the output device at run-time from the saved *QRYDFN object.

Thus more specific clarification is required, for how one chooses to define what is meant by "use a printer". Perhaps only queries that are saved with and defaulted to have *RUNOPT of 2=Printer, or any query that has any non-default attribute defined for the 2=Printer details?

A processor such as the RTVQRYF or similar features that can /interpret/ the layout of the *QRYDFN space object could show if the 2=Printer is the stored choice from the "Select Output Type and Output Form" panel, and what the value in the "Printer" field was. There is also a very lame excuse for an API to effect something similar to the "6=Print [Query Definition]" feature of WRKQRY that IBM produced in order to let QU2 retrieve some additional details of a *QRYDFN object; although I could not fix the glaring stupidity in its implementation, I believe my code changes which prevent corrupting the *QRYDFN object should gotten into the OS. Since the API uses the run-time print definition feature, and since I do not recall all of the details of how I corrected the invocation of the Query/400 run-time from that API, I do not recall if the API prints only the *RUNOPT output type details or if details about all three [effectively just the two non-display] are spooled.

Regards, Chuck

As an Amazon Associate we earn from qualifying purchases.

This thread ...


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

This mailing list archive is Copyright 1997-2024 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.