Re: Suggestion for logging RPG program

Peter Dow <[email protected]>
Newsgroups gmane.comp.lang.as400.rpg
Message-ID <[email protected]>
How about ADDTRC? Here's the AI summary when googling for "when to use 
addtrc":

How to use|ADDTRC|

 1. *Start the debugger and trace:*
      * EnterSTRDBG
        <https://www.google.com/search?q=STRDBG&oq=when+to+use+addtrc&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQLhhA0gEIMzgzNWowajSoAgCwAgE&sourceid=chrome&ie=UTF-8&mstk=AUtExfDLRwl0gL6AFtZNlOtdzoyqppbWGFv3xkYJrTaaWK1n4xjvsON4ZDSFREVmEevZSI3yEZlIaH7ddCa2kaxRP-IZyP-on_mEdHa8kByeFKYDrPG7XfI1m8KKoT3y8Mg5Tgb4sJ41SMHrcv1ywIlbGyxVThIWA0cNcolJlxnGFJ15PhSpGJEUVCNjSTRFQrPJCvq7MGxy7m2QkQiaB--Ss1JdYR6ZLi3-ft_QCzR5zls1Vu4wWnE4KqESOvQ8UW9bL9r_wQcWNoR1Q_Ni-gDrCEtM&csui=3&ved=2ahUKEwiPor3ltPeQAxXoweYEHbQwD04QgK4QegQIBhAC>to
        start the debugger.
      * EnterADDTRC
        <https://www.google.com/search?q=ADDTRC&oq=when+to+use+addtrc&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQLhhA0gEIMzgzNWowajSoAgCwAgE&sourceid=chrome&ie=UTF-8&mstk=AUtExfDLRwl0gL6AFtZNlOtdzoyqppbWGFv3xkYJrTaaWK1n4xjvsON4ZDSFREVmEevZSI3yEZlIaH7ddCa2kaxRP-IZyP-on_mEdHa8kByeFKYDrPG7XfI1m8KKoT3y8Mg5Tgb4sJ41SMHrcv1ywIlbGyxVThIWA0cNcolJlxnGFJ15PhSpGJEUVCNjSTRFQrPJCvq7MGxy7m2QkQiaB--Ss1JdYR6ZLi3-ft_QCzR5zls1Vu4wWnE4KqESOvQ8UW9bL9r_wQcWNoR1Q_Ni-gDrCEtM&csui=3&ved=2ahUKEwiPor3ltPeQAxXoweYEHbQwD04QgK4QegQIBhAE>to
        begin tracing. You can specify statement ranges and program
        variables to track.
 2. *Run the program:*Let the program run for a short period to collect
    the trace data.
 3. *Stop the trace:*EnterRMVTRC
    <https://www.google.com/search?q=RMVTRC&oq=when+to+use+addtrc&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQLhhA0gEIMzgzNWowajSoAgCwAgE&sourceid=chrome&ie=UTF-8&mstk=AUtExfDLRwl0gL6AFtZNlOtdzoyqppbWGFv3xkYJrTaaWK1n4xjvsON4ZDSFREVmEevZSI3yEZlIaH7ddCa2kaxRP-IZyP-on_mEdHa8kByeFKYDrPG7XfI1m8KKoT3y8Mg5Tgb4sJ41SMHrcv1ywIlbGyxVThIWA0cNcolJlxnGFJ15PhSpGJEUVCNjSTRFQrPJCvq7MGxy7m2QkQiaB--Ss1JdYR6ZLi3-ft_QCzR5zls1Vu4wWnE4KqESOvQ8UW9bL9r_wQcWNoR1Q_Ni-gDrCEtM&csui=3&ved=2ahUKEwiPor3ltPeQAxXoweYEHbQwD04QgK4QegQIBhAH>to
    stop the trace from being collected.
 4. *View the data:*EnterDSPTRCDTA
    <https://www.google.com/search?q=DSPTRCDTA&oq=when+to+use+addtrc&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQLhhA0gEIMzgzNWowajSoAgCwAgE&sourceid=chrome&ie=UTF-8&mstk=AUtExfDLRwl0gL6AFtZNlOtdzoyqppbWGFv3xkYJrTaaWK1n4xjvsON4ZDSFREVmEevZSI3yEZlIaH7ddCa2kaxRP-IZyP-on_mEdHa8kByeFKYDrPG7XfI1m8KKoT3y8Mg5Tgb4sJ41SMHrcv1ywIlbGyxVThIWA0cNcolJlxnGFJ15PhSpGJEUVCNjSTRFQrPJCvq7MGxy7m2QkQiaB--Ss1JdYR6ZLi3-ft_QCzR5zls1Vu4wWnE4KqESOvQ8UW9bL9r_wQcWNoR1Q_Ni-gDrCEtM&csui=3&ved=2ahUKEwiPor3ltPeQAxXoweYEHbQwD04QgK4QegQIBhAJ>to
    display the trace data and analyze the results.
 5. *End debugging:*Finally, useENDDBG
    <https://www.google.com/search?q=ENDDBG&oq=when+to+use+addtrc&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQLhhA0gEIMzgzNWowajSoAgCwAgE&sourceid=chrome&ie=UTF-8&mstk=AUtExfDLRwl0gL6AFtZNlOtdzoyqppbWGFv3xkYJrTaaWK1n4xjvsON4ZDSFREVmEevZSI3yEZlIaH7ddCa2kaxRP-IZyP-on_mEdHa8kByeFKYDrPG7XfI1m8KKoT3y8Mg5Tgb4sJ41SMHrcv1ywIlbGyxVThIWA0cNcolJlxnGFJ15PhSpGJEUVCNjSTRFQrPJCvq7MGxy7m2QkQiaB--Ss1JdYR6ZLi3-ft_QCzR5zls1Vu4wWnE4KqESOvQ8UW9bL9r_wQcWNoR1Q_Ni-gDrCEtM&csui=3&ved=2ahUKEwiPor3ltPeQAxXoweYEHbQwD04QgK4QegQIBhAL>andENDSRVJOB
    <https://www.google.com/search?q=ENDSRVJOB&oq=when+to+use+addtrc&gs_lcrp=EgZjaHJvbWUyBggAEEUYOTIGCAEQLhhA0gEIMzgzNWowajSoAgCwAgE&sourceid=chrome&ie=UTF-8&mstk=AUtExfDLRwl0gL6AFtZNlOtdzoyqppbWGFv3xkYJrTaaWK1n4xjvsON4ZDSFREVmEevZSI3yEZlIaH7ddCa2kaxRP-IZyP-on_mEdHa8kByeFKYDrPG7XfI1m8KKoT3y8Mg5Tgb4sJ41SMHrcv1ywIlbGyxVThIWA0cNcolJlxnGFJ15PhSpGJEUVCNjSTRFQrPJCvq7MGxy7m2QkQiaB--Ss1JdYR6ZLi3-ft_QCzR5zls1Vu4wWnE4KqESOvQ8UW9bL9r_wQcWNoR1Q_Ni-gDrCEtM&csui=3&ved=2ahUKEwiPor3ltPeQAxXoweYEHbQwD04QgK4QegQIBhAM>to
    end the debugging session.

--
*Peter Dow* /
909 793-9050
[email protected]
/



On 11/14/2025 12:43 PM, gio.cot via RPG400-L wrote:
> Hi all
>
> How suggested from David Gibbs , i try to post here my question already
> posted in 'Midrange Systems Technical Discussion'  :
>
> Is there a way to log the program rpg operation like we obtain when for a
> CLP program we set the CHGJOB LOG(2 50 *MSG) ?
>
> I try better explain: when in clp program we run "CHGJOB LOG(2 50 *MSG) , in
> the job log we all command the are executed, with an RPG program can i
> obtain teh result ?
>
> Hope my question is clear   ..
>
> Thanks in advance
>
>   
>
-- 
This is the RPG programming on IBM i (RPG400-L) mailing list
To post a message email: [email protected]
To subscribe, unsubscribe, or change list options,
visit: https://lists.midrange.com/mailman/listinfo/rpg400-l
or email: RPG400-L-request-+hD5IHI5Xscn3HwCXmMcX9BPR1lH4CV8@public.gmane.org
Before posting, please take a moment to review the archives
at https://archive.midrange.com/rpg400-l.

Please contact support-FMtJrHiV//lnDLsaKlm4mFaTQe2KTcn/@public.gmane.org for any subscription related questions.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.