|
Frank Coleman wrote a utility to produce such a list by reading the source
code.
He does pop up on this list occasionally - you may see if he still has the
code, I think it will do what you want at a static source level.
If programs are chosen by dynamic library list changes as Buck suggests
then nothing will provide that list.
Cheers
Don
From: "Buck Calabro" <kc2hiz@xxxxxxxxx>
To: "RPG programming on IBM i" <rpg400-l@xxxxxxxxxxxxxxxxxx>
Date: 19/06/2023 08:39 PM
Subject: Re: Sql query to find whole call stack of programs
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxxxxxxxx>
tim wrote:
i tried this 'SELECT * FROM
TABLE(QSYS2.STACK_INFO('123456/JOBNAME/JOBUSER')) based on the job( by
mentioning its corresponding job details) which ended in the system few
days back but this command ended in error with message id 'CPF503E'. "An
error occurred while invoking the associated program or service program
.........in library QSYS with error code 1- "the external program or
service program returned SQLSTATE 42704. The text message returned from
the
program is : job (my job details) NOT FOUND".
Right. That's because the call stack only exists during the time that
the programs are actually being executed. Once the job ends, there is
no call stack to look at.
The operating system itself does not know that PGMA calls PGMB, and
I'm not sure there's any way for it to know that. Imagine the
situation where you have PGMB in three separate libraries. Each
version of PGMB does something slightly different - perhaps it
calculates taxes based on region. The library list is changed
dynamically at runtime. How could the operating system know from a
compiled PGMA /which specific/ PGMB got called during job 123456?
I agree with Daniel that if there's no analysis tooling at your
workplace, you will either need to analyse the job by hand (starting
at the top CALL in the job log) or write your own tooling.
--buck
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
--
This email has been scanned for computer viruses. Although MSD has taken
reasonable precautions to ensure no viruses are present in this email, MSD
cannot accept responsibility for any loss or damage arising from the use of
this email or attachments..
--
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: RPG400-L@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.
Please contact support@xxxxxxxxxxxxxxxxxxxx for any subscription related
questions.
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.