:SET_CALE

Use the :SET_CALE script statement to add or remove a date or time period to or from a static Calendar Event in a Calendar object.

Tip: Use a script to check whether a date is valid in a particular Calendar object and Calendar Event. For more information, see VALID_CALE.

Syntax

: SET_CALE Calendar, Calendar Event, [Date Format:]Date1[,[Date Format:]Date2[,Action]]

Parameters

Parameter Description Format Allowed Values Default Value
Calendar Name of the Calendar object to which a date or time period is added or from which it is removed AE name, script literal, or script variable n.a. n.a.
Calendar Event Name of the Calendar Event. If the Calendar Event does not exist, a new non-recurring static Calendar Event is created. By default, the validity range covers the current year minus NOW_MINUS and plus NOW_PLUS — keys defined by the administrator in the UC_CLIENT_SETTINGS variable. You can modify the validity range using a script afterwards. For more information, see MODIFY_OBJECT. AE name, script literal, or script variable n.a. n.a.
Date1 Date in YYMMDD or YYYYMMDD format. For a single date, Date2 is not required. You can specify a different date format by prefixing with the format and a separator character (: or ;). Script literal or script variable n.a. n.a.
Date2

(Optional)

End date of a time period. Required when adding or removing a date range. Uses the same format as Date1. Script literal or script variable n.a. n.a.
Action

(Optional)

Specifies whether to add or remove the date or time period AE name, script literal, or script variable
  • ON — Adds the date or time period
  • OFF — Removes the date or time period
ON

Important Considerations

  • Calendar calculation is not automatically triggered when this statement is processed. You must open and save the Calendar object manually to recalculate the calendar.

  • When adding dates or times, existing date or time period specifications are ignored. The same applies when removing a date or time period that does not exist.

Examples

The following example adds a specific date to the SMITH Calendar Event in the ON-CALL calendar.

: SET_CALE "ON-CALL", "SMITH", "YY-MM-DD:20-12-24"

The following example removes the current day from the BROWN Calendar Event.

: SET &TODAY# = SYS_DATE ()

: SET_CALE "ON-CALL", "BROWN", &TODAY#,, OFF

The following example determines the beginning and end of the current week and adds this period to the SMITH Calendar Event.

: SET &TODAY# = SYS_DATE ()

: SET &BEGINNING# = FIRST_OF_PERIOD (&TODAY#, "WW")

: SET &END# = LAST_OF_PERIOD (&TODAY#, "WW")

: SET_CALE "ON-CALL", "SMITH", &BEGINNING#, &END#

See also: