Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo
On Windows(Vista,XP), how the result code(return code) shall be passed from
REXX to batch ? REXX can be retrieved the variable of Windows by using value
function, but what built-in functions shall be used in case to set the
environment variable? The value set by VALUE function could not be retrieved
by batch command. address CMD "Set variable=99" in REXX also doesn't
get the value 99 by batch command.
The batch calls REXX, REXX returns the result to batch, then would like
evaluate the returned value.
Just specify the value on the EXIT or RETURN instruction in Rexx. Once it
returns to the batch file, the RC value is available in the %ERRORLEVEL%
Yes, in the ref manual, it describes so but it doesn't work that why I
submitted a help. did you test it ? I tested Vista and XP, both NG.
echo retc:%retc% errorlevel:%errorlevel%
echo rretc=%retc% rerrorlevel=%errorlevel%
------- end tt.bat ---
exit /b 82
----- end of chretc.bat ----
address CMD "set errorlevel=70";
address CMD "set retc=71";
"echo errorlevel=%errorlevel% retc=%retc%"
---- end of chretc.cmd -----
RESULT is below -----
Open Object Rexx Version 4.0.0
Build date: Aug 15 2009
Addressing Mode: 32
Copyright (c) IBM Corporation 1995, 2004.
Copyright (c) RexxLA 2005-2009.
All Rights Reserved.
This program and the accompanying materials
are made available under the terms of the Common Public License v1.0
which accompanies this distribution.
Yes, I did test this out before replying. Here's the small sample I used, and
it displays the return code value as expected: