Script functions reference > Script functions in alphabetical order > G > GetExtJobId

GetExtJobId
Syntax
GetExtJobID();
Description
Returns the external ID of the current job. This function is usually called from an After Process script.
See also GetIntJobID, GetJobStatus, SetExtJobId.
Returns
A string containing the external ID of the current job.
Examples
Example 56
//Get the external ID of the current job 
//and send the ID to the log
 
$jobid = getextjobid();
log (1, $jobid);
 
//Get the status of the current job. If an error has occurred,
//send an error message to the log.
 
$jobstatus = getjobstatus();
if ($jobstatus = "0")
    log (1, "An error has occurred");
 
//Get the internal ID of the current job 
//and send it to the log.
 
$intjobid = getintjobid();
log(1, $intjobid);
Result:
The external ID of the current job is written to the log with log level 1. If the job was not completed successfully, an error message is written to the log. Finally, the internal ID of the current job is written to the log.
 
Example 57
$extjobid = " " + GetExtJobID(); 
Log (9, ">> ExtJobID =" + $extjobid + " : Time = " + gettime());
Result:
>> ExtJobID = SS_SAP-1001 : Time = 090807
 
OpenText StreamServe 5.6 Updated: 2013-03-01