Workbook for SLD Offline Users - DUCS

What is DUCS?

SLD offline software currently runs on ten different computers or computer clusters at eight different locations around the world. These systems include three different kinds of platforms, DEC Vax,DEC Alpha and IBM VM. To make the same software available and up-to-date on all of these platforms at all of these locations, SLD uses a code distribution system written at SLAC called DUCS (Distributed Update Control System).

Various SLD collaborators submit new code to DUCS via BITNET. The code is sent to a central distribution point, currently SLACVM, and from there is sent out again via BITNET to all of the computers on DUCS. Along the way, DUCS takes care of a variety of code maintenance tasks such as insuring that each computer installs the code in the same order that it was first sent in to DUCS. If necessary, DUCS holds files until a given computer system is able to absorb them.

DUCS uses VMS Logical Names

On VMS, all of the code in DUCS is stored in a set of disk directories that can easily be referred to through some logical names. These logical names are set up for you automatically as part of your login procedure.

The most powerful of these logical names is DUCSSEARCH. This logical name can help you find any file known to DUCS. As a first example, you will locate the file that determines the form of the PHCHRG banks you have already studied.

From the DCL prompt, type DIR/DATE DUCSSEARCH:PHCHRG.TEMPLATE

You should get a response like:

   Directory DUCSROOT:[DST]

   PHCHRG.TEMPLATE;11    6-OCT-1994 08:32:03.04

   Total of 1 file.

This tells you that the file lives in a directory called DUCSROOT:[DST].

You can type out this file via TYPE DUCSSEARCH:PHCHRG.TEMPLATE

Code Sections

As of this writing, DUCS contains about 256 Megabytes of code (including source code, listings, object libraries, shareables, constants and help files). To organize the thousands of files involved, DUCS divides the code into about 100 groups called "DUCS Sections." On VMS, each DUCS Section is a separate directory.

To see the whole list of DUCS sections,

from the DCL prompt, type DUCS QUERY

You should get the following response:

   AFBCH   :PROD  HEAVY   :PROD  MCHWK   :PROD  ONLDC   :PROD  TRIGGER :PROD
   BLIFE   :PROD  IDA     :PROD  MCKORZ  :PROD  ONLERR  :PROD  UDUC    :PROD
   CART    :PROD  IDA3    :PROD  MCL63   :PROD  ONLLAC  :PROD  UEDT    :PROD
   CATSRV  :PROD  JAZELLE :PROD  MCL72   :PROD  ONLVTX  :PROD  UEVE    :PROD
   CERNV   :PROD  JAZQAPT :PROD  MCL73   :PROD  ONLWIC  :PROD  UGRA    :PROD
   CETI    :PROD  KAL     :PROD  MCL74   :PROD  PAW     :PROD  UHIS    :PROD
   CRDRAWD :PROD  KON     :PROD  MCLEPT  :PROD  QCD     :PROD  UMOR    :PROD
   CRID    :PROD  LAC     :PROD  MCLUND  :PROD  QPOL    :PROD  USER    :PROD
   DATACAT :PROD  LUM     :PROD  MCMUBG  :PROD  RECON   :PROD  UTIL    :PROD
   DC      :PROD  MC      :PROD  MCRADC  :PROD  RECVRT  :PROD  UTPU    :PROD
   DISPLAY :PROD  MC1TRK  :PROD  MCSUSY  :PROD  REXX    :PROD  UVAXSRV :PROD
   DOC     :PROD  MCBEAM  :PROD  MCTWOG  :PROD  RTH     :PROD  UWRI    :PROD
   DST     :PROD  MCBHAG  :PROD  MCUBAB  :PROD  RTOFF   :PROD  VMUTIL  :PROD
   DSTUTIL :PROD  MCBHLM  :PROD  MCUCLA  :PROD  SDISPLAY:PROD  VTX     :PROD
   DTAG    :PROD  MCBREM  :PROD  MCYFS   :PROD  SGNL    :PROD  VXFNDTMP:PROD
   DUCSNEWS:PROD  MCBZ    :PROD  MFIT    :PROD  SLD     :PROD  VXFNDUTL:PROD
   ELECWEAK:PROD  MCCOS   :PROD  MIDAS   :PROD  SLDMIDAS:PROD  WIC     :PROD
   EMI     :PROD  MCDIAG  :PROD  MORTRAN2:PROD  SMON    :PROD  WMATCH  :PROD
   ERRLOG  :PROD  MCEEG   :PROD  NAMES   :PROD  STATUS  :PROD  WUTIL   :PROD
   EXAMPLES:PROD  MCEP    :PROD  NAPL    :PROD  SWIM    :PROD  ZXFIND  :PROD
   FASTMC  :PROD  MCHRWG54:PROD  NETIDA  :PROD  TAU     :PROD
   GEANTSLD:PROD  MCHRWG57:PROD  ONLCRID :PROD  TRACK   :PROD

