IBM i Global

IBM i Global

Connect, learn, share, and engage with IBM Power.

 View Only
Expand all | Collapse all

How to find which program is using specific command

  • 1.  How to find which program is using specific command

    Posted Thu December 26, 2024 02:31 PM

    Hi ,

    Apart from find string, we wanted to check how to find programs/jobs using one specific command. There is one third party vendor command our processes uses and we are not going to use that henceforth. We have changed our programs to not to use that command however still it's use date is changing monthly. So not sure how to check it.  Could you please help. Thank you! 



    ------------------------------
    Ujwala Kavathekar
    ------------------------------


  • 2.  RE: How to find which program is using specific command

    Posted Thu December 26, 2024 08:45 PM

    Dear Ujwala

    You can start audit journaling just on that particular command object to see which jobs access it.  More details here: Planning the auditing of object access at https://www.ibm.com/docs/en/i/7.4?topic=auditing-planning-object-access         



    ------------------------------
    Satid S
    ------------------------------



  • 3.  RE: How to find which program is using specific command

    Posted Thu December 26, 2024 08:54 PM
    Edited by Satid S Thu December 26, 2024 08:58 PM

    Some more useful reference info on IBM i object access auditing:  

    Tracking Access to Your Sensitive Files By Dan Riehl at https://www.securemyi.com/nl/articles/objaud.html                    

    Auditing and Reporting the Use of CL Commands By Dan Riehl at  https://www.securemyi.com/nl/articles/cmdaudit.html    



    ------------------------------
    Satid S
    ------------------------------



  • 4.  RE: How to find which program is using specific command

    Posted Fri December 27, 2024 08:45 AM

    You could also use the QIBM_QCA_RTV_CMD exit point to register a program to get control when a command is used.

    https://www.securemyi.com/articles/artcmdexit2.htm



    ------------------------------
    Barbara Morris
    ------------------------------



  • 5.  RE: How to find which program is using specific command

    Posted Mon December 30, 2024 10:04 AM

    Hello
    Besides object auditing and RTV_CMD exit point, you may want to try PRTCMDUSG command. However, I believe that its output does not include commands called through QCMDEXC API and SQL function.



    ------------------------------
    Marc Rauzier
    ------------------------------



  • 6.  RE: How to find which program is using specific command

    Posted Tue December 31, 2024 08:43 AM

    Have you considered something like this:  Create a duplicate object of the command (for example your command is named CMDA) like CMDADUP.  Then create a program that accepts the same parameters as the program specified on CMDA.  This program can then fetch the call stack, output some log file, print the joblog, whatever you need.  Then lastly just execute CMDADUP with the received parameters.  Then just change the program executed by CMDA to your version, and you should be able to find out the information your program can determine.  Of course you need the authority to these objects.



    ------------------------------
    Mike Overlander
    ------------------------------



  • 7.  RE: How to find which program is using specific command

    Posted Thu January 02, 2025 10:08 AM

    Dear Ujwala,

    We do have a product in Powertech Command Security that tracks, overrides, notifies and more with commands on IBM i.  

    We can prevent commands by user, group users, autl, etc.

    https://www.fortra.com/products/command-monitoring-software-ibm-i

    Happy new year

    Tom



    ------------------------------
    Tom Huntington
    EVP of Technical Solutions
    Fortra
    Eden Prairie
    9523349940
    ------------------------------



  • 8.  RE: How to find which program is using specific command

    Posted Tue January 07, 2025 04:53 PM

    As the saying goes, there's more than 1 way to skin a cat....(sorry cat lovers..!) anyway.....have you considered simply renaming the command ? Then, if anything tries to use the command, it will fail and likely go into MSGW if it's a batch job.....

    I know this reply is super late all things considered..hopefully you figured it out!



    ------------------------------
    Rich Malloy
    ------------------------------



  • 9.  RE: How to find which program is using specific command

    Posted Thu January 09, 2025 10:49 AM
    An idea has been submitted for the DSPPGMREF command to generate information about the commands used in a program. You can vote for the idea:
    https://ideas.ibm.com/ideas/IBMI-I-4326 


    ------------------------------
    Sebastian Bornand Fuentes
    ------------------------------



  • 10.  RE: How to find which program is using specific command

    Posted Tue January 14, 2025 06:43 AM

    Wow, comments from Saif Ali Sabri is completely new experience. 

    It looks to me as BOT AI generated content. 



    ------------------------------
    Bartlomiej Grabowski
    IBM Champion - Platinum Redbook Author and Principal System Specialist
    ------------------------------



  • 11.  RE: How to find which program is using specific command

    Posted Tue January 14, 2025 08:23 AM

    His comments are gone.  I wonder if he pulled them or if our cries to the heavens were answered?

    Bart, did you find them useful?  I thought his last reply was so off the wall that I failed to find any relevance to IBM i.



    ------------------------------
    Robert Berendt IBMChampion
    Business Systems Analyst, Lead
    Dekko
    Fort Wayne
    ------------------------------



  • 12.  RE: How to find which program is using specific command

    Posted Tue January 14, 2025 08:50 AM

    That's strange. His first two "comments" and my related responses are gone.

    But, his out-of-context comment about AIX commands was deleted one hour ago and is back now!



    ------------------------------
    Marc Rauzier
    ------------------------------



  • 13.  RE: How to find which program is using specific command

    Posted Tue January 14, 2025 08:58 AM

    Yes, and says posted yesterday.



    ------------------------------
    Robert Berendt IBMChampion
    Business Systems Analyst, Lead
    Dekko
    Fort Wayne
    ------------------------------



  • 14.  RE: How to find which program is using specific command

    Posted Tue January 14, 2025 09:00 AM
    Edited by Bartlomiej Grabowski Tue January 14, 2025 09:09 AM

    I made them gone. There is an option to report unproper content. 

    This was certainly the content from some AI engine, so it wasn't total garbage but certainly irrelevant what the original problem is. No idea why this is happening, maybe some small company tries to get more attention, or there is a group of spammers aim to create chaos. 

    He has comments in other topics. It looks "he" is a master from each technology. Sort of scary, what is happening



    ------------------------------
    Bartlomiej Grabowski
    IBM Champion - Platinum Redbook Author and Principal System Specialist
    ------------------------------



  • 15.  RE: How to find which program is using specific command

    Posted Tue January 14, 2025 09:11 AM

    Oh! I was so happy that he was appreciating the time I was spending to comment his posts :-)



    ------------------------------
    Marc Rauzier
    ------------------------------



  • 16.  RE: How to find which program is using specific command

    Posted Tue January 14, 2025 04:14 PM

    The AI generated posts that were added to this thread are not acceptable in the Community, as the validity of the responses was not verified, and therefore have been removed. The community team is reviewing our current Terms & Conditions and will update them to add language around the acceptable use of AI generated posts.



    ------------------------------
    Nick Plowden
    AI Community Engagement
    IBM
    ------------------------------