Remove Pending Job Log (QWTRMVJL) API


  Required Parameter Group:


  Default Public Authority: *USE

  Threadsafe: Yes.

The Remove Pending Job Log (QWTRMVJL) API changes a completed job whose job log has not yet been written. The job messages are removed. The job log can no longer be produced or displayed.

If the spooled file action for the job specifies that spooled files are to be detached or if the only remaining spooled files for the job are in independent auxiliary storage pools (ASPs), the job is removed from the system.


Authorities and Locks

Job Authority
The caller of the API must be running under a user profile that is the same as the user name specified in the job selection information. Otherwise, the caller of the API must be running under a user profile that has job control (*JOBCTL) special authority.

Required Parameter Group

Job selection information
INPUT; CHAR(*)

Information that is used for selecting completed jobs for which pending job logs will be removed. See Format of Job Selection Information for a description on the layout of this parameter.

Job selection format name
INPUT; CHAR(8)

The format of the job selection information. The possible format names are:

Error code
I/O; CHAR(*)

The structure in which to return error information. For the format of the structure, see Error code parameter.


Format of Job Selection Information

The organization of the job selection information parameter is shown below. A description of the fields in the parameter follows the table.


RJLS0100 Format



Field Descriptions

Days since job completion. The minimum number of days that the job log has been pending. This may be zero. This must be non-negative. Refer to Usage Notes before coding a zero for this field.

Job log output. One of the following special values:

Job name. A specific job name, a generic name, or one of the following special values:

Job number. A specific job number or one of the following special values:

Length of job selection information. The length of the job selection information passed. Valid values are:

User name. A specific user profile name, a generic name, or one of the following special values:



Usage Notes

  1. This API can remove pending job logs for all completed jobs, even those jobs that specify *JOBEND or *JOBLOGSVR for the Job log output (LOGOUTPUT) job attribute. Do not code a zero for the days since job completion field unless you have verified that you really do not need a job log. There is a delay between the time a job completes and the time a job log server job can write the job log.

  2. This API may be automatically called by the system. Refer to the Change Cleanup (CHGCLNUP) command for more information. To avoid having the system automatically call this API, specify *NO for the Allow cleanup (ALWCLNUP) parameter or specify *KEEP for the Job logs and system output (SYSPRT) parameter of the Change Cleanup (CHGCLNUP) command.

    Operational Assistant cleanup uses *ALL for the Job log output field when calling this API. The system keeps pending job logs and spooled job logs for the same number of days. To specify the value that Operational Assistant uses for the days since job completion, use the Job logs and system output (SYSPRT) parameter of the Change Cleanup (CHGCLNUP) command. This can also be changed by using "GO CLEANUP" from a command line and selecting option 1 to change cleanup options.

  3. You can obtain a list of jobs and use the Remove Pending Job Log (QWTRMVJL) API to implement your own cleanup policy. Refer to the Open List of Jobs (QGYOLJOB) API, the List Job (QUSLJOB) API, and the Work Management API Attribute Descriptions (WMAttrDesc). Refer to the Add Job Schedule Entry (ADDJOBSCDE) command for information on how to schedule a batch job to be submitted at regular intervals.


Error Messages




API introduced: V5R4

[ Back to top | Work Management APIs | APIs by category ]