Remove History using JS (RMVHSTJS)

Where allowed to run: All environments (*ALL)
Threadsafe: No
Parameters
Examples
Error messages

The Remove History using Job Scheduler (RMVHSTJS) command allows you to remove history from the Advanced Job Scheduler job history file by specifying the amount of history you want to keep or remove. You can specify whether you want to keep a number of job history occurrences or you can remove history entries based on a date range you specify.

Top

Parameters

Keyword Description Choices Notes
RMVTYPE Remove type *OCCUR, *DAYS Optional, Positional 1
NBROCCUR Number of occurrences 1-999, 180 Optional
SLTDATE Select dates Element list Optional
Element 1: From date Character value, *CURRENT, *BEGIN
Element 2: To date Character value, 180, *CURRENT, *END
Top

Remove type (RMVTYPE)

Specifies how entries are to be selected from the Advanced Job Scheduler log.

*OCCUR
History file entries are kept based on the number of occurrences specified for the Number of occurrences (NBROCCUR) parameter.
*DAYS
History file entries are removed based on a date range specified in the From dateand To datefields.
Top

Number of occurrences (NBROCCUR)

Specifies how many occurrences for a job are to be kept in the history file. The number of occurrences begins with the oldest (earliest date) occurrence and progresses to the most recent. Occurrences can range from 1 to 999.

180
The number of occurrences for a job to be kept in the file is 180.
1-999
Specify the number of occurrences for a job that are to be kept in the file.
Top

Select dates (SLTDATE)

Specifies the range of dates that you want to use when removing Advanced Job Scheduler job history. The From date is the beginning point in the Advanced Job Scheduler history that is removed and the To date is the ending point.

Element 1: From date

*BEGIN
Uses the earliest Advanced Job Scheduler history file date in the file as the beginning date in the date range.
*CURRENT
Uses the current date as the beginning date in the date range.
date
Specify the date in system format with or without date separators, such as 12/01/01 or 120101, that you want to be the beginning date of the date range.
number
Specify a number to represent the number of days before the current day that you want to be the beginning date of the date range. An example would be 10. If today's date were 3/22/01, the From date for the Advanced Job Scheduler log would be 3/12/01.

Element 2: To date

180
The number of days of history that is retained is 180.
*CURRENT
The current date is the ending date of the date range.
*END
The latest date in the Advanced Job Scheduler history file is used as the ending date in the date range.
date
Specify the date in system format with or without date separators, such as 12/01/01 or 120101, that you want to be the ending date of the date range.
number
Specify a number to represent the number of days before the current day that you want to be the ending date of a date range. An example would be 10. If today's date were 3/22/01, the To date for the Advanced Job Scheduler log would be 3/12/01.
Top

Examples

RMVHSTJS   RMVTYPE(*DAYS)  SLTDATE(*BEGIN 60)

This command removes history information that is older than 60 days. The most recent 60 days of history information is kept.

Top

Error messages

Unknown
Top