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



So, in programs that do a dynamic SQL, would it be of value to place a simple "dummy" (but well documented) static statement that simply selects all records of the file(s) that would be dynamically used elsewhere later, just to get the PRTSQLINF to recognize that the file is used in the program.

Kind of hokey, but a trick used often in "do while 1 = 2" code to perform similar functions... which elude me right now for examples.

I wouldn't typically suggest excess code, but I understand Jeff's dilemma. It's similar to trying to find all the QRY400s that use files or fields.

Of course the alternate would be a well-documented change management system.

Duane


-----Original Message-----
From: RPG400-L [mailto:rpg400-l-bounces@xxxxxxxxxxxx] On Behalf Of MichaelQuigley@xxxxxxxxxx
Sent: Friday, June 10, 2016 3:45 PM
To: rpg400-l@xxxxxxxxxxxx
Subject: Re: Files used by SQL in RPGLE

"RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx> wrote on 06/10/2016 01:00:05
PM:
----- Message from MARK GOLDEN <mark_golden@xxxxxxxxxxxxxxx> on Fri,
10 Jun 2016 16:54:04 +0000 (UTC) -----

To:

"RPG programming on the IBM i (AS/400 and iSeries)"
<rpg400-l@xxxxxxxxxxxx>

Subject:

Re: Files used by SQL in RPGLE

Hi John,
Try the PRTSQLINF command. See if that gives you what you need.
R,Mark.

PRTSQLINF will give you the files used for static SQL. If you're using dynamic SQL all it will give you is the fact that you're preparing a statement from a host variable. Someone will have to analyze what can be in the host variable at the time of the prepare.

This is another gotcha in addition to the performance implications of dynamic SQL.

Michael Quigley
Computer Services
The Way International
www.TheWay.org
--
This is the RPG programming on the IBM i (AS/400 and iSeries) (RPG400-L) mailing list To post a message email: RPG400-L@xxxxxxxxxxxx To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives at http://archive.midrange.com/rpg400-l.

Please contact support@xxxxxxxxxxxx for any subscription related questions.

________________________________
________________________________
CONFIDENTIALITY NOTICE: This electronic message transmission is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. If you have received this transmission, but are not the intended recipient, you are hereby notified that any disclosure, copying, distribution or use of the contents of this information is strictly prohibited. If you have received this e-mail in error, please contact NALC Health Benefit Plan at 703-729-4677 and delete and destroy the original message and all copies.





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.