Entering a REXX to issue Windows command getting rc<-1>
search cancel

Entering a REXX to issue Windows command getting rc<-1>

book

Article ID: 7477

calendar_today

Updated On:

Products

Automation Point

Issue/Introduction

Entering a REXX to issue Windows (via DOS prompt) command getting rc<-1>.

See the sample small REXX program below:

/* REXX */
windows_command = 'CD "C:\Users"' windows_command
exit
It gets a RC = -1 when the window_command line of the REXX program is executed.

 

Environment

Any Windows Server release certified to run with CA Automation Point

Cause

When executing Windows commands from an AP REXX program the ADDRESS 'CMD' command processor must be used.

 

 

Resolution

To issue a Windows command our REXX program should include the ADDRESS 'CMD' command processor:

/* REXX */
 windows_command = 'CD "C:\Users\"'
 ADDRESS 'CMD' windows_command
exit

 

 

Additional Information

Related knowledge document:

How do I call an EXE file from a CA Automation Point rule?

CA Automation Point documentation:

Automating with REXX Programs - Command Environments