10 Replies Latest reply on Feb 21, 2020 8:06 AM by Karkki D S

    How to retrieve Control-M OS completion status code using a perl script

    Karkki D S
      Share This:



      I am using a perl script to perform on-do actions based on the os completion status code. I am not able to give the right argument in the script in "On" section to check the OS status code. I tried to give a * with status code which returns "When Specific statement output Statement:* Code: 15". Actually I am expecting "When OS completion status Equal to 15" in the "On" statement. Can anyone please help me with the right argument to be passed in the perl script.


      Below is the code what I am using. Highlighted is the code for Ondo actions.




      #  construct 'ctmcreate' arguments

      $ctmParms{'tasktype'}         = "JOB";

      $ctmParms{'group'}            = $ctmDPC;

      $ctmParms{'application'}      = "RUP";

      $ctmParms{'nodegrp'}          = $ctmVirtual;

      $ctmParms{'memlib'}           = "$applDir/util";

      $ctmParms{'memname'}          = "startBGprocess.pl#";

      $ctmParms{'jobname'}          = $jobName;

      $ctmParms{'owner'}            = "$ENV{'LOGNAME'}";

      $ctmParms{'odate'}            = "ODAT";

      $ctmParms{'critical'}         = "Y";

      $ctmParms{'maxwait'}          = "2";

      $ctmParms{'description'}      = $jobDesc;


      $ctmParms{'onforcejob'}   = "\'*\' 15";

      $ctmParms{'doforcejob'}       = $ctmNode."-CRON sendAlarm ODAT";


      Thanks in Advance,