Previous
Previous
 
Next
Next


UPDATE_JOB_STATUS Procedure

Call this procedure to update the status of the currently running job. This procedure is most effective when called from the submitted PL/SQL.

Syntax

APEX_PLSQL_JOB.UPDATE_JOB_STATUS (
    p_job IN NUMBER,
    p_status IN VARCHAR2);

Parameters

Table: UPDATE_JOB_STATUS Parameters describes the parameters available in the UPDATE_JOB_STATUS procedure.

UPDATE_JOB_STATUS Parameters

Parameter Description

p_job

Passed the reserved word JOB. When this code is executed it will have visibility to the job number via the reserved word JOB.

p_status

Plain text that you want associated with

JOB: p_job.


Example

The following example shows how to use the UPDATE_JOB_STATUS procedure. In this example, note that:

BEGIN
    FOR i IN 1 .. 100 LOOP
        INSERT INTO emp(a,b) VALUES (:APP_JOB,i);
        IF MOD(i,10) = 0 THEN
            APEX_PLSQL_JOB.UPDATE_JOB_STATUS(
                P_JOB => :APP_JOB,
                P_STATUS => i || ' rows inserted');
        END IF;
        APEX_UTIL.PAUSE(2);
    END LOOP;
END;