Index: trunk/Ohana/src/opihi/dvo/gcat.c
===================================================================
--- trunk/Ohana/src/opihi/dvo/gcat.c	(revision 34088)
+++ trunk/Ohana/src/opihi/dvo/gcat.c	(revision 39294)
@@ -9,4 +9,9 @@
   SkyList *skylist;
 
+  int ShowFile = FALSE;
+  if ((N = get_argument (argc, argv, "-file"))) {
+    remove_argument (N, &argc, argv);
+    ShowFile = TRUE;
+  }
   int ShowHost = FALSE;
   if ((N = get_argument (argc, argv, "-host"))) {
@@ -41,4 +46,14 @@
   skylist = SkyListByRadius (sky, -1, Ra, Dec, Radius);
 
+  HostTable *table = NULL;  
+  char *CATDIR = GetCATDIR();
+  if (HostTableExists (CATDIR, sky->hosts)) {
+    table = HostTableLoad (CATDIR, sky->hosts);
+    if (!table) {
+      gprint (GP_ERR, "ERROR: failure reading Host Table %s for parallel database %s\n", sky->hosts, CATDIR);
+      return FALSE;
+    }    
+  }
+
   // prepare to handle interrupt signals
   signal (SIGINT, handle_interrupt);
@@ -46,6 +61,22 @@
 
   for (i = 0; (i < skylist[0].Nregions) && !interrupt; i++) {
-    gprint (GP_ERR, "%3d %s", i, skylist[0].regions[i][0].name);
-    if (stat (skylist[0].filename[i], &filestat) != -1) {
+    SkyRegion *region = skylist[0].regions[i];
+
+    char hostfile[1024];
+    if (table) {
+      int hostID = (region->hostFlags & DATA_USE_BCK) ? region->backupID : region->hostID;
+      int index = table->index[hostID];
+      snprintf (hostfile, 1024, "%s/%s.cpt", table->hosts[index].pathname, region->name);
+    } else {
+      strcpy (hostfile, skylist[0].filename[i]);
+    }
+
+    if (ShowFile) {
+      gprint (GP_ERR, "%3d %s", i, hostfile);
+    } else {
+      gprint (GP_ERR, "%3d %s", i, region->name);
+    }
+
+    if (stat (hostfile, &filestat) != -1) {
       gprint (GP_ERR, " *");
     } else {
@@ -53,20 +84,20 @@
     } 
     if (ShowHost) {
-      gprint (GP_ERR, "  %3d", skylist[0].regions[i][0].hostID);
+      gprint (GP_ERR, "  %3d", region->hostID);
     } else {
       gprint (GP_ERR, "     ");
     }
     if (ShowBackup) {
-      gprint (GP_ERR, "  %3d", skylist[0].regions[i][0].backupID);
+      gprint (GP_ERR, "  %3d", region->backupID);
     } else {
       gprint (GP_ERR, "     ");
     }
     if (ShowFlags) {
-      gprint (GP_ERR, "  0x%04x", skylist[0].regions[i][0].hostFlags);
+      gprint (GP_ERR, "  0x%04x", region->hostFlags);
     } else {
       gprint (GP_ERR, "        ");
     }
     gprint (GP_ERR, "\n");
-    set_str_variable ("CATNAME", skylist[0].filename[i]);
+    set_str_variable ("CATNAME", hostfile);
   }
 
