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



FWiW: Unless something has changed, the OUTFILE() support for the STRSQL interactive SQL utility still utilizes the Query/400 "report writer" *OUTFILE support to create and populate the named Output File. The Query/400 utility creates a non-SQL externally described database file from the Record Format of the query request; i.e. the *FILE that is created is not a SQL TABLE.

Also FWiW: Be aware that such files created by the ad-hoc utilities [Query/400 or STRSQL] should not be used in production; i.e. a *FILE should be created from DDL or DDS, foremost to have source available from which to create them, and secondly because the formats created from the internal query have a long history of being problematic.

Regards, Chuck

On 26-Mar-2012 13:33 , Peter Dow wrote:

In addition to Rob's method, and if by "an interactive SQL session"
you meant you did STRSQL at a command line, then trying pressing
F13, then option 1 to change session attributes. The 2nd "session
attribute" is where the output of your SELECT statements go; a 3
there will let you specify a library/file and member.

On 3/26/2012 1:24 PM, Buzz Fenner wrote:
I'm really digging being able to assemble multiple WITH/AS clauses
with a SELECT statement to return results in an interactive SQL
session, but I'm being asked to populate a table with the results.
Short of using my debugged

SQL code in an RPG program to write the output (can I even do
that?) to a file, is there an easy and/or elegant way to do what I
need?

From what I'm gleaning from the SQL manual, it doesn't seem that
SELECT output can be directed to a file.


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.