Script functions reference > Script functions in alphabetical order > C > CancelJob

CancelJob
Syntax
CancelJob(event_id);
event_id
A string specifying the EventID, or an asterisk (*). If an EventID is specified, the corresponding Event will be executed and can be used to report the interruption. There is no input Message available for this Event, which means that all input data must be provided via variables.
If no reporting is desired, an asterisk (*) should be used instead of the EventID.
Description
Cancels the current job. The cancellation is executed after pre-processing, i.e. all Events are pre-processed before the job is interrupted (for more information on the pre-process phase, Formatting phase). This scripting function is not supported in Post-processor scripting.
Returns
N/A
Example
if  (getcurrobjy() > 75 and $joberr = "")
{
$joberr = "too many items in block xx"
}
canceljob("joberror");
Result:
If the current Y position in the frame exceeds 75 millimeters and the $joberr variable has not been assigned a value, the $joberr variable is assigned the string value too many items in block xx, and the canceljob("joberror") script will be executed. This script cancels the job and calls the joberror Event, which uses the $joberr variable.
OpenText StreamServe 5.6 Updated: 2013-03-01