Index: /branches/eam_branches/ipp-20140904/Ohana/src/opihi/dvo/Makefile
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/opihi/dvo/Makefile	(revision 37792)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/opihi/dvo/Makefile	(revision 37793)
@@ -46,4 +46,5 @@
 $(SRC)/badimages.$(ARCH).o	  	\
 $(SRC)/catdir.$(ARCH).o             	\
+$(SRC)/catname.$(ARCH).o             	\
 $(SRC)/cmatch.$(ARCH).o	  	\
 $(SRC)/cmpload.$(ARCH).o	  	\
Index: /branches/eam_branches/ipp-20140904/Ohana/src/opihi/dvo/catname.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/opihi/dvo/catname.c	(revision 37793)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/opihi/dvo/catname.c	(revision 37793)
@@ -0,0 +1,104 @@
+# include "dvoshell.h"
+
+int catname (int argc, char **argv) {
+  
+  int i, N;
+  struct stat filestat;
+
+  int ShowHost = FALSE;
+  if ((N = get_argument (argc, argv, "-host"))) {
+    remove_argument (N, &argc, argv);
+    ShowHost = TRUE;
+  }
+  int ShowBackup = FALSE;
+  if ((N = get_argument (argc, argv, "-backup"))) {
+    remove_argument (N, &argc, argv);
+    ShowBackup = TRUE;
+  }
+  int FullName = FALSE;
+  if ((N = get_argument (argc, argv, "-full-name"))) {
+    remove_argument (N, &argc, argv);
+    FullName = TRUE;
+  }
+  int ShowFlags = FALSE;
+  if ((N = get_argument (argc, argv, "-flags"))) {
+    remove_argument (N, &argc, argv);
+    ShowFlags = TRUE;
+  }
+  int PARALLEL = FALSE;
+  if ((N = get_argument (argc, argv, "-parallel"))) {
+    remove_argument (N, &argc, argv);
+    PARALLEL = TRUE;
+  }
+
+  if (argc != 2) {
+    gprint (GP_ERR, "USAGE: catname name [-host] [-backup] [-flags]\n");
+    return (FALSE);
+  }
+
+  char *CATDIR = GetCATDIR();
+  if (!CATDIR) {
+    gprint (GP_ERR, "CATDIR is not set\n");
+    return FALSE;
+  }
+  SkyTable *sky = GetSkyTable ();
+  if (!sky) {
+    gprint (GP_ERR, "failed to load sky table for database\n");
+    return FALSE;
+  }
+  HostTable *table = HostTableLoad (CATDIR, sky->hosts);
+  if (!table) {
+    gprint (GP_ERR, "ERROR: failure reading Host Table %s for database %s\n", sky->hosts, CATDIR);
+    return FALSE;
+  }    
+  SkyList *skylist = SkyListByName (sky, argv[1]);
+
+  // prepare to handle interrupt signals
+  signal (SIGINT, handle_interrupt);
+  interrupt = FALSE;
+
+  for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
+    char *filename = NULL;
+    if (PARALLEL) {
+      SkyRegion *region = skylist[0].regions[i];
+      int hostID = (region->hostFlags & DATA_USE_BCK) ? region->backupID : region->hostID;
+      int index = table->index[hostID];
+    
+      char hostfile[1024];
+      snprintf (hostfile, 1024, "%s/%s.cpt", table->hosts[index].pathname, region->name);
+      filename = hostfile;
+    } else {
+      filename = skylist[0].filename[i];
+    }
+
+    gprint (GP_ERR, "%3d %s", i, skylist[0].regions[i][0].name);
+    if (stat (filename, &filestat) != -1) {
+      gprint (GP_ERR, " +");
+    } else {
+      gprint (GP_ERR, " -");
+    } 
+    if (ShowHost) {
+      gprint (GP_ERR, "  %3d", skylist[0].regions[i][0].hostID);
+    } else {
+      gprint (GP_ERR, "     ");
+    }
+    if (FullName) {
+      gprint (GP_ERR, "  %s", filename);
+    }
+    if (ShowBackup) {
+      gprint (GP_ERR, "  %3d", skylist[0].regions[i][0].backupID);
+    } else {
+      gprint (GP_ERR, "     ");
+    }
+    if (ShowFlags) {
+      gprint (GP_ERR, "  0x%04x", skylist[0].regions[i][0].hostFlags);
+    } else {
+      gprint (GP_ERR, "        ");
+    }
+    gprint (GP_ERR, "\n");
+    set_str_variable ("CATNAME", filename);
+  }
+
+  return (TRUE);
+  SkyListFree (skylist);
+}
Index: /branches/eam_branches/ipp-20140904/Ohana/src/opihi/dvo/dvo_host_utils.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/opihi/dvo/dvo_host_utils.c	(revision 37792)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/opihi/dvo/dvo_host_utils.c	(revision 37793)
@@ -137,4 +137,5 @@
 
   // determine the sky region 
+  // XXX EAM 20141230 : this needs to respect the -region selection
   double Rmin, Rmax, Dmin, Dmax;
   get_skyregion (&Rmin, &Rmax, &Dmin, &Dmax);
Index: /branches/eam_branches/ipp-20140904/Ohana/src/opihi/dvo/init.c
===================================================================
--- /branches/eam_branches/ipp-20140904/Ohana/src/opihi/dvo/init.c	(revision 37792)
+++ /branches/eam_branches/ipp-20140904/Ohana/src/opihi/dvo/init.c	(revision 37793)
@@ -7,4 +7,5 @@
 int calmextract     PROTO((int, char **));
 int catlog          PROTO((int, char **));
+int catname         PROTO((int, char **));
 int catdir_define   PROTO((int, char **));
 int ccd             PROTO((int, char **));
@@ -68,4 +69,5 @@
 //  {1, "calextract",  calextract,   "extract photometry calibration"},
 //  {1, "calmextract", calmextract,  "extract photometry calibration"},
+  {1, "catname",     catname,      "list catalog files by name"},
   {1, "catdir",      catdir_define,"re-define CATDIR"},
 //  {1, "ccd",         ccd,          "plot color-color diagram"},
