OSF DCE Administration Guide--Core Components
DCE Control Program Introduction
with multiple administrators. For example, different .dcecprc files for
each administrator could use dcecp source commands to call specific
commands and task scripts that are tailored to particular areas of
administration.
The rest of this section illustrates a simple task script and shows one way to make the
script available for personal use. Our example begins with the control program’s
existing clock object that shows the current time. However, the time is simply a DTS
timestamp from the clock on the local host as in
dcecp> clock show
1994-10-03-10:22:59.991-04:00I-----
dcecp>
Let’s say you create a procedure that gets a timestamp from a DTS server but also
displays the name of the DTS server with the time as in the following example which
invokes a user-created procedure called show_clock:
dcecp> show_clock
Time on mars is 1994-09-30-15:03:43.979-04:00I-----
dcecp>
You can make this procedure available to one user by including the procedure in the
user’s .dcecprc file. The following sample .dcecprc file includes user customizations
consisting of the _dcp_show_clocks procedure and an alias that lets you invoke the
procedure with the simpler show_clocks command name. Another procedure called
_dcp_whoami shows the current login identity information. Note the order of
operations in the .dcecprc file. Procedures are defined at the beginning of the file.
Renaming and invoking the procedures must occur after the procedures are defined.
##
## Start up commands
##
# A simple command to rerun .dcecprc after modifications
proc .d {} {source $HOME/.dcecprc}
# Show your current login name and your current cell name.
proc _dcp_whoami {} {
global _c _u
return "You are ’$_u’ logged into ’$_c’."
}
124243 Tandem Computers Incorporated 1− 17