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

The job ID for the job you want to update the status of.

p_status

The string of up to 100 characters to be used as the current status of the 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;