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



Stand-alone select statements do not work with RUNSQLSTM...



From: "ADriver@xxxxxxxxxxxx" <ADriver@xxxxxxxxxxxx>
To: "midrange-l@xxxxxxxxxxxx" <midrange-l@xxxxxxxxxxxx>
Date: 09/30/2011 12:04 PM
Subject: SQL/QMQRY output question
Sent by: midrange-l-bounces@xxxxxxxxxxxx




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.

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.