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



Hi John

I was talking about the services that return the status of jobs, journals,
system status etc.

I actually ended up using Python to do this on a PC; we run some SQL
statements, capture the output to CSV and then use python to produce
reporting spreadsheets.

An approach where I run an arbitrary SQL statement like SELECT A,B,C FROM
MYLIB/MYTABLE and the output is thrown into a csv file for me should not be
that hard to do; I should not have to build all the individual pieces.
I know lots of ways I can do it, but I would love to just be able to store
the name of the output .csv file in a command, specify a SQL string or
input file/script and then run a command or SQL statement and have it just
run; then I could automate emailing the file or doing something else with
it.

I suppose I could write a stored procedure and for any specific data that I
really have to produce csv or other output for then I would do that, but
for a one off ... it is more work than it should be. it might be my
knowledge of stored procedures but I can't quite think of a way to make it
as general as I would like to deal with scenario as above. No problems
where I have a repeated requirement that justifies it.

Maybe I will try again and see what I can do myself, but I feel like this
utility should "just be there".


On Thu, Sep 20, 2018 at 3:38 PM John Yeung <gallium.arsenide@xxxxxxxxx>
wrote:

On Wed, Sep 19, 2018 at 7:31 PM Evan Harris <auctionitis@xxxxxxxxx> wrote:

it ought to be dead simple to run any random SQL statement - including
SQL
Service statements - and have it create a .csv file

What's an "SQL Service" statement?

I've been following this thread as I still would like to be able to
execute
SQL statements by putting them in a source file and then running a
plug-in
to produce a csv.

That's different than what OP has stated that he wants, but what you
want is pretty easy to do with Python. Well, it wouldn't be a plug-in,
but it could be made to be about as convenient to use as a plug-in.

Every solution I've seen so far (and I could well be missing something)
requires me to create a temporary file, or a stored procedure or has
restrictions on the SQL statements that can be run.

I think a stored procedure would be a good approach. What don't you
like about that idea?

John Y.
--
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: https://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
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: http://amzn.to/2dEadiD




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.