PillarSoft

http://www.pillarsoft.net/os-2-software/rexx/session-starter.shtml

Session starter

Contributed by: Thomas Korfhage

Here is a real live example where I use it from within a VisProRexx Program in respond to a "when - clicked event."

Please keep in mind, when starting an independent CMD-session this way, you have no automatic way to know when it is finished. Also it will not be terminated together with the starting program. If You need special control, You have to do it yourself e.g. via file or semaphores.


 

 


/* Event Clicked/selected - ~GetMail/News  1011 */
Arg window self
'startx "E:&cd\COM\CHANGI&GETNEWS.CMD" /C GetNews'

This will start an independent CMD.EXE  with Title "GetNews"
   the parameter "/C" means: Close after execution ended
   You can use "/K" to preserve the OS/2-Window if you like to examine the output.

For the VisProRexx - program  this task is finished, because the new
started CMD-process/session is not started as a child of it.

This new started CMD will execute the line
     "E:&cd\COM\CHANGI&GETNEWS.CMD"
      E: - switch to drive E:
      cd - change to dir
     call getnews.cmd

getnews itself contains lines that will start other programs also CMD/REXX procs.
e.g.
   start "NEWS From news.software.ibm.com" gethost.cmd news.software.ibm.com