Sun Microsystems, Inc.
spacerspacer
spacer www.sun.com docs.sun.com |
spacer
black dot
 
 
13.  Using Calendar Other Calendar Tools  Previous   Contents   Next 
   
 

sdtcm_admin

Use sdtcm_admin from the command line to create and administer calendars. This tool can be used to add or remove a calendar on a local system or remotely on a host on the network. Use sdtcm_admin to list calendars that exist on a host, or to grant and revoke access to users to a specific calendar. Options to sdtcm_admin include:

-l

Lists calendars on your system in a single column

-h

Lists calendars on other hosts

-a

Adds a new calendar to a system (by default, login@localhost)

-c

Add a named calendar to a system

-d

Delete a calendar from a system (by default, removes)

See the sdtcm_admin(1) man page for more details and examples of the other options.

Examples

To list calendars on your system:

% sdtcm_admin -l
kasso
vacation
test
foobar
sleepy

To list calendars on another host:

% sdtcm_admin -l -h totoro
ytso
root
test
sportv4

To add a calendar with your login name to the host you are logged in to:

% sdtcm_admin -a

By default the -a option will create the calendar <login>@<localhost>. Other calendars can be created on the host by using the -c option.

To create the calendar buildschedule on the local host, aha:

% sdtcm_admin -a -c buildschedule@aha

To create the calendar sleepy on the remote host totoro:

% sdtcm_admin -a -c sleepy@totoro

To remove the calendar with your login name from the host you are logged in to:

% sdtcm_admin -d

By default the -d option will remove the calendar <login>@<localhost>. For example, if kasso is logged into aha and runs sdtcm_admin -d with no other options, the following response will be displayed:

Delete the calendar kasso@aha [y/n]?

Respond y or n.

To remove the calendar old on the host aha:

% sdtcm_admin -d -c old@aha

You can only remove calendars for which you have Owner privileges. If you attempt to remove a calendar that you do not own, you will see an error message:

Delete the calendar old@aha [y/n]? y
sdtcm_admin: Could not delete calendar because: Permission denied.

sdtcm_convert

Usesdtcm_convert to convert Calendar data format, prune a calendar, or check data integrity. Use it to convert version 3 (OpenWindows) calendar data format to version 4 (the extensible calendar data format).


Note - sdtcm_convert is automatically invoked when performing an OS upgrade to 2.6.


sdtcm_convert must be run by superuser or the owner of the calendar. Superuser can run sdtcm_convert on any calendar; a regular user can only run sdtcm_convert on his or her own calendar. Note that sdtcm_convert can be used only on calendars located on the local host.

The version 3 data format is fixed and limited. In order to take advantage of the new features supported by the calendar API, version 3 calendars should be converted to the version 4 data format.

Options for sdtcm_convert are listed and described below.

  • Use the -v option to specify the data version of output.

    Valid values are 3 (OpenWindows calendar data format) and 4 (the extensible data format). If this option is not specified, the output data version is the same as that of the specified calendar and no data conversion is done.


Note - The data version of a calendar is displayed in the About Calendar dialog box of Calendar, accessible from the Help menu.


  • Use the -s option to specify the date to prune the calendar.

    Appointments starting before the specified date are pruned. One-time appointments with a start date on or after the specified date are included. Repeating appointments are truncated such that the first appointment in the sequence will happen on or after the specified date and those sequences that end before the specified date are removed. If this option is not specified, no appointments are pruned.

  • Use the -c option to specify the value for the character set attribute.

    The value should be a valid Sun-specific locale name (C or de, for example). The CDE platform-independent equivalent of the locale name is stored in the calendar. If this option is not specified, the CDE platform-independent name of the current locale associated with the process is used. This option is used when converting version 3 data to version 4 data and is ignored otherwise.

  • Use the -d option to specify the directory in which to save the original calendar file which is saved in a filed called calorig.calendar.

    If this option is not specified, the backup file is placed in the /var/spool/calendar directory.

    See the sdtcm_convert(1) man page for more details and examples of usage.

Examples

To convert the calendar user1 to version 4 data format and also prune the calendar:

% sdtcm_convert -v 4 -s 1/1/94 user1

To check data integrity of the calendar user1:

% sdtcm_convert user1

If no option is specified, sdtcm_convert will check the calendar file for data integrity.

dtcm_editor

Use the standalone Appointment Editor to create a Calendar-formatted appointment and save it in a file.

  1. Type dtcm_editor filename at the command line.

    The standalone Appointment Editor is displayed.

  2. Type a date in the Date field.

    Remember to use the date format set in the Date Format dialog box.

  3. Choose the Start and End times for the appointment.

  4. Type a description of the appointment in the What field.

  5. Choose a frequency for the appointment from the Occurs menu.

  6. Click Save to write the appointment contents to the file you specified on the command line.

dtcm_lookup

Use dtcm_lookup to view appointments on your calendar.

  1. Type dtcm_lookup at the command line to view appointments for the default view.

    For example, if Day view is the default, to view appointments for the current day:

    system% dtcm_lookup
    Appointments for Monday October 31, 1994:
    		1) Halloween
    		2) 2:30pm-3:30pm Staff meeting
    		3) 6:00pm Trick-or-treating
    		4) 7:15pm-10:00pm Choir practice
  2. To choose the calendar, date, or range of time for which to look up appointments, use the following syntax:

    dtcm_lookup [-c calendar] [-d date] [-v view]

    For example:

    system% dtcm_lookup -c hamilton@artist -d 10/28/1994 -v day
    Appointments for Friday October 28, 1994:
    		1) 9:00am-10:00am Project meeting
    		2) 1:30pm-2:00pm Testing
 
 
 
  Previous   Contents   Next