How to Define a Job and its Tasks

Previous Next

See Also

To define a job:

1. Right-click Jobs in the Batch tab of the Project Catalog, and choose New Export Job.

The Export Job wizard appears.

2. Enter the requested information in each of the wizard's dialogs.

Once the Job has been defined, you can refine it if required by right-clicking on Jobs, Edit in the Batch tab of the Project Catalog. You can use the What's This? help in the Jobs window for help on each field.

NOTE:

You can also define a job yourself, by choosing Define, Jobs from the menu bar.

Hints on how to complete the fields in the Jobs window are listed below:

1. In the Job Name field, type a unique name for the job. This must start with a letter, and may be up to 30 characters long.
2. If the job contains variables, click the Input Parameter Set lookup button and select from the list the external set that contains the appropriate parameters.
· In the Use User Table field of the Input Parameter Set, check or clear the box to specify whether or not USoft Batch should use a user-defined database table for temporary storage of the external set. If you use a user table, there are security and authorization advantages. Users only need to be given rights to access application tables and to the user tables for parameter sets.
· In the User Table field, specify the name of the table to use to store the external set temporarily.
3. If the job returns output parameters, click the Output Parameter Set lookup button and select from the list the external set that contains the appropriate parameters.
· In the Use User Table field of the Output Parameter Set, check or clear the box to specify whether or not USoft Batch should use a user-defined database table for temporary storage of the external set. If you use a user table, there are security and authorization advantages. Users only need to be given rights to access application tables and to the user tables for parameter sets.
· In the User Table field, specify the name of the table to use to store the external set temporarily.
4. Specify the Job Commit Type.
· None: No commit is issued. Use this if the job is to be incorporated into a larger process, for example another batch job.
· All tasks of the job automatically get Commit Type: None. This cannot be changed.
· Task: The commit type is specified at task level, for each task separately.
· Job: One commit or rollback is issued at the end of the job. All tasks of the job automatically get Commit Type: None. This can not be changed.

NOTE 1:

The following two settings have the same effect:

· Job Commit Type: None.

 

· Job Commit Type: Task, with the Commit Type attribute of each of its tasks set to: None.

NOTE 2:

Job Commit Type: Job does NOT have the same effect as Job Commit Type: Task with commit type: Task for the last task, and None for the other tasks.

The difference is in error handling: With Job Commit Type: Job, a rollback is executed if the job aborts halfway, with Job Commit Type: Task, and Commit Type: None for all except the last task, there will be no rollback.

5. On the Tasks tab page, enter information in the following fields for each task that is to be executed by this job:
· In the Task Name field, type a name that is unique within the job. This must start with a letter, and may be up to 30 characters long.

 

· In the Sequence field, type a unique sequence number to indicate the order in which the tasks of the job are to be executed. It is a good idea to start numbering from 10, so that you can insert other tasks later, if required.

 

· In the Commit Type dropdown list, choose whether data is to be committed after each record, after each task, or not at all. A record-level commit can only be specified for import tasks and SQL tasks.

 

· In the Abort Mode dropdown list, choose what happens when a non-fatal error occurs.

None: The error is reported, and the task continues.

Abort Task on Error: The error is reported, the current task is aborted, and subsequent tasks are executed.

Abort Job on Error: The error is reported, and the current task and all subsequent tasks are aborted.

· Move the cursor to the field that corresponds to the desired task type, (Action, Export, Import, Job, or SQL) and then use the lookup button to select a previously defined task.

NOTE

USoft Developer allows you to document your application by writing descriptions or comments on Jobs. Click the Comment tab and the Comments tab page appears. Enter your comments or description in the Comment field. Save your changes.