: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.
Notes
- Calendar calculation is not automatically triggered while this script statement is being processed. You must open and store the Calendar object manually to have the calendar recalculated.
- When you add dates or times, this script statement ignores existing date or time period specifications. The same is true if you remove a date or time period that does not exist.
Tip: Write 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
- 
                    :SET_CALE 
 Adds or removes a date or time period to or from a Calendar Event
- 
                    Calendar 
 Name of the Calendar object to or from which a date or time period should be added or removed
 Format: AE name, script literal or script variable
- 
                    Calendar Event 
 Name of the Calendar Event to or from which a date or time period should be added or removed
 If the Calendar Event does not exist, this script statement creates a new, non-recurring static Calendar Event. By default, the current year minus NOW_MINUS and plus NOW_PLUS is used. Both specifications are keys that the administrator specifies in the AE variable UC_CLIENT_SETTINGS. You can modify the validity range by using a script subsequently. For more information, see MODIFY_OBJECT
 Format: AE name, script literal or script variable
- 
                    Date1 and Date2 
 Date in the format YYMMDD or YYYYMMDD. Date2 is optional if you want to add or remove only one date. For a time period, you must specify both, Date1 and Date2.
 (Optional) You can specify a different date format by entering your preferred date format, adding a separating character (: or ;) and the date.
 Format: script literal or script variable
- 
                    Action 
 (Optional) Action that is used to add or remove a date or time period
 Format: AE name, script literal or script variable
 Allowed values:- 
                        ON (default)
 Adds a date or time period
- 
                        OFF
 Removes a date or time period
 
- 
                        ON (default)
Examples
The first example adds a date to a calendar called ON-CALL and a Calendar Event called SMITH.
:SET_CALE "ON-CALL", "SMITH", "YY-MM-DD:20-12-24"
The second example removes the current day from the static Calendar Event called BROWN.
:SET &TODAY# = SYS_DATE()
:SET_CALE "ON-CALL", 
 "BROWN", 
 &TODAY#,, 
 OFF
            
The third example determines the beginning and end of the current week, and then adds this time 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: