× 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.



As others have advised, QMQRY is the tool for reports. As for the number of
columns matching, I start with the query and create the output I want, then
run it at least once, saving the output from the F5 or F6 when you get it
right. Then I use F13 to work on the form, selecting column width, summary
options, level breaks, etc. From there I save both the form and qry with
the same name, and use STRQMQRY to run the query, after doing an override if
needed for reports wider than 80 columns. FYI you can pass parms with the
STRQMQRY command which makes it nice to produce specific reports from a more
generic query.

HTH

Jim

On Fri, Sep 30, 2011 at 11:04 AM, ADriver@xxxxxxxxxxxx <ADriver@xxxxxxxxxxxx
wrote:


Hi,

I'm trying to set up some audit reports using QMQRY but I'm having some
trouble with the output. Using a QMQRY with *SYSDFT as the QMFORM it chops
up the output into several spool files, which I don't want. If I try to
define a QMFORM it tells me the number of columns must match the number of
fields selected, which would mean I would have to create a form for each
query. I'm hoping to be able to just create one form and use it for a bunch
of queries. Is there any way to do this so it accepts any number of
fields/columns but leaves the printed output as one spool file?

BTW, I'm using QMQRY because of an error I can't work out if I use
RUNSQLSTM. I get the following error when I try:

5761SS1 V6R1M0 080215 Run SQL Statements
AUDSPECAUT 09/30/11 11:47:44 PAGE
Record *...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6
...+... 7 ...+... 8 SEQNBR Last change
1 SELECT UPUPRF, UPUSCL, UPPWON, UPPSOD, UPTEXT, UPSPAU FROM
2 WEADPD.USRPRFP WHERE UPSPAU <> '*NONE' AND UPUPRF NOT LIKE 'Q%'
* * * * * E N D O F S O U R C E * * * *
*
5761SS1 V6R1M0 080215 Run SQL Statements
AUDSPECAUT 09/30/11 11:47:44 PAGE
Record *...+... 1 ...+... 2 ...+... 3 ...+... 4 ...+... 5 ...+... 6
...+... 7 ...+... 8 SEQNBR Last change
MSG ID SEV RECORD TEXT
SQL0084 30 1 Position 1 SQL statement not allowed.

As you can see this is a very simple statement and if I just run the same
statement from a STRSQL screen it's fine. (I am running the RUNSQLSTM
command with *SQL naming too).

Does anyone has any ideas on either the error with RUNSQL or how to fix the
output for QMQRY without creating a form for each query?

Thanks in advance

Adam Driver
IBM Certified Systems Administrator - System i
Consultant - Infrastructure Technician
Exacta Corporation
608.661.6697 ext 2581
adriver@xxxxxxxxxxxx<mailto:adriver@xxxxxxxxxxxx>
Please consider your environmental responsibility before printing this
e-mail.



[Like us on Facebook!]<
http://www.facebook.com/#!/pages/WEA-Insurance-Trust/199543713420728>

- WEA Trust Confidentiality Notice -

This electronic mail message and any files transmitted with it are
confidential and are intended solely for the use of the individual or entity
to whom they are addressed. Dissemination, forwarding, printing, or copying
of this electronic mail without the consent of the sender is strictly
prohibited. If you are not the intended recipient or the person responsible
for delivering the electronic mail to the intended recipient, be advised
that you have received this electronic mail in error; please immediately
notify the sender by return mail.

--
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.




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-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.