Index: /trunk/psModules/src/config/pmConfig.c
===================================================================
--- /trunk/psModules/src/config/pmConfig.c	(revision 9903)
+++ /trunk/psModules/src/config/pmConfig.c	(revision 9904)
@@ -4,6 +4,6 @@
  *  @author EAM (IfA)
  *
- *  @version $Revision: 1.52 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-11-07 22:30:33 $
+ *  @version $Revision: 1.53 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-11-08 02:10:07 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -41,4 +41,5 @@
     psFree(config->arguments);
     psFree(config->database);
+    psFree(config->workdir);
 }
 
@@ -59,4 +60,5 @@
     config->argc = argc;
     config->argv = argv;
+    config->workdir = NULL;
 
     // the file structure is used to carry pmFPAfiles
@@ -381,4 +383,12 @@
     }
 
+    // Get the working directory
+    config->workdir = psMemIncrRefCounter(psMetadataLookupStr(NULL, config->site, "WORKDIR"));
+    if (!config->workdir) {
+        psWarning("WORKDIR is not set in the site configuration\n");
+    } else {
+        config->workdir = resolveEnvVar(config->workdir);
+    }
+
     // define the config-file search path (configPath).  Ensure that
     // it contains the directory where we found the config file in
Index: /trunk/psModules/src/config/pmConfig.h
===================================================================
--- /trunk/psModules/src/config/pmConfig.h	(revision 9903)
+++ /trunk/psModules/src/config/pmConfig.h	(revision 9904)
@@ -9,6 +9,6 @@
 /// @author Eugene Magnier, IfA
 ///
-/// @version $Revision: 1.17 $ $Name: not supported by cvs2svn $
-/// @date $Date: 2006-10-20 23:03:35 $
+/// @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
+/// @date $Date: 2006-11-08 02:10:07 $
 ///
 /// Copyright 2005-2006 Institute for Astronomy, University of Hawaii
@@ -48,4 +48,5 @@
     psMetadata *arguments;              ///< Processed command-line arguments
     psMetadata *files;                  ///< pmFPAfiles used for analysis
+    psString workdir;                   ///< Working directory
     psDB *database;                     ///< Database handle
     int *argc;                          ///< Number of command-line arguments
