home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
HomeWare 14
/
HOMEWARE14.bin
/
os2
/
cenv2_19.arj
/
ERRLEV.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1994-03-08
|
892b
|
18 lines
@echo off
REM ************************************************************************
REM *** ERRLEV.BAT - Call a program, passing up to 8 parameters, and ***
REM *** ver.1 set the ERRLEV environment variable from the return ***
REM *** Code of that program. Also return with ERRORLEVEL ***
REM *** set as if the program was run directly from the ***
REM *** command prompt or from a batch file. ***
REM ************************************************************************
if not "%1" == "" GOTO RUN_ERRLEV
ECHO ERRLEV - Call a program, passing up to 8 paramters. Sets ERRLEV environment
ECHO variable to the value returned. Also set ERRORLEVEL for batch file.
ECHO Example: ERRLEV CHKDSK C:
:RUN_ERRLEV
CEnviSet "return(ERRLEV = spawn(P_WAIT,`%1 %2 %3 %4 %5 %6 %7 %8 %9`));"