The resource CHOICEMASK can be found, typically, in resource expressions assigned to "resumer jobs", which are auxiliary jobs used to resume other jobs that have been preempted. This is not really a resource, but rather a method to control the evaluation of the expressions that contain OR branches.

Normally, all branches of the expression are evaluated. If CHOICEMASK is present in the expression, it controls which branches are chosen. For example, if you have an expression with one OR branch, the presence of CHOICEMASK#0 forces the selection of the left branch, while CHOICEMASK#1 forces the selection of the right branch.

If more OR branches are present in the expanded expression, the bits in CHOICEMASK are used in order to select either the left (bit value 0) or the right (bit value 1) branch in the expression.

It is unlikely that a user will want to use CHOICEMASK to a job, but it is considered to be legal.

Examples of CHOICEMASK

The expression
"License:aa OR License:bb"

evaluates first the availability of License:aa, then the availability of License:bb.

The expression
"CHOICEMASK#0 ( License:aa OR License:bb )"

forces the choice of License:aa.

The expression
"CHOICEMASK#1 ( License:aa OR License:bb )"

forces the choice of License:bb.