Why does the %%PRECMD or %%POSTCMD variable on a Control-M Control Module or plugin Job not seem to work?

Version 1
    Share This:

    This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.


    Control-M for Databases


    Control-M for Databases


    All Control-M plugin applications like Control-M for SAP, Control-M for PeopleSoft and others


    When trying to configure PRECMD or POSTCMD commands with Control-M plugin / Control Module (CM) jobs, these fields do not exist but they do exist for regular OS job types.
    How can I use the Pre and Post Command options with these job types?
    The fields do not exist in the General tab even after selecting "More".
    As well you are blocked when attempting to add it as a parameter with the name PRECMD or POSTCMD.

    Applies To:
    Control-M for Databases
    Control-M for PeopleSoft
    Control-M for SAP
    Control-M for Hadoop
    Control-M for Oracle E-Business Suite
    Control-M for Backup
    Control-M for SAP Business Objects
    Control-M for Oracle Retail
    Control-M for Oracle Business Intelligence
    Control-M for Informatica
    Control-M for IBM InfoSphere DataStage
    Control-M for IBM Cognos
    Control-M for Cloud
    Control-M for Web Services, Java and Messaging



    When using a Control Module(CM) (i.e. SAP, PS, OAP, WS , etc), there is no connection to the Agent Operating System(OS) therefore it is not possible to run OS commands.
    When not using a CM, you are actually using a CM for Unix or Windows to connect to the respective OS. This means the CM controls how certain functions, like %%PRECMD and %%POSTCMD, are handled. If the CM does not contain the functionality, it would not be possible to use the functions.
    Some CMs may implement PRE and POST command handling such as AFT. However this is an exception and please refer to specific CM's documentation for more details.

    The following enhancement request (RFE) has been opened for this functionality: 
    CAR00044449 - Provide PRECMD and POSTCMD functionality in the Control-M/Agent for all CMs. 


    Article Number:


    Article Type:


      Looking for additional information?    Search BMC Support  or  Browse Knowledge Articles