Jay,
You could also just use what comes "built-in" to the OS ...
DSPPGMREF library/*all OBJTYPE(*ALL) + OUTPUT(*OUTFILE) OUTFILE(QTEMP/library)
Then use SQL to query that "outfile" to find all objects that use the file in question, e.g.:
SELECT * FROM QTEMP/library
WHERE WHFNAM = 'fieldname'
You can narrow the search to only those programs that open the file for "Output" or "Update"... e.g.:
SELECT * FROM QTEMP/library
WHERE WHFNAM = 'fieldname' AND WHFUSG > 1
That should narrow down your search to a finite list of programs.
Then, you can look at the cross-reference at the end of the compiler listings for those programs to see what programs "update" the field in question.
Then, you can use RDi or even SEU to browse the source for those programs, and use the Find command to search for the field name in question, to see every place in the source that "touches" that field.
You could also use the ILE debugger to set a "watch" on that variable, and then run the program under debug, to step through the code to observe when that field is modified, and see the relevant lines of code.
Finally, you could use FNDSTRPDM as a "poor man's impact analysis tool" by running, e.g.:
FNDSTRPDM STRING('fieldname') FILE(library/QRPGLESRC) MBR(*ALL) + OPTION(*NONE)PRTMBRLIST(*YES) PRTRCDS(*ALL)
That will generate two spool files; the first listing will show all of the source member names that contain or refer to the given field name, and the second listing will show every line of code that contains a "match."
HTH,
Mark S. Waterbury
On Monday, December 10, 2018, 10:17:23 AM EST, Jay Vaughn <jeffersonvaughn@xxxxxxxxx> wrote:
So being in the legacy world for 20+ years and working with ancient
cobol/rpg code that a single pgm can span 10k+ lines of code, I still have
not found an efficient way to answer clients requests of "how is the data
arrived at in this table/column?" Aside from a whole lot of time, effort
and grunt work.
How do others handle these requests?
As an Amazon Associate we earn from qualifying purchases.
This thread ...
Re: how is data arrived at in this table/column?, (continued)
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.