set errorlevel with errorlvl.exe
e.g.,  errorlvl #

errlvl.bat "reads" the errorlevel
and set it in the environment 
variable named    errlvl

testerrl.bat tests both, 
invoke at prompt

testerrl #