I'm not looking to close the DOS window that started my process
All this command does is hide the DOS window that $pgm is spawning (so launch rsh with that type of command). Look around on the site, there have been many other questions WRT the same thing, including my own - I have used this solution and it works.