|
-----Message d'origine-----
De : rpg400-l-bounces@xxxxxxxxxxxx
[mailto:rpg400-l-bounces@xxxxxxxxxxxx] De la part de Vern Hamberg
Envoyé : mardi 4 août 2009 13:32
À : RPG programming on the IBM i / System i
Objet : Re: Global variable search
David
You do really need a change management system! Or a
cross-reference tool!
OK - I said it!
But since you don't, think about how things are defined in
RPG IV source. You will have to use a program to read through
each record of the source member. You know how to specify
different members to be processed, I know.
First, a prototyped main is going to have PR in a certain
position of D specs. So you have a test for a prototype. Then
the name will be the same as the program - it will be 10
characters and somewhere near the beginning of the D spec
with PR in the right place.
As to global variables, well, they are in D specs outside of
any subprocedures. As soon as you hit a P spec, you are done
working with global variables.
This is a quick think on the process - there are probably
other issues.
You might want to find any program-defined variables, if any
are still in use. Don't assume anything. Those defined in the
main procedure are global, I think. I don't remember whether
one can have program-defined variables in subprocedures -
haven't used such a variable in maybe a decade, at least.
HTH
Vern
David FOXWELL wrote:
Hi,having prototyped main procedures and then extract the global
Would anyone know of a way to extract a list of programs
variables from that program?
DSPMOD. I can get the programs I want from that, if the
We have a nightly updated file which is the product of
procedure name matches the module name and the programmer has
named the prototype that way. To see the global variables I'm
recompiling the source and reading the compiler listing.
--
Thanks.
This is the RPG programming on the IBM i / System i
(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.
As an Amazon Associate we earn from qualifying purchases.
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.