jcs.job_statuscode_wait
                                                
 PL/SQL API jcs.job_statuscode_wait
                                            Summary
Wait until the indicated job is in a finished state and return the job's statuscode.
Until that time, if this is called from a job, 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 A, U, E, C, K or L.
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
Copy
                                                    
                                                
                                            
                                            function job_statuscode_wait(job_id in number,
timeout in number default null)
    return varchar2
                                                    Parameters
- job_id - the ID of the job to wait for
 - timeout - number of seconds to wait
 - returns varchar2 - the 1 character statuscode of the job
 
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
Copy
                                                
                                            
                                            Using jcs.job_statuscode_wait
       ...
       jcs.submit(...);
       commit;
       if jcs.job_statuscode_wait(jcs.last_job_id) = 'C'
       then
         ...
       end if;
                                                Using jcs.job_statuscode_wait
See Also
- jcs.wait
 - jcs.job_status_wait
 - jcs_job_statuses (not implemented).