The DUCS section names are as descriptive as seven characters allows. The deep guts of IDA live in the IDA section. The drift chamber track reconstruction code lives in the DC section. The luminosity monitor code lives in the LUM section. A brief description of what lives in the other sections is available in the document DUCS Sections:SLDs's File System.

Separate logical names exist to allow you to easily specify the directory in which any particular DUCS section lives. These logical names consist of the prefix DUCS followed by the section name.

As an example of using one of these logical names, list the contents of the directory full of LUM code,

type DIR/DATE DUCSLUM

PROD, DEV, TEST and TNOD Modes

DUCS contains features to allow software developers to maintain and share new versions of code without excessively disturbing other users. Each DUCS section may be set to one of three "DUCS Modes." The mode can be either PROD (for Production), DEV (for Development) TEST or TNOD (for Test but NO Dev).

At any given time, most users are using the Production version of most code. But if, for example, someone has just released a new version of the drift chamber track finding package and they want a few other users to test this new code before they release it to the entire SLD collaboration, they may submit the new code to the Development area of the DC DUCS section. The Development area is a separate directory where this new code is kept without replacing the Production code.

Users can specify that they wish to use this Development code by typing DUCS DEV DC

Try that and then repeat the DUCS QUERY command that you issued earlier. Notice that the response says :DEV next to the section name DC while it says :PROD next to every other section. This indicates that you would now be using the Development version of the DC code.

When a section is set to DEV, DUCS will look for any code of that section first in the Development directory, and then, it if fails to find it there, will look in the Production library.

To set DUCS back to use the Production DC code, issue the command

DUCS PROD DC

You can specify several sections together in a single DUCS DEV command,

for example DUCS DEV DC,KAL,WIC

You can quickly reset all sections to PROD with the single command

DUCS PROD ALL

Be careful while using DEV code. While great effort is taken to insure that the code in PROD works well, code in DEV often contains bugs or may be designed to require that some other section be in DEV at the same time. In general, don't set any section to DEV unless you know why you are doing so.

The DUCS command two more options, DUCS TEST and DUCS TNOD, which will be explained in more detail later when you start writing your own code. This is used to specify that code should come not from PROD or DEV but from some other directory, often your own directory.

For example, DUCS TEST DC *

will cause DUCS to look for DC code first in your own current directory (your * directory). If it fails to find the code there, it will then look in the appropriate DEV directory and then in the appropriate PROD directory.

The TNOD mode is like TEST mode except that it leaves the DEV directory out of the search order.

For example, DUCS TNOD DC *

will cause DUCS to look for DC code first in your own current directory (your * directory). If it fails to find the code there, it will then look in the appropriate PROD directory, but will never look in the DEV directory.

Saving Your Current DUCS Settings

The command DUCS SAVE can be used to save your current DUCS settings. It works by writing out a file that contains the necessary DUCS PROD, DUCS DEV, DUCS TEST and DUCS TNOD commands to return DUCS to its saved state. You specify what file this information is to be written to.

For example, DUCS SAVE MYDUCS.COM

will cause DUCS to write out a file in your current directory called MYDUCS.COM. This file will contain a set of DUCS commands. If you later run this file (by typing @MYDUCS.COM), your saved DUCS settings will be restored.

More on DUCS Logical Names

You can refer directly to the PROD or DEV directory for a given section by using logical names that start with PROD or DEV.

For example, the PROD version of the DC code lives in the directory PRODDC. The DEV version lives in the directory DEVDC. Similarly, there is PRODKAL and DEVKAL, PRODLUM and DEVLUM, and so on.

There are also more abbreviated logical names for all of the above. They use just the letter P instead of PROD and D instead of DEV. For example, there is PDC and DDC, PKAL and DKAL, and so on.

Everything about DUCS is done via logical names. In fact, all that the DUCS PROD or DUCS DEV command does is change the meaning of a logical name.

Type DUCS PROD DC

Then type SHOW LOGICAL DUCSDC

You should see that the logical name DUCSDC points to the logical name PDC which in turn points to the actual directory where the production code lives.

Now type DUCS DEV DC

Then type SHOW LOGICAL DUCSDC, or even better use the up arrow key to recover the command.

You should see that the logical name DUCSDC now points to the logical name DPDC which in turn points to DEVDC and PRODDC which in turn point to the two directories where the development and production DC code live.

This may seem like a lot of review of logical names, but logical names are so important to the VMS operating system that all users need to become completely comfortable with them.


Before you go on with the workbook, do a DUCS PROD ALL to make sure that you haven't left your DUCS in some unexpected state.

Back to Workbook Front Page

Joseph Perl
14 September 1995