NAME
sdtcm_convert - calendar data conversion utility
SYNOPSIS
sdtcm_convert [-v output-version] [-s <mm/dd/yy>]
[-c locale-info] [-d backup-directory] calendar
DESCRIPTION
sdtcm_convert is a calendar data conversion utility which
converts version 3 (OpenWindows calendar data format) calen-
dar data format to version 4, the extensible calendar data
format, and vice versa. If the -s option is specified, it
also prunes the calendar while doing the conversion. The
utility can also prune a calendar without doing data conver-
sion.
If no option is specified, sdtcm_convert will check the
calendar file for data integrity.
sdtcm_convert must be run by the super-user or the owner of
the calendar. The super-user can run sdtcm_convert on any
calendar. A regular user can only run sdtcm_convert on
his/her own calendar. The program will look for the speci-
fied calendar in the /var/spool/calendar directory. When
the conversion is done, the original calendar file will be
saved in the file "calorig.calendar" which will be placed in
the specified backup directory or /var/spool/calendar by
default. The new data will be saved in the calendar file
"callog.calendar" in the /var/spool/calendar directory.
If the calendar server, rpc.cmsd(1), is running,
sdtcm_convert will send a SIGHUP signal to the server and
wait until it quits before doing any data conversion. This
is to ensure the data integrity of the calendar.
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.
Note: The OpenWindows calendar server does not support the
version 4 data format. If you need to switch back to the
OpenWindows calendar server and you have a version 4 calen-
dar, you should convert your calendar to the version 3 data
format before switching the server. However, data not sup-
ported in the version 3 data format will be lost during the
conversion. For example, all calendar attributes except the
access list, entry attributes such as date of creation, date
of last update, etc. will be lost.
OPTIONS
The following options are available:
-v output-version
Specifies the version of the output. Valid values
are 3 (OW calendar data format) and 4 (the extensi-
ble data format). If this option is not specified,
the output version will be the same as that of the
specified calendar and no data conversion will be
done. The data version of the calendar is
displayed in the About Calendar dialog box of
dtcm(1).
-s <mm/dd/yy>
Specifies the date to prune the calendar. Appoint-
ments starting before the specified date will be
pruned. One-time appointments with start date on
or after the specified date will be included in the
conversion. Repeating appointments will be trun-
cated 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 will be removed. If this option is not speci-
fied, no appointments will be pruned.
-c locale-info
Specifies the value to be used in the character set
calendar attribute. The value should be a valid
Sun-specific locale name (e.g. "C" or "de"). The
CDE platform-independent equivalent of it will be
stored in the calendar. If this option is not
specified, the CDE platform-independent name of the
current locale associated with the process will be
used. This option is used when converting version
3 data to version 4 data and will be ignored other-
wise.
-d backup-directory
Specifies the directory in which to place the ori-
ginal calendar file. The original file will be
backed up in a file called "calorig.calendar" where
calendar is the name of the calendar.
OPERANDS
The following operand is supported:
calendar
The name of the calendar to be converted. The for-
mat is calendar-name[@host-name]. If the host name
is specified, it must be the name of the local
host.
ENVIRONMENT VARIABLES
The following environment variables affect the execution of
sdtcm_convert:
LANG Provide a default value for the interna-
tionalization variables that are unset or
null. If LANG is unset or null, the
corresponding value from the
implementation-specific default locale
will be used. If any of the internation-
alization variables contains an invalid
setting, the utility behaves as if none of
the variables had been defined.
LC_ALL If set to a non-empty string value, over-
ride the values of all the other interna-
tionalization variables.
LC_MESSAGES Determine the locale that is used to
affect the format and contents of diagnos-
tic messages written to standard error and
informative messages written to standard
output.
NLSPATH Determine the location of message catalogs
for the processing of LC_MESSAGES.
STDIN
The standard input is used to receive user replies in case
user confirmation is needed.
STDOUT
Used for informative messages to the user.
STDERR
Used for diagnostic and error messages.
INPUT FILES
/var/spool/calendar/callog.ccaalleennddaarr
The calendar file of the specified
calendar.
OUTPUT FILES
/var/spool/calendar/calorig.ccaalleennddaarr
The default backup file of the original
calendar file.
backup-directory/calorig.ccaalleennddaarr
The backup file of the original calendar
file if the -d option is specified.
EXIT STATUS
The following exit values are returned:
0 Successful completion.
>0 An error occurred.
CONSEQUENCES OF ERRORS
If error occurs, the original calendar file will not be
changed.
EXAMPLES
To convert the calendar "user1" to version 4 data format:
example% sdtcm_convert -v 4 user1
Loading the calendar ...
Doing conversion ...
Writing out new file ...
Conversion done successfully.
Total number of appointments= 709
Number of one-time appointments converted= 670
Number of repeating appointments converted= 39
Number of one-time appointments pruned= 0
Number of repeating appointments pruned= 0
The original file is saved in /var/spool/calendar/calorig.user1
example%
To convert the calendar "user1" to version 4 data format
starting from 1/1/94:
example% sdtcm_convert -v 4 -s 1/1/94 user1
Loading the calendar ...
Doing conversion ...
Writing out new file ...
Conversion done successfully.
Total number of appointments= 709
Number of one-time appointments converted= 233
Number of repeating appointments converted= 19
Number of one-time appointments pruned= 437
Number of repeating appointments pruned= 20
The original file is saved in /var/spool/calendar/calorig.user1
example%
To prune the calendar "user1" retaining appointments start-
ing from 7/1/94 and put the backup of the original calendar
file in the directory /export/backup:
example% sdtcm_convert -s 7/1/94 -d /export/backup user1
Loading the calendar ...
Doing conversion ...
Writing out new file ...
Conversion done successfully.
Total number of appointments= 252
Number of one-time appointments converted= 190
Number of repeating appointments converted= 19
Number of one-time appointments pruned= 43
Number of repeating appointments pruned= 0
The original file is saved in /export/backup/calorig.user1
example%
To convert the calendar "user1" from version 4 to version 3
data format:
example% sdtcm_convert -v 3 user1
Loading the calendar ...
WARNING!! Data will be lost when converting version 4 data format
back to version 3 data format.
Do you want to continue? (Y/N) [Y]
Doing conversion ...
Writing out new file ...
Conversion done successfully.
Total number of appointments= 209
Number of one-time appointments converted= 190
Number of repeating appointments converted= 19
Number of one-time appointments pruned= 0
Number of repeating appointments pruned= 0
The original file is saved in /var/spool/calendar/calorig.user1
example%
To do sanity check on calendar "user1":
example% sdtcm_convert user1
Loading the calendar ...
The calendar file is ok.
Total number of appointments= 209
Number of one-time appointments= 190
Number of repeating appointments= 19
example%
SEE ALSO
rpc.cmsd(1), dtcm(1).
|
Закладки на сайте Проследить за страницей |
Created 1996-2025 by Maxim Chirkov Добавить, Поддержать, Вебмастеру |