Changes to the Run Job Command

To determine whether a job has completed, you can now use the run job command with the wait parameter rather than issuing multiple monitor job commands.

Earlier versions of DA required you to execute separate commands to run a job and monitor the comparison results. For example:

run job myJob
go
monitor job myJob [myComparison]
go
While waiting for DA server to complete the job, you might have had to execute the monitor command multiple times.
Now, you can execute a single run job command with the wait parameter and view the comparison results immediately when the job completes. For example:
run job myJob wait [timeout seconds]
go
where:
Example 1 – waits indefinitely until the job is completed. You cannot regain the isql prompt control until DA server completes the job. The job is considered complete when all comparisons run successfully, or if there are errors that abort the job, or if you abort the job manually using a different isql prompt:
run job myjob wait
go

The returned result is:

SUBMIT TIME         FINISH TIME         COMPARISONS READ (S) DIFFS M O I R ERRORS
------------------- ------------------- ----------- -------- ----- - - - - ------
2013-06-27 10:20:51 2013-06-27 10:26:59 1           10000    0     0 0 0 0 0

(0 rows affected)

In this example, you regain control of the isql prompt after 6 seconds approximately (the difference between the Submit Time and the Finish Time). The job is completed and the output is identical to that of show history myjob latest summary command.

Example 2 – waits for 10 seconds before transferring control of the isql prompt to you. The job is considered complete when all comparisons run successfully, or if there are errors that abort the job, or if you abort the job manually using a different isql prompt:
run job myjob wait 10
go
The returned result is:
SUBMIT TIME         FINISH TIME         COMPARISONS READ (S) DIFFS M O I R ERRORS
------------------- ------------------- ----------- -------- ----- - - - - ------
2013-06-27 10:31:52 2013-06-27 10:38:02 1           10000    0     0 0 0 0 0

(0 rows affected)

In this example, you regain control of the isql prompt after 6 seconds approximately (the difference between the Submit Time and the Finish Time). The job is completed and the output is identical to that of show history myjob latest summary command.

Example 3 – waits for 5 seconds before transferring control of the isql prompt to you. The job is considered complete when comparisons run successfully, or if there are errors that abort the job, or if you abort it manually using a different isql prompt:
run job myjob wait 5
go
The returned result is:
COMPARISON PART STATUS  SUBMIT TIME         END TIME RUN PROGRESS NEXT RETRY ERROR
---------- ---- ------- ------------------- -------- --- -------- ---------- -----
mycmp      0    RUNNING 2013-06-27 10:49:54          1   89%
[#103] Waited 5 seconds, the job is still running.

(0 rows affected)

In this example, you regain control of the isql prompt after 5 seconds and the output shows the current 'running' state of the job. The job is still running and the output is identical to that of monitor job myjob command.