× 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, David:

The proposed approach would virtually guarantee that you MUST recompile ALL programs that use a particular table or view via SQL, every time the table or view is changed in any way. :-o This negates one of the benefits of SQL over native I/O.

Many others on these lists have previously recommended against doing a "select * ..." in embedded SQL. And I concur.
Consider the way SQL does the checking column-by-column for each row at runtime. When you have a table or view with many columns, and you do a "select *" then you are requiring additional overhead because SQL (via the preprocessor generated code and runtime routines) must do checking and conversion, column-by-column, for each row, at runtime, for EVERY column in the table or view, even when your program actually only uses a few of those columns! :-o

Hope that helps,

Mark S. Waterbury

> David FOXWELL wrote:
Thanks very much to Mark for your considerable time which I hope will benefit many others on the list apart from myself.

We do select the individual columns when imbedding SQL.

But, given that the field analysis must be made anyway, and if the host receptor structure is impacted by the change the sourc modified, dare I say this : ? Why not systematically specify SELECT *, create the host structure based on an external file and systematically recompile the whole kit and keboodle?

<Hesitating before clicking the send button and going home for the weekend>





-----Message d'origine-----
De : midrange-l-bounces@xxxxxxxxxxxx [mailto:midrange-l-bounces@xxxxxxxxxxxx] De la part de rob@xxxxxxxxx
Envoyé : vendredi 7 novembre 2008 15:44
À : Midrange Systems Technical Discussion
Objet : Re: Homegrown CMS and SQLRPG(LE)

The question boils down to "Why do you care - if you are using SQL?"
1 - Never use "select *". Always select the individual columns when imbedding SQL.
2 - If you use an externally defined data structure you should be ok with a recompile. Like fetch mycol1, mycol2 into :myExtDs.mycol1, :myExtDs.mycol2 ...
Now, you just have to figure out the reference on externally defined data structures. Do they show up on DSPPGMREF?

Rob Berendt
--
Group Dekko Services, LLC
Dept 01.073
Dock 108
6928N 400E
Kendallville, IN 46755
http://www.dekko.com





From:
David FOXWELL <David.FOXWELL@xxxxxxxxx>
To:
Midrange Systems Technical Discussion <midrange-l@xxxxxxxxxxxx>
Date:
11/07/2008 04:30 AM
Subject:
Homegrown CMS and SQLRPG(LE)
Sent by:
midrange-l-bounces@xxxxxxxxxxxx



Hi,

Starting a new thread, the last on handling views was short-lived. Vern, thanks, I've saved your input for when we get started on that issue.

Our "CMS" will automatically recompile all modules and programs if a file changes and that file is referenced in a program. By using DSPPGMREF. Of course, in an SQLRPG, this doesn't work. Would anyone like to share how they are dealing with this problem?

Maybe this should be on the RPG list?

Thanks.
--
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: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.



--
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: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx Before posting, please take a moment to review the archives at http://archive.midrange.com/midrange-l.


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.