Change Power Schedule Entry (CHGPWRSCDE)

The Change Power On/Off Schedule Entry (CHGPWRSCDE) command is used to change the system's power on/off schedule. You can change power on or power off default values for the days of the week or change the values for a particular day. You can also change or set the time the system sends a message that warns users of an impending power off. The changes you make in the power on/off schedule are effective immediately.

Restrictions:

  1. To use this command, you must have all object (*ALLOBJ) and security administrator (*SECADM) special authorities.

Parameters

Keyword Description Choices Notes
DAY Day Date, *TODAY, *ALL, *SUN, *MON, *TUE, *WED, *THU, *FRI, *SAT Required, Key, Positional 1
PWRONTIME Power on time Time, *SAME, *NONE, *DFT Optional
PWROFFTIME Power off time Time, *SAME, *NONE, *DFT Optional
DAYDESC Day description Character value, *SAME Optional
MSGITV Minutes before power off 0-60, *SAME, *DFT Optional

Day (DAY)

Specifies the days for which you are changing the power on/off schedule.

This is a required parameter.

*TODAY
The current date is used.
*ALL
The default values for all days of the week are changed.
*SUN
The default values for Sunday are changed.
*MON
The default values for Monday are changed.
*TUE
The default values for Tuesday are changed.
*WED
The default values for Wednesday are changed.
*THU
The default values for Thursday are changed.
*FRI
The default values for Friday are changed.
*SAT
The default values for Saturday are changed.
date
Specify the date you would like to change. The date must be specified in the same format as specified by your job attributes.

Power on time (PWRONTIME)

Specifies the power on time.

*SAME
The power on time does not change.
*NONE
No power on time or default power on time is set.
*DFT
The power on time for the date you are changing is set to the default value for the day of the week on which the date occurs. This value is allowed only if you specify *TODAY or a specific date on the Day (DAY) parameter.
time
Specify the power on time in the hhmmss format, where hh = hours, mm = minutes, and ss = seconds.

Power off time (PWROFFTIME)

Specifies the time you want a power off to occur.

*SAME
The power off time does not change.
*NONE
No power off time or default power off time is set.
*DFT
The power off time for the date you are changing is set to the default value for the day of the week on which the date occurs. This value is allowed only if you specify *TODAY or a specific date on the Day (DAY) parameter.
time
Specify the power off time in the hhmmss format, where hh = hours,mm = minutes, and ss = seconds.

The time can be specified with or without a time separator:

  • Without a time separator, specify a string of 4 or 6 digits (hhmm or hhmmss) where hh = hours, mm = minutes, and ss = seconds. Valid values for hh range from 00 through 23. Valid values for mm and ss range from 00 through 59.
  • With a time separator, specify a string of 5 or 8 digits where the time separator specified for your job is used to separate the hours, minutes, and seconds. If you enter this command from the command line, the string must be enclosed in apostrophes. If a time separator other than the separator specified for your job is used, this command will fail.

Day description (DAYDESC)

Specifies a description of the power on/off schedule. You can use this parameter to explain why the schedule is set the way it is. This parameter is valid only if *TODAY or a specific date is specified for the Day (DAY) parameter.

*SAME
The description does not change.
character-value
Specify up to 38 characters of text for an explanation of the day's power on/off schedule.

Minutes before power off (MSGITV)

Specifies the number of minutes before the scheduled power off that a message is sent to all work stations warning users of the scheduled power off. This parameter is allowed only if *ALL is specified for the Day (DAY) parameter.

*SAME
The number of minutes does not change.
*DFT
The number of minutes is set to 30.
0-60
Specify the number of minutes for the message interval.

Examples

Example 1: Changing the Schedule For An Entire Week

CHGPWRSCDE   DAY(*ALL)  PWRONTIME(0800)  PWROFFTIME(1800)
CHGPWRSCDE   DAY(*SAT)  PWRONTIME(*NONE)  PWROFFTIME(*NONE)
CHGPWRSCDE   DAY(*SUN)  PWRONTIME(*NONE)  PWROFFTIME(*NONE)

These commands set the power on and power off values for an entire week.

Example 2: Changing the Power-Off Time

CHGPWRSCDE   DAY('01/22/90')  PWROFFTIME(2000)
CHGPWRSCDE   DAY('01/22/90')  PWROFFTIME(2000)  PWRONTIME(*SAME)

Either of these commands is used to set the power-off time to 8 p.m. on January 22, 1990.

Example 3: Changing the Power-On Time

CHGPWRSCDE   DAY(012590)  PWRONTIME(060000)  PWROFFTIME(*NONE)

This command sets the power-on time to 6 a.m. for January 25, 1990 and sets no power-off time.

Example 4: Changing Back to the Defaults

CHGPWRSCDE   DAY(012590)  PWROFFTIME(*DFT)  PWRONTIME(*DFT)

This command sets the power on and off times for January 25, 1990 back to the defaults for that day of the week.

Error messages

*ESCAPE Messages

CPF1E2A
Unexpected error in QSYSSCD job.
CPF1E2B
Power scheduler and cleanup options not found.
CPF1E2C
Error occurred scheduling next power on and off.
CPF1E23
Power schedule or cleanup options in use by another user.
CPF1E26
Cannot change a date or a time that has passed
CPF1E27
Not authorized to change power on/off schedule.
CPF1E99
Unexpected error occurred.
CPF2105
Object &1 in &2 type *&3 not found.
CPF9808
Cannot allocate one or more libraries on library list.