QUERY EVENT (Display administrative event schedules)

Use the QUERY EVENT command to display scheduled and completed events for selected administrative command schedules.

Privilege class

Any administrator can issue this command.

Syntax

Read syntax diagramSkip visual syntax diagramQuery EVent schedule_nameType=Administrative BEGINDate=current_dateBEGINDate=dateBEGINTime=00:00BEGINTime=timeENDDate=begin_dateENDDate=dateENDTime=23:59ENDTime=timeEXceptionsonly=NoEXceptionsonly=NoYesFormat=StandardFormat=StandardDetailed

Parameters

schedule_name (Required)
Specifies the name of the schedule for which events display. You can use wildcard characters to specify names.
Type=Administrative (Required)
Specifies that the query displays events for administrative command schedules.
BEGINDate
Specifies the beginning date of the time range for events to be displayed. All events scheduled to start during this time are displayed. This parameter is optional. The default is the current date.
You can specify the date using one of the values below:
Value Description Example
MM/DD/YYYY A specific date 09/15/1998
TODAY The current date TODAY
TODAY+days or +days The current date plus days specified. The maximum number of days you can specify is 9999. TODAY +3 or +3.
TODAY-days or -days The current date minus days specified TODAY-7 or -7.

To query events scheduled to start during the past seven days, specify BEGINDATE=TODAY-7 ENDDATE=TODAY or BEGINDATE=-7 ENDDATE=TODAY.

EOLM (End Of Last Month) The last day of the previous month. EOLM
EOLM-days The last day of the previous month minus days specified. EOLM-1

To include files that were active a day before the last day of the previous month.

BOTM (Beginning Of This Month) The first day of the current month. BOTM
BOTM+days The first day of the current month, plus days specified. BOTM+9

To include files that were active on the 10th day of the current month.

BEGINTime
Specifies the beginning time of the range for events to be displayed. All events scheduled to start during this time are displayed. This parameter is optional. The default value is 00:00.
You can specify the time using one of the values below:
Value Description Example
HH:MM:SS A specific time on the specified begin date 10:30:08
NOW The current time on the specified begin date NOW
NOW+HH:MM or +HH:MM The current time plus hours and minutes on the specified begin date NOW+03:00 or +03:00.

If you issue this command at 9:00 to query events scheduled to start 3 hours from now, you can specify either BEGINTIME=NOW+03:00 or BEGINTIME=+03:00. IBM Spectrum® Protect displays events at 12:00 on the specified begin date.

NOW-HH:MM or -HH:MM The current time minus hours and minutes on the specified begin date NOW-04:00 or -04:00.

If you issue this command at 9:00 to query events scheduled to start during the last 4 hours, you can specify either BEGINTIME=NOW-04:00 ENDTIME=NOW or BEGINTIME=-04:00 ENDTIME=NOW. IBM Spectrum Protect displays events at 5:00 on the specified begin date.

ENDDate
Specifies the ending date of the time range for events to be displayed. All events that were schedule to start during this time are displayed. This parameter is optional. The default is the value used for the BEGINDATE.
You can specify the date using one of the values below:
Value Description Example
MM/DD/YYYY A specific date 09/15/1998
TODAY The current date TODAY
TODAY+days or +days The current date plus days specified. The maximum number of days you can specify is 9999. TODAY +3 or +3.
TODAY-days or -days The current date minus days specified TODAY-8 or -8.

To query events scheduled to start during a one-week period that ended yesterday, you can specify either BEGINDATE=TODAY-8 ENDDATE=TODAY-1 or BEGINDATE=-8 ENDDATE=-1.

EOLM (End Of Last Month) The last day of the previous month. EOLM
EOLM-days The last day of the previous month minus days specified. EOLM-1

To include files that were active a day before the last day of the previous month.

BOTM (Beginning Of This Month) The first day of the current month. BOTM
BOTM+days The first day of the current month, plus days specified. BOTM+9

To include files that were active on the 10th day of the current month.

ENDTime
Specifies the ending time of the range for events to be displayed. All events that were scheduled to start during this time are displayed. This parameter is optional. The default value is 23:59.
You can specify the time using one of the values below:
Value Description Example
HH:MM:SS A specific time on the specified end date 10:30:08
NOW The current time on the specified end date NOW
NOW+HH:MM or +HH:MM The current time plus hours and minutes on the specified end date NOW+03:00 or +03:00.

If you issue this command at 9:00 to query events scheduled to start 3 hours from now, you can specify either BEGINTIME=NOW ENDTIME=NOW+03:00 or BEGINTIME=NOW ENDTIME=+03:00.

NOW-HH:MM or -HH:MM The current time minus hours and minutes on the specified end date NOW-04:00 or -04:00
EXceptionsonly
Specifies the type of information you want on scheduled or completed events. This parameter is optional. The default is NO. You can specify one of the following values:
No
Specifies that the information on past and projected events is displayed.
Yes
Specifies that the events that failed or did not process as scheduled are displayed.
Format
Specifies how the information displays. This parameter is optional. The default value is STANDARD. Possible values are:
Standard
Specifies that partial information for events displays.
Detailed
Specifies that complete information for events displays.

Example: List events for a specific administrative schedule

Display partial information for all events scheduled for an administrative schedule named DOSADMIN. Limit the query to events that are scheduled for March 30, 1999 (03/30/1999). Issue the command:
query event dosadmin type=administrative 
begindate=03/30/1999 
enddate=03/30/1999 
Scheduled Start      Actual Start          Schedule Status
                                           Name
-------------------- --------------------  --------- ---------
03/30/1999 00:00:00  03/30/1999 00:00:01   DOSADMIN  Completed
03/30/1999 04:00:00  03/30/1999 04:00:01   DOSADMIN  Completed
03/30/1999 12:00:00                        DOSADMIN  Future
03/30/1999 16:00:00                        DOSADMIN  Future

Field descriptions

Scheduled Start
Specifies the scheduled starting date and time for the event.
Actual Start
Specifies the date and time at which the client began processing the scheduled operation. No information displays if the schedule has not started executing.
Schedule Name
Specifies the name of the schedule that initiated this event.
Status
For administrative commands or scripts that specify WAIT=YES, the status of a scheduled event is STARTED until the operation specified by the command or script is completed. The final status of the scheduled event depends on the return code of the operation. However, if WAIT=YES and if the schedule is running a script that specifies PREVIEW=YES, the final status is COMPLETED, unless the script contained a syntax error.

For administrative commands or scripts that specify WAIT=NO, the status of a scheduled event is COMPLETED if the scheduled command or script started. The success of the schedule is independent of the success of the operation performed by the command or script.