Well, since a dynamically prepared SQL statement is not known to the compiler, there is no way to register any file resource to that program. This is one reason to avoid dynamically prepared sql.

Eric

-----Original Message-----
From: midrange-l-bounces@xxxxxxxxxxxx
[mailto:midrange-l-bounces@xxxxxxxxxxxx]On Behalf Of David FOXWELL
Sent: Monday, March 03, 2008 8:06 AM
To: MIDRANGE-L@xxxxxxxxxxxx
Subject: DSPPGMREF and SQLRPG


Hi,

We are also currently interested in SQL in our RPG programs.

Can anyone explain this, please.

EXEC SQL
SELECT COUNT ( * ) INTO : wVar
FROM FILE_X;

DSPPGMREF indicates that the program uses FILE_X but gives no information as to its record format.



wSQL = 'SELECT COUNT ( * ) FROM FILE_Y'
EXEC SQL
PREPARE S1 FROM : wSQL;

DSPPGMREF gives no indacation that the program uses FILE_Y.


Does this mean we can no longer depend upon DSPPGMREF to find the programs impacted by a changed PF?

TIA.

This thread ...

Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2019 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].