I believe I understand what you are asking. I just cannot see where I'd
ever use that technique. And I think any "Idea" request would get shot
down.
I think the alternative might be an external data structure based off of an
appropriate view.


On Fri, Mar 21, 2025 at 4:09 PM x y <xy6581@xxxxxxxxx> wrote:

Instead of SELECT * or listing every column name, I'd like to put the
column names in a source member and "include" it in the main SQLRPGLE
compile. The source members are machine-generated; I'm doing this to
reduce the maintenance workload.

"from_src" is "a,b,c". "into_src" is ":a,:b,:c".

INCLUDE works with SELECT:
SELECT
INCLUDE from_src
INTO...

but the preprocessor won't accept
INTO
INCLUDE into_src
WHERE...

The error is SQL0104 and the preprocessor is looking for a comma or an
INTO. I have my INCFILE set correctly.

Using
FETCH NEXT FROM THIS_CURSOR INTO
into_src...

INCLUDE is tagged as a variable not found.

Am I missing something other than using dynamic SQL? It's just a reminder
of how incredibly productive DDS is!
--
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@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.



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