Db2

 View Only
  • 1.  DMC 3.1.4 Job types

    Posted Thu April 22, 2021 04:07 PM
    When creating a job with a job type of "CLP/shell script" how do I get it to run a shell script?   Seems like it runs everything as a CLP script.

    ------------------------------
    Craig Beaver
    ------------------------------

    #Db2


  • 2.  RE: DMC 3.1.4 Job types

    Posted Wed April 28, 2021 08:19 PM
    Hi Craig,

    db2 commands can be run with CLP by adding "!" prefix.  But, running as shell script "as is" is not supported in DMC today.




    ------------------------------
    Jason Sizto
    ------------------------------



  • 3.  RE: DMC 3.1.4 Job types

    Posted Thu April 29, 2021 11:54 AM
    Hi Jason,

    Thank you for the reply.   I did use this method but I couldn't find a way to get the return back to the CLP.   When the command fails the CLP script still completes successfully.

    ------------------------------
    Craig Beaver
    ------------------------------



  • 4.  RE: DMC 3.1.4 Job types

    Posted Sat May 01, 2021 08:11 PM
    Hi Craig,

    The current the DMC Job status is designed to indicate if the Job has successfully kicked off.  And the return value of the job will not be checked.

    I would suggest you to open a requirement for supporting Scripts (and support check in scripts return value) in Jobs against the Aha IBM under Db2 Data Management Console: https://ibm-data-and-ai.ideas.aha.io/   This will allow other community users to vote on the requirement.

    p.s.  The User Defined Alert function under Monitor Profile does support Scripts.  It will also check the script's return value (0, -1 or -2) and decide if it falls under Information / Warning / Critical Alerts with notification available.  It is not recommended to use the User Defined Alerts to execute general scripts, as alerts will generally be tracked under the Notification center.  And alerts generally are created for monitoring issues.  But, if your script justify an alert when the execution failed.  You can use it as a temporary workaround.

    ------------------------------
    Jason Sizto
    ------------------------------