Previous Topic: SLEEP CommandNext Topic: VER Command


STARTREXX Command

The STARTREXX command executes another REXX program.

Note: You can also use this command to start any executable program on a local system.

This command has the following format:

ADDRESS VOX "STARTREXX PROGRAM(progname[arguments])"
PROGRAM

Specifies the name of the REXX program that you want to execute and the arguments to pass to the program, if any.

Return Information:

After the STARTREXX command executes, it sets the special REXX return code variable RC.

Example:

The following REXX code illustrates how to use the STARTREXX command in a program that processes incoming calls destined for the help desk. When CA Automation Point receives a call, the HDCTRL.CMD program starts a program named HELPDESK.cmd to service the call automatically.

/* HDCTRL.CMD */

signal on halt Name DoExit

do forever
   /* Wait forever for an incoming call and any channel within */ 
   /* the HELPDESK group. */
   
address vox answer group(helpdesk) hookstate(onhook) prefix(handle)'
   
if RC == 0 then
   do
      /* Call answered. Start the HELPDESK.CMD */
      /* program to service the call.          */

      address vox 'startrexx program(helpdesk.cmd 'handle')'

   end

end

DoExit:

/*Exit from the command shell so that CA Automation Point can "cleanup."*/

'@exit'
end