Bootstrap

Calling a Batch File/EXE from an SQR

Use the following code to call a batch file or executable from an SQR. Put the complete path of the batch or executable in the variable $command_line. If $message is not 0 then you have an error from the batch / exe

 


!----------------------------------------------------------------------
! Call-Command
! DESCR: This procedure is used to make a OS call to the EXE
! executable.
!----------------------------------------------------------------------
BEGIN-PROCEDURE call-command
display 'CALL-COMMAND PROCEDURE'

CALL SYSTEM USING $command_line #status WAIT
let $Message=' Operating system return code = ' // to_char(#Status)

display '$command_line: ' noline
display $command_line
display $Message

end-procedure call-command
!----------------------------------------------------------------------

转载于:https://www.cnblogs.com/GoDevil/archive/2009/01/09/1372673.html

;