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



I like to use external data structures with a 'qualified template' to give
me fields to reference for my cursor fields. This makes sure that
DSPPGMREF picks it up, and gives me a nice way to have external fields
define my internal fields so they always match on the fetch.


So, it might look like this

D IIM_t E DS extname(IIM) qualified template
D C1 DS qualified
D Part like(IIM_t.IPROD)
D Qty like(IIM_t.IONH)



___________________________________
Darren Strong
Dekko
Phone 260-599-3570
Fax 260-599-3215




From: Jeff Young <jyoung0950@xxxxxxxxx>
To: "RPG programming on the IBM i (AS/400 and iSeries)"
<rpg400-l@xxxxxxxxxxxx>
Date: 06/13/2016 12:40 PM
Subject: Re: Files used by SQL in RPGLE
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx>



Booth,
I am using RDi, and have been using it and its predecessors since it first
came out.
I think it is the best thing since SEU was first introduced on the AS/400
release 2 (before that they had EDTSRC which was a PITA) :).
What I need to be able to do is find all programs using a file without
having to search all possible source. Normally, with RLA and Static SQL,
this is available via DSPPGMREF. With Dynamic SQL, this information is not
available.
The question for the list was basically what would be the best way to get
this information.
The 2 main solutions that I came up with were adding dummy "F" specs with
USROPN or defining external DS referencing the file name.



Jeff Young
Sr. Programmer Analyst

On Mon, Jun 13, 2016 at 8:42 AM, Duane Scott <dscott@xxxxxxxxxxx> wrote:

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.




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

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




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.