PL/SQL API jcs.wait
Summary
- procedure wait()
- procedure wait(job_id in number, timeout in number)
- function wait(job_id in number, timeout in number) return varchar2
Wait for child job(s) to finish.
Until that time, the calling job gets status WAITING (W).
A job is in a finished state when its status level is equal or greater than 4; this means CANCELED, UNKNOWN, ERROR, COMPLETED, KILLED or DELETING.
The following exceptions can occur when you wait for a job:
- JCS-02191 - when the timeout has expired.
- JCS-02041 - when the job does not exist yet/anymore.
Specification
procedure wait()
Wait for all child jobs to finish.
Transaction keyword
The transaction keyword defines how and/or when the changes are committed to the database. A definition of the various transaction keywords can be found on the jcs package summary page.
autonomous
Specification
procedure wait(job_id in number,
timeout in number default null)
Wait until a job is finished.
Parameters
- job_id - the ID of the job to wait for
- timeout - number of seconds to wait
Transaction keyword
The transaction keyword defines how and/or when the changes are committed to the database. A definition of the various transaction keywords can be found on the jcs package summary page.
autonomous
Specification
function wait(job_id in number,
timeout in number default null)
return varchar2
Wait until the indicated job is in a finished state and return the v4-compatible status.
warning
This function is de-supported; it returns a Redwood 4.1 compatible status, where READY indicates COMPLETED. Use the jcs.job_status_wait or jcs.job_statuscode_wait functions instead.
Parameters
- job_id - the ID of the job to wait for
- timeout - number of seconds to wait
- returns varchar2 - the status of the job (in Redwood 4.1 format)
Transaction keyword
The transaction keyword defines how and/or when the changes are committed to the database. A definition of the various transaction keywords can be found on the jcs package summary page.
autonomous
Examples
Using jcs.wait
jcs.submit('Part 1');
commit;
jcs.wait;
jcs.submit('Part 2');
Using jcs.wait
See Also
plsqlTopic
onsiteTopic