Tips & Tricks - Connect Jobs

Data Migration is often used to set up interface jobs, where a file is loaded from server into table in one job, and then a second job does the actual update of IFS. Below is a description on how you connect two such jobs, ensuring that both executes OK, and that error rows are taken care of. Then these jobs may be started as background processes, for repetitive execution.

Contents

Connect Two Jobs

The File job is connected to the Migration job by activating rule CONNJOB on the Migration Job.

Now we only have to start the Source Migration job, and this will start the File job first. As mentioned above, this is intended for interface jobs, reading files from server.

Error Handling

Note: If there is a formatting error on the File job (date/number formats) both jobs stops and the error must be fixed.

But if errors occur on the Migration job, we can set up automatic handling of these errors :

In case of a source migration error in the previous job setup,

  1. Activate Rule SAVEJOBDAYS on the Migration job
  2. Define Rule CLEANUP with option BEFORE on the Migration job.
    This means that errors will be available for query under Start Job/Detail folder after the job is executed,
    but will be moved to History tables at start of next execution.
  3. Activate Rule CRETABCONF with option KEEPERR on the File job.
    Then Data Migration will check if errors have been moved to history (previous step) and
    move corresponding rows from the IC_xx_BKP table back into the IC_xxx_TAB.
    This means that errors that occurs will not disappear, but will be used as input to the
    Migration job until the cause of the error is fixed.


Start Other Jobs From Method List

You may also start other jobs from the Method List, normally BeforeLoop or AfterLoop , using Intface_Header_API.Start_Job as a method.


The Method List Attributes look like this :

  1. Exec_Plan is already filled in with Fixed Value ONLINE. Do not change this
  2. Enter the name of the job you want to start.

   

Note: The procedure Intface_Header_API.Start_Job will not raise any exception if specified job fails, and Data Migration will continue executing if you have more rows in your Method List.

Use procedure Intface_Header_API.Start_Job_From_Server if you want the whole execution to stop if started job fails.