Index: /trunk/Ohana/src/opihi/pcontrol/HostOps.c
===================================================================
--- /trunk/Ohana/src/opihi/pcontrol/HostOps.c	(revision 3188)
+++ /trunk/Ohana/src/opihi/pcontrol/HostOps.c	(revision 3189)
@@ -48,5 +48,21 @@
 }
 
-int FindHost (char *name, int QueueID) {
+int FindHost (IDtype HostID, int QueueID) {
+
+  Queue *queue;
+
+  queue = GetHostQueue (QueueID);
+  if (queue == NULL) return (-2);
+
+  for (i = 0; i < queue[0].Nobject; i++) {
+    host = (Host *) queue[0].object;
+    if (host[0].HostID == HostID) {
+      return (i);
+    }
+  }
+  return (-1);
+}
+
+int FindNamedHost (char *name, int QueueID) {
 
   Queue *queue;
@@ -74,5 +90,5 @@
   host[0].stdout   = 0;
   host[0].stderr   = 0;
-  host[0].ID       = NextHostID();
+  host[0].HostID   = NextHostID();
 
   host[0].markoff  = FALSE;
Index: /trunk/Ohana/src/opihi/pcontrol/JobOps.c
===================================================================
--- /trunk/Ohana/src/opihi/pcontrol/JobOps.c	(revision 3188)
+++ /trunk/Ohana/src/opihi/pcontrol/JobOps.c	(revision 3189)
@@ -48,5 +48,5 @@
 }
   
-int FindJob (int JobID, int QueueID) {
+int FindJob (IDtype JobID, int QueueID) {
 
   Job *job;
Index: /trunk/Ohana/src/opihi/pcontrol/host.c
===================================================================
--- /trunk/Ohana/src/opihi/pcontrol/host.c	(revision 3188)
+++ /trunk/Ohana/src/opihi/pcontrol/host.c	(revision 3189)
@@ -39,27 +39,31 @@
 
   if (On) {
-    host = FindHost (argv[1], PCONTROL_HOST_OFF);
-    if (host == NULL) {
+    N = FindNamedHost (argv[1], PCONTROL_HOST_OFF);
+    if (N < 0) {
       fprintf (stderr, "host %s is not OFF\n", argv[1]);
       return (FALSE);
     }
-    DownHost (host);
+    host = GetHost (PCONTROL_HOST_OFF, N);
+    PutHost (host, PCONTROL_HOST_DOWN, QUEUE_BOTTOM);
     return (TRUE);
   }
 
   if (Off) {
-    host = FindHost (argv[1], PCONTROL_HOST_IDLE);
-    if (host != NULL) {
-      OffHost (host);
+    N = FindNamedHost (argv[1], PCONTROL_HOST_IDLE);
+    if (N >= 0) {
+      host = GetHost (PCONTROL_HOST_OFF, N);
+      PutHost (host, PCONTROL_HOST_OFF, QUEUE_BOTTOM);
       return (TRUE);
     }
-    host = FindHost (argv[1], PCONTROL_HOST_DOWN);
-    if (host != NULL) {
-      OffHost (host);
+    N = FindNamedHost (argv[1], PCONTROL_HOST_DOWN);
+    if (N >= 0) {
+      host = GetHost (PCONTROL_HOST_OFF, N);
+      PutHost (host, PCONTROL_HOST_OFF, QUEUE_BOTTOM);
       return (TRUE);
     }
-    host = FindHost (argv[1], PCONTROL_HOST_BUSY);
-    if (host != NULL) {
-      MarkOffHost (host);
+    N = FindNamedHost (argv[1], PCONTROL_HOST_BUSY);
+    if (N >= 0) {
+      host = GetHost (PCONTROL_HOST_OFF, N);
+      PutHost (host, PCONTROL_HOST_OFF, QUEUE_BOTTOM);
       return (TRUE);
     }
Index: /trunk/Ohana/src/opihi/pcontrol/kill.c
===================================================================
--- /trunk/Ohana/src/opihi/pcontrol/kill.c	(revision 3188)
+++ /trunk/Ohana/src/opihi/pcontrol/kill.c	(revision 3189)
@@ -4,5 +4,5 @@
 
   Job *job;
-  int JobID;
+  int JobID, N;
 
   if (argc < 2) {
@@ -12,12 +12,12 @@
   JobID = atoi (argv[1]);
 
-  job = FindJob (JobID, PCONTROL_JOB_BUSY);
-  if (job != NULL) {
-    KillJob (job);
-    return (TRUE);
+  N = FindJob (JobID, PCONTROL_JOB_BUSY);
+  if (N < 0) {
+    fprintf (stderr, "job %s not BUSY\n", argv[1]);
+    return (FALSE);
   }
-
-  fprintf (stderr, "job %s not BUSY\n", argv[1]);
-  return (FALSE);
+  job = GetJob (PCONTROL_JOB_BUSY, N);
+  KillJob (job);
+  return (TRUE);
 }
 
@@ -25,5 +25,5 @@
 
   Job *job;
-  int JobID;
+  int JobID, N;
 
   if (argc < 2) {
@@ -32,17 +32,21 @@
   }
   JobID = atoi (argv[1]);
+  /* use a string interp to convert JobIDs to ints ? */
 
-  job = FindJob (JobID, PCONTROL_JOB_PENDING);
-  if (job != NULL) {
+  N = FindJob (JobID, PCONTROL_JOB_PENDING);
+  if (N >= 0) {
+    job = GetJob (PCONTROL_JOB_PENDING, N);
     DelJob (job);
     return (TRUE);
   }
-  job = FindJob (JobID, PCONTROL_JOB_CRASH);
-  if (job != NULL) {
+  N = FindJob (JobID, PCONTROL_JOB_CRASH);
+  if (N >= 0) {
+    job = GetJob (PCONTROL_JOB_CRASH, N);
     DelJob (job);
     return (TRUE);
   }
-  job = FindJob (JobID, PCONTROL_JOB_EXIT);
-  if (job != NULL) {
+  N = FindJob (JobID, PCONTROL_JOB_EXIT);
+  if (N >= 0) {
+    job = GetJob (PCONTROL_JOB_EXIT, N);
     DelJob (job);
     return (TRUE);
