#WORKUNIT

#WORKUNIT( option, value );

optionA string constant specifying the name of the option to set.
valueThe value to set for the option.

The #WORKUNIT statement sets the option to the specified value for the current workunit. This statement may be used outside an XML scope and does not require a previous call to the LOADXML function to instantiate an XML scope.

Valid option settings are:

clusterThe value parameter is a string constant containing the name of the target cluster on which the workunit executes.
protectThe value parameter specifies true to indicate the workunit is protected from deletion, or false if not.
nameThe value parameter is a string constant specifying the workunit's jobname.
priorityThe value parameter is a string constant containing low, normal, or high to indicate the workunit's execution priority level, or an integer constant value (not a string) to specify how far above high the priority should be ("super-high").
scopeThe value parameter is a string constant containing the scope value to use to override the workunit's default scope (the user ID of the submitting person). This is a Workunit Security feature and requires a system which is LDAP-enabled.

Example:

#WORKUNIT('cluster','400way'); //run the job on the 400-way target cluster
#WORKUNIT('protect',true);     //disallow deletion or archiving by Sasha 
#WORKUNIT('name','My Job');    //name it "My Job"
#WORKUNIT('priority','high');  //run before other lower-priority jobs
#WORKUNIT('priority',10);      //run before other high-priority jobs
#WORKUNIT('scope','NewVal');   //override the default scope (on an LDAP enabled system)