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



Paul

There is no option for output for SELECT statements, because SELECT statements are not allowed in RUNSQLSTM. I've asked innumerable times for this to be added, but IBM are not going to do it. I really disagree with this but see no change coming.

If you want to run a SELECT with output to printer or display, get one of the commands we in the wild have written that are using Query Management - they usually end up using STRQMQRY, which has an OUTPUT parameter.

I have one, and I'm giving a presentation at COMMON this year on using Query Management, as well as a lab. I think Buck Calabro has one, I kind of recall that I based mine on his some many years ago. These often use a *QMQRY object that has a "statement" that is a single substitution variable for the entire statement.

Google for RUNSQL (not the new IBM command) or EXCSQL, you should find something.

Cheers
Vern

On 3/27/2019 7:43 AM, Steinmetz, Paul via MIDRANGE-L wrote:
Thanks Rob and Paul.
Great article/link.

Question
How do specify/change the output options when running RUNSQLSTM SRCSTMF('/...')?

I'm not seeing the output options
SELECT output . . . . . . . . 1 1=Display, 2=Printer 3=File

Paul


-----Original Message-----
From: MIDRANGE-L [mailto:midrange-l-bounces@xxxxxxxxxxxxxxxxxx] On Behalf Of Rob Berendt
Sent: Tuesday, March 26, 2019 12:02 PM
To: Midrange Systems Technical Discussion
Subject: RE: Storing SQL script options

RUNSQLSTM SRCSTMF('/...')

But I also suggest reading this article:
http://ibmsystemsmag.com/ibmi/administrator/systemsmanagement/create-your-own-templates/


-----Original Message-----
From: MIDRANGE-L <midrange-l-bounces@xxxxxxxxxxxxxxxxxx> On Behalf Of Steinmetz, Paul via MIDRANGE-L
Sent: Tuesday, March 26, 2019 11:54 AM
To: 'Midrange Systems Technical Discussion' <midrange-l@xxxxxxxxxxxxxxxxxx>
Cc: Steinmetz, Paul <PSteinmetz@xxxxxxxxxx>
Subject: Storing SQL script options

I've just recently started using the ACS "Run SQL Scripts".
I'm looking at the various options available for storing SQL statements, some for IBM i catalog tables and views.
My initial option was to create a source member in our source library for each SQL script.
With the 10 character limit, I'm finding it difficult to have meaning names for these scripts.

What methods are others in the group using to store SQL scripts?

Thank You
_____
Paul Steinmetz
IBM i Systems Administrator

Pencor Services, Inc.
462 Delaware Ave
Palmerton Pa 18071

610-826-9117 work
610-826-9188 fax
610-349-0913 cell
610-377-6012 home

psteinmetz@xxxxxxxxxx
http://www.pencor.com/

--
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://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://archive.midrange.com/midrange-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

Help support midrange.com by shopping at amazon.com with our affiliate link: https://amazon.midrange.com


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
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.