Menu

#84 STRPREPRC - Logging success to EVENTF

3.0
closed
nobody
None
2026-03-05
2020-02-21
No

Hey Thomas,

A long time ago, I modified STRPREPRC to support an in-house source versioning system, primarily to make it play nice with RDi/RDP/WDSC - whatever it was called back then.

In the years since then, STRPREPRC has some of the "issues" I added code for addressed. For example, >>MONMSG<< was something I needed to prevent pre/post CMDs that are "ok" to fail from stopping the compile.

Something I am not seeing added, or just have not found yet, is a way to log success messages. One perfect example of a success message you would want to see in the event file is the result of UPDSRVPGM. On my service programs, after creating the module, I run the update command on the service program. Ideally, I want to see a message added to the event file showing me that the command completed successfully.

Assuming it is not there, the approach I took was to log success messages as "Warnings" so that they would show up in the event viewer, even if the user had disables showing Informational Messages. Maybe a command option like VERBOSE(YES) to cause success messages to be added to the event file?

After a successful compile, my event viewer would show the result of any CMD, the creation command, and I also passed in messages from the source archival tool when promoting source from one box to another. In a glance you could see all of the steps preformed and the result.

What do you think?

Discussion

  • Thomas Raddatz

    Thomas Raddatz - 2020-02-23

    Hi David,

    I am always open for new and reasonable suggestions. So why not add a >>SNDMSG<< element, which is what you already did, right?

    Or do you have in mind to pick up success messages of IBM commands from the job log and append them as warnings to the event file.

    I am not sure of what you already did and of what you want me to do.

     
    • David Wright

      David Wright - 2020-02-24

      I hope you are doing doing well.  Been a few years since we have talked (I was at Chinese Laundry/Cels for a long time).

      Looking at what I had implemented (I do not have all of the old source), I can see that before running a command I would capture the last message key, then after the command I would scan for the completion message and append it to the EventF.

      So to answer your question directly, the idea is to grab the last message from each CMD run and add as a warning so it shows up in the Event Log of RDi.

      If you like, I can make changes myself and share with you once I have it working?  It was very useful to me and I think others would like it too.

      Right now, the version I am running is in the iSphere library.  I can work on a copy in another library to avoid it getting overridden.  One thing I am not seeing, but could swear I remember existing, is a way to change the default language for messages to English?

       

      Last edit: Thomas Raddatz 2020-02-24
      • Thomas Raddatz

        Thomas Raddatz - 2020-02-24

        David,

        I remember that we had been in touch a long time ago, but I do not remember the details. I am doing fine and I hope that the same thing is true for you.

        Did you notice that STRPREPRC can append the job log to the event file? Option *ADDJOBLOG does that trick. So basically everything you need should already be there. For example service program JOBLOG exports procedure JobLog_getNewest() to get the latest message from the job log.

        I am not sure which command parameter to use for adding the completion messages as warnings. New parameter VERBOSE or new option keyword? What do you think?

        You need to re-compile STRPREPRC for English if you want to get the messages in English. Go to the QSTRPREPRC source file and look for member A_INSTALL. Compile it and call the program like this:

        CALL PGM(A_INSTALL) PARM('*CURRENT' '&SF' '&LI' 'ENG' 'NO')

        Regards,

        Thomas.

         
        • David Wright

          David Wright - 2020-02-24

          Thanks Thomas.

          I should have time to play with it a little more tomorrow afternoon.  At first glance, the *ADDJOBLOG gets close.  It logs everything, which is a too much, and it did not seem to detect the UPDSRVPGM after the module creation.  In another source where i have commands creating qtemp files, nothing is logged there either.  I will let you know what I find.

          One question for you:  I see with ADDJOBLOG you have 00 severity messages showing, even though the Show Severity filter does not have Informational messages selected.  How did you manage that?  I had to use severity 10 to get them to show.  No biggie if no time to explain, I will dig in tomorrow and I am sure it will be more obvious then

           

          Last edit: Thomas Raddatz 2020-02-24
          • Thomas Raddatz

            Thomas Raddatz - 2020-02-24

            I cannot check it right now, but I think that I change the severity somewhere when writing 00 job log messages to the event file. It should be easy to find.

             
      • Thomas Raddatz

        Thomas Raddatz - 2020-02-24

        David,

        I remember that we had been in touch a long time ago, but I do not
        remember the details. I am doing fine and I hope that the same thing is
        true for you.

        Did you notice that STRPREPRC can append the job log to the event file?
        Option *ADDJOBLOG does that trick. So basically everything you need
        should already be there. For example service program JOBLOG exports
        procedure JobLog_getNewest() to get the latest message from the job log.

        I am not sure which command parameter to use for adding the completion
        messages as warnings. New parameter VERBOSE or new option keyword? What
        do you think?

        You need to re-compile STRPREPRC for English if you want to get the
        messages in English. Go to the QSTRPREPRC source file and look for
        member A_INSTALL. Compile it and call the program like this:

        CALL PGM(A_INSTALL) PARM('*CURRENT' '&SF' '&LI' 'ENG' 'NO')

        Regards,

        Thomas.

         

        Last edit: Thomas Raddatz 2020-09-06
  • Thomas Raddatz

    Thomas Raddatz - 2026-03-05
    • status: open --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB