Loading ...
Sorry, an error occurred while loading the content.

Re: [Control-X] Exit code is not detected in CTM

Expand Messages
  • satheesh kumar
    Hi Richard, You condition might be true, but if i run the script from cmd line; the child process is passing  the exit codes on failure; I have below if
    Message 1 of 12 , Feb 1, 2011
    • 0 Attachment
      Hi Richard,
       
      You condition might be true, but if i run the script from cmd line; the child process is passing  the exit codes on failure; I have below if conditon in parent job
      #Execute datastage job to build source table
      if  [$? -ne 0]
      then
             echo "****source files load job failed....***"
      exit 99;
       
      fi
      echo "script execution completed"
       
      please some one suggest me why control-M is not detecting the exit codes
       
       
      Thanks & Regards,
       
      Satheesh.P
       
       
       
       
       
        
      echo *** joh has failed***
       
      exit99;
       

       
       
      Regards,
      Satheesh.P

       
                                                HELP EVER-HURT NEVER
       
       
       
       
       
       
       
       
       
       



      From: Richard Sherman <rwsherman@...>
      To: Control-X@yahoogroups.com
      Sent: Mon, 31 January, 2011 11:14:31 PM
      Subject: Re: [Control-X] Exit code is not detected in CTM

       

      Did you ensure that the child process is passing the exit condition back to the parent?  From what I gather here, you are saying that Control-M launches a job, parent, which launches another job, child.  The parent completes, which is what Control-M is tracking, but the child fails.


    • Daniel Companeetz
      Hi Satheesh,   Did you try adding at the top of your script a set -x command? Please do, and post the complete output. Helping from a segment of code is
      Message 2 of 12 , Feb 1, 2011
      • 0 Attachment
        Hi Satheesh,
         
        Did you try adding at the top of your script a set -x command? Please do, and post the complete output. Helping from a segment of code is difficult.
         
        Also indicate the OS flavor(HP-UX, RHEL, etc.), and version (11.31, 5, etc.), and shell (csh, ksh, etc) to better think about your problem
         
        Daniel Companeetz.

        --- On Mon, 1/31/11, Shancey, Jay <shanceyj@...> wrote:

        From: Shancey, Jay <shanceyj@...>
        Subject: RE: [Control-X] Exit code is not detected in CTM
        To: "'Control-X@yahoogroups.com'" <Control-X@yahoogroups.com>
        Date: Monday, January 31, 2011, 7:03 AM

         

        What happens when you run it manually? Do you still get a clean exitcode?

         


        From: Control-X@yahoogroups.com [mailto:Control-X@yahoogroups.com] On Behalf Of satheesh
        Sent: Monday, January 31, 2011 5:21 AM
        To: Control-X@yahoogroups.com
        Subject: [Control-X] Exit code is not detected in CTM

         

         

        Hello,

        I has few scripts which run in unix but internally it calls the another script and runs the datastage job.

        If the scource file is not there the datastage job is falling. but Control-M job is getting executed and changes to ended ok state..

        I think, control-M is not detecting the exitcode given in the script...

        Kindly help me how can i over come this issue

        Regards,
        Satheesh.P

      • satheesh kumar
          Regards, Satheesh.P ________________________________                                             HELP EVER-HURT
        Message 3 of 12 , Feb 1, 2011
        • 0 Attachment

           
           
          Regards,
          Satheesh.P

           
                                                    HELP EVER-HURT NEVER
           
           
           
           
           
           
           
           
           
           



          From: Daniel Companeetz <dcompane@...>
          To: Control-X@yahoogroups.com
          Sent: Tue, 1 February, 2011 2:15:24 PM
          Subject: RE: [Control-X] Exit code is not detected in CTM

           

          Hi Satheesh,
           
          Did you try adding at the top of your script a set -x command? Please do, and post the complete output. Helping from a segment of code is difficult.
           
          Also indicate the OS flavor(HP-UX, RHEL, etc.), and version (11.31, 5, etc.), and shell (csh, ksh, etc) to better think about your problem
           
          Daniel Companeetz.

          --- On Mon, 1/31/11, Shancey, Jay <shanceyj@...> wrote:

          From: Shancey, Jay <shanceyj@...>
          Subject: RE: [Control-X] Exit code is not detected in CTM
          To: "'Control-X@yahoogroups.com'" <Control-X@yahoogroups.com>
          Date: Monday, January 31, 2011, 7:03 AM

           

          What happens when you run it manually? Do you still get a clean exitcode?

           


          From: Control-X@yahoogroups.com [mailto:Control-X@yahoogroups.com] On Behalf Of satheesh
          Sent: Monday, January 31, 2011 5:21 AM
          To: Control-X@yahoogroups.com
          Subject: [Control-X] Exit code is not detected in CTM

           

           

          Hello,

          I has few scripts which run in unix but internally it calls the another script and runs the datastage job.

          If the scource file is not there the datastage job is falling. but Control-M job is getting executed and changes to ended ok state..

          I think, control-M is not detecting the exitcode given in the script...

          Kindly help me how can i over come this issue

          Regards,
          Satheesh.P

          Recent Activity:
          Control-X email list does not tolerate spam. For more information http://s390.8m.com/controlm.html DO NOT Spam this list or any members. To unsubscribe go to http://groups.yahoo.com/group/Control-X and click on User Center. Not affiliated with BMC Software.
          .
          Hi,

           
          I did not use set utility in my script; below is the log which i got,
          if i trigger from control-M
           
          DS Job LOG ENDS : ca_Src_Master_Seq.20110201015658
          =========================================================
          #ERROR:2011-02-01-01.58.30: CRX_ETLInvoker.sh: DataStage Job Failed....
          *** Source files load job Failed... ***
           
           
          If i trigger the script manually below is the log: where i get exit codes

           

          Status code = 0
          =======================LOG  :ca_load_wh_dept_vendor_item_status_src ******* ENDED  =====================

          =========================================================
          DS Job LOG ENDS : ca_Src_Master_Seq.20110201055031
          =========================================================
          #ERROR:2011-02-01-05.52.32: CRX_ETLInvoker.sh: DataStage Job Failed....
          /opt/dm/dev/dmload/pos/crx/costco/datastage/CRX_ETLInvoker.sh[162]: exit: -1: unknown option
          /opt/dm/dev/dmload/pos/crx/costco/datastage/CRX_ETLInvoker.sh[163]: exit: -1: unknown option
          *** Source files load job Failed... ***

           

           


        • satheesh kumar
          Hi, I do not use the set command in my script below are the logs when i run from ctm & cmdline: The machine is LINUX /x86_64 Log when submitted from control-M
          Message 4 of 12 , Feb 1, 2011
          • 0 Attachment
            Hi,
             
             
            I do not use the set command in my script below are the logs when i run from ctm & cmdline:
             
            The machine is LINUX /x86_64
             
            Log when submitted from control-M
             
            =========================================================
            DS Job LOG ENDS : ca_Src_Master_Seq.20110201015658
            =========================================================
            #ERROR:2011-02-01-01.58.30: CRX_ETLInvoker.sh: DataStage Job Failed....
            *** Source files load job Failed... ***
            Below is the log when i ran script from cmd line
             
            DS Job LOG ENDS : ca_Src_Master_Seq.20110201055031
            =========================================================
            #ERROR:2011-02-01-05.52.32: CRX_ETLInvoker.sh: DataStage Job Failed....
            /opt/dm/dev/dmload/pos/crx/costco/datastage/CRX_ETLInvoker.sh[162]: exit: -1: unknown option
            /opt/dm/dev/dmload/pos/crx/costco/datastage/CRX_ETLInvoker.sh[163]: exit: -1: unknown option
            *** Source files load job Failed... ***
             
            It clearly says the exit code are not generated in the script after job failed in datastage when i trigger from control-M...
             
            Can any one help me out on this issue...
             
            Your help is really appriciated...

             
            Regards,
            Satheesh.P

             
                                                      HELP EVER-HURT NEVER
             
             
             
             
             
             
             
             
             
             



            From: Daniel Companeetz <dcompane@...>
            To: Control-X@yahoogroups.com
            Sent: Tue, 1 February, 2011 2:15:24 PM
            Subject: RE: [Control-X] Exit code is not detected in CTM

             

            Hi Satheesh,
             
            Did you try adding at the top of your script a set -x command? Please do, and post the complete output. Helping from a segment of code is difficult.
             
            Also indicate the OS flavor(HP-UX, RHEL, etc.), and version (11.31, 5, etc.), and shell (csh, ksh, etc) to better think about your problem
             
            Daniel Companeetz.

            --- On Mon, 1/31/11, Shancey, Jay <shanceyj@...> wrote:

            From: Shancey, Jay <shanceyj@...>
            Subject: RE: [Control-X] Exit code is not detected in CTM
            To: "'Control-X@yahoogroups.com'" <Control-X@yahoogroups.com>
            Date: Monday, January 31, 2011, 7:03 AM

             

            What happens when you run it manually? Do you still get a clean exitcode?

             


            From: Control-X@yahoogroups.com [mailto:Control-X@yahoogroups.com] On Behalf Of satheesh
            Sent: Monday, January 31, 2011 5:21 AM
            To: Control-X@yahoogroups.com
            Subject: [Control-X] Exit code is not detected in CTM

             

             

            Hello,

            I has few scripts which run in unix but internally it calls the another script and runs the datastage job.

            If the scource file is not there the datastage job is falling. but Control-M job is getting executed and changes to ended ok state..

            I think, control-M is not detecting the exitcode given in the script...

            Kindly help me how can i over come this issue

            Regards,
            Satheesh.P


          • Richard Sherman
            Satheesh: What are the lines prior to the if statement? Perhaps there is another command that is being run - which would provide a different exit code. What
            Message 5 of 12 , Feb 1, 2011
            • 0 Attachment
              Satheesh:

              What are the lines prior to the if statement?  Perhaps there is another command that is being run - which would provide a different exit code.

              What code is Control-M receiving?  You may see this in the 

              Have you run the script(s) with -x?


              On Tue, Feb 1, 2011 at 2:19 AM, satheesh kumar <sat84eesh@...> wrote:
               

              Hi Richard,
               
              You condition might be true, but if i run the script from cmd line; the child process is passing  the exit codes on failure; I have below if conditon in parent job
              #Execute datastage job to build source table
              if  [$? -ne 0]
              then
                     echo "****source files load job failed....***"
              exit 99;
               
              fi
              echo "script execution completed"
               
              please some one suggest me why control-M is not detecting the exit codes
               
               
              Thanks & Regards,
               
              Satheesh.P
               
               
               
               
               
                
              echo *** joh has failed***
               
              exit99;
               

               
               
              Regards,
              Satheesh.P

               
                                                        HELP EVER-HURT NEVER
               
               
               
               
               
               
               
               
               
               



              From: Richard Sherman <rwsherman@...>Sent: Mon, 31 January, 2011 11:14:31 PM
              Subject: Re: [Control-X] Exit code is not detected in CTM

               

              Did you ensure that the child process is passing the exit condition back to the parent?  From what I gather here, you are saying that Control-M launches a job, parent, which launches another job, child.  The parent completes, which is what Control-M is tracking, but the child fails.



            • satheesh kumar
              Hi Richard, I have tried to the script using set -x; below is the o/p from control-M; It seems the jobs is getting ended ok before the internal datastage job
              Message 6 of 12 , Feb 3, 2011
              • 0 Attachment
                Hi Richard,
                 
                 
                I have tried to the script using set -x; below is the o/p from control-M; It seems the jobs is getting ended ok before the internal datastage job sends any exit code
                 
                 
                 echo 'Following environment Variables are used'
                + echo ' '
                + echo Datastage Project=ILD_CRX_DEV
                + echo Datastage Project Path=/opt/IBM/InformationServer/Server/Projects/ILD_CRX_DEV
                + echo ' '
                + /opt/dm/dev/dmload/pos/crx/costco/datastage/CRX_ETLInvoker.sh ILD_CRX_DEV ca_Src_Master_Seq /opt/dm/dev/dmload/pos/crx/costco\
                /datastage/crx_cacostco_parm
                 
                 
                Below is my script:
                 
                set -x
                echo
                echo "######################################################################################";
                echo
                echo "Job name- $0";
                echo
                echo "Number of Parameters - $#";
                echo
                #syntax check
                if [ $# -lt 5 ]
                then
                        echo
                        echo "***************************************************************************";
                        echo
                        echo "ERROR MESSAGE:";
                        echo "--------------";
                        echo
                        echo "ERR001 -- SYNTAX ERROR. CHECK THE PARAMETERS GIVEN TO SHELL.";
                        echo
                        echo "Usage : $0 <Database> <Schema> <user> <password>  <Script Environment>";
                        echo "Script Environment valid values are 'dev' 'tst' 'prd' 'prd2'"
                        echo "DS Project Environment valid values are  'dev' 'qa' 'prd'"
                        echo "***************************************************************************";
                        exit 1;


                #initialize environment varaiables
                . /opt/dm/$SCRIPT_ENV/dmload/pos/crx/common/envvariables_crxuscostco.cfg
                #initialize error trap functions
                . $PROGRAM_DIR/crx/common/etl_error_traps.sh
                echo "Following environment Variables are used";
                echo " "
                echo Datastage Project=$DS_PROJECT;
                echo Datastage Project Path=$DS_PROJECT_PATH;
                echo " "

                #Execute Datastage job to build Source  table
                $PROGRAM_DIR/crx/costco/datastage/CRX_ETLInvoker.sh $DS_PROJECT $DSJBNM $PROGRAM_DIR/crx/costco/datastage/crx_cacostco_parm
                if [ $? -ne 0 ];
                then
                        echo "*** Source files load job Failed... ***";
                        exit 1
                fi
                echo "Script $0 execution completed @  `date`"
                t 9

                 
                 

                 
                 
                Regards,
                Satheesh.P

                 
                                                          HELP EVER-HURT NEVER
                 
                 
                 
                 
                 
                 
                 
                 
                 
                 



                From: Richard Sherman <rwsherman@...>
                To: Control-X@yahoogroups.com
                Sent: Tue, 1 February, 2011 9:33:48 PM
                Subject: Re: [Control-X] Exit code is not detected in CTM

                 

                Satheesh:


                What are the lines prior to the if statement?  Perhaps there is another command that is being run - which would provide a different exit code.

                What code is Control-M receiving?  You may see this in the 

                Have you run the script(s) with -x?


                On Tue, Feb 1, 2011 at 2:19 AM, satheesh kumar <sat84eesh@...> wrote:
                 

                Hi Richard,
                 
                You condition might be true, but if i run the script from cmd line; the child process is passing  the exit codes on failure; I have below if conditon in parent job
                #Execute datastage job to build source table
                if  [$? -ne 0]
                then
                       echo "****source files load job failed....***"
                exit 99;
                 
                fi
                echo "script execution completed"
                 
                please some one suggest me why control-M is not detecting the exit codes
                 
                 
                Thanks & Regards,
                 
                Satheesh.P
                 
                 
                 
                 
                 
                  
                echo *** joh has failed***
                 
                exit99;
                 

                 
                 
                Regards,
                Satheesh.P

                 
                                                          HELP EVER-HURT NEVER
                 
                 
                 
                 
                 
                 
                 
                 
                 
                 



                From: Richard Sherman <rwsherman@...>Sent: Mon, 31 January, 2011 11:14:31 PM
                Subject: Re: [Control-X] Exit code is not detected in CTM

                 

                Did you ensure that the child process is passing the exit condition back to the parent?  From what I gather here, you are saying that Control-M launches a job, parent, which launches another job, child.  The parent completes, which is what Control-M is tracking, but the child fails.



                Richard

              • satheesh kumar
                This is the log when i ran the job from cntrl-M =======================LOG  :ca_load_wh_dept_vendor_item_status_src ******* ENDED  =====================
                Message 7 of 12 , Feb 3, 2011
                • 0 Attachment
                  This is the log when i ran the job from cntrl-M
                   
                   
                  =======================LOG  :ca_load_wh_dept_vendor_item_status_src ******* ENDED  =====================
                  =========================================================
                  DS Job LOG ENDS : ca_Src_Master_Seq.20110203231144
                  =========================================================
                  #ERROR:2011-02-03-23.13.28: CRX_ETLInvoker.sh: DataStage Job Failed....
                  *** Source files load job Failed... ***
                  It says as source job failed but no exit codes are passed...
                   
                   
                  Regards,
                  Satheesh.P

                   
                                                            HELP EVER-HURT NEVER
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   



                  From: satheesh kumar <sat84eesh@...>
                  To: Control-X@yahoogroups.com
                  Sent: Fri, 4 February, 2011 10:53:11 AM
                  Subject: Re: [Control-X] Exit code is not detected in CTM

                  Hi Richard,
                   
                   
                  I have tried to the script using set -x; below is the o/p from control-M; It seems the jobs is getting ended ok before the internal datastage job sends any exit code
                   
                   
                   echo 'Following environment Variables are used'
                  + echo ' '
                  + echo Datastage Project=ILD_CRX_DEV
                  + echo Datastage Project Path=/opt/IBM/InformationServer/Server/Projects/ILD_CRX_DEV
                  + echo ' '
                  + /opt/dm/dev/dmload/pos/crx/costco/datastage/CRX_ETLInvoker.sh ILD_CRX_DEV ca_Src_Master_Seq /opt/dm/dev/dmload/pos/crx/costco\
                  /datastage/crx_cacostco_parm
                   
                   
                  Below is my script:
                   
                  set -x
                  echo
                  echo "######################################################################################";
                  echo
                  echo "Job name- $0";
                  echo
                  echo "Number of Parameters - $#";
                  echo
                  #syntax check
                  if [ $# -lt 5 ]
                  then
                          echo
                          echo "***************************************************************************";
                          echo
                          echo "ERROR MESSAGE:";
                          echo "--------------";
                          echo
                          echo "ERR001 -- SYNTAX ERROR. CHECK THE PARAMETERS GIVEN TO SHELL.";
                          echo
                          echo "Usage : $0 <Database> <Schema> <user> <password>  <Script Environment>";
                          echo "Script Environment valid values are 'dev' 'tst' 'prd' 'prd2'"
                          echo "DS Project Environment valid values are  'dev' 'qa' 'prd'"
                          echo "***************************************************************************";
                          exit 1;


                  #initialize environment varaiables
                  . /opt/dm/$SCRIPT_ENV/dmload/pos/crx/common/envvariables_crxuscostco.cfg
                  #initialize error trap functions
                  . $PROGRAM_DIR/crx/common/etl_error_traps.sh
                  echo "Following environment Variables are used";
                  echo " "
                  echo Datastage Project=$DS_PROJECT;
                  echo Datastage Project Path=$DS_PROJECT_PATH;
                  echo " "

                  #Execute Datastage job to build Source  table
                  $PROGRAM_DIR/crx/costco/datastage/CRX_ETLInvoker.sh $DS_PROJECT $DSJBNM $PROGRAM_DIR/crx/costco/datastage/crx_cacostco_parm
                  if [ $? -ne 0 ];
                  then
                          echo "*** Source files load job Failed... ***";
                          exit 1
                  fi
                  echo "Script $0 execution completed @  `date`"
                  t 9

                   
                   

                   
                   
                  Regards,
                  Satheesh.P

                   
                                                            HELP EVER-HURT NEVER
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   



                  From: Richard Sherman <rwsherman@...>
                  To: Control-X@yahoogroups.com
                  Sent: Tue, 1 February, 2011 9:33:48 PM
                  Subject: Re: [Control-X] Exit code is not detected in CTM

                   

                  Satheesh:


                  What are the lines prior to the if statement?  Perhaps there is another command that is being run - which would provide a different exit code.

                  What code is Control-M receiving?  You may see this in the 

                  Have you run the script(s) with -x?


                  On Tue, Feb 1, 2011 at 2:19 AM, satheesh kumar <sat84eesh@...> wrote:
                   

                  Hi Richard,
                   
                  You condition might be true, but if i run the script from cmd line; the child process is passing  the exit codes on failure; I have below if conditon in parent job
                  #Execute datastage job to build source table
                  if  [$? -ne 0]
                  then
                         echo "****source files load job failed....***"
                  exit 99;
                   
                  fi
                  echo "script execution completed"
                   
                  please some one suggest me why control-M is not detecting the exit codes
                   
                   
                  Thanks & Regards,
                   
                  Satheesh.P
                   
                   
                   
                   
                   
                    
                  echo *** joh has failed***
                   
                  exit99;
                   

                   
                   
                  Regards,
                  Satheesh.P

                   
                                                            HELP EVER-HURT NEVER
                   
                   
                   
                   
                   
                   
                   
                   
                   
                   



                  From: Richard Sherman <rwsherman@...>Sent: Mon, 31 January, 2011 11:14:31 PM
                  Subject: Re: [Control-X] Exit code is not detected in CTM

                   

                  Did you ensure that the child process is passing the exit condition back to the parent?  From what I gather here, you are saying that Control-M launches a job, parent, which launches another job, child.  The parent completes, which is what Control-M is tracking, but the child fails.



                  Richard

                  is is

                Your message has been successfully submitted and would be delivered to recipients shortly.