
  
                         
   ERR2ENV  version 1.0  
                         
  
   


   ERR2ENV will mainly set the current errorlevel to an environment
   parameter (default to ERR_LEVEL). Whenever it is run in a new DOS
   version for the first time, it will work out the actual address
   of the errorlevel for the new version and then store it back to the
   program, so that it will be able to run instantly next time.

   ERR2ENV tries to avaid DOS batch's clumsy way of finding out the
   current errorlevel.


 Ŀ
  AUTHOR: 
 
   Zhuhan JIANG, University of New England, Armidale NSW 2351, Australia
   Email: zjiang@metz.une.edu.au


 Ŀ
  FILES: 
 
   ERR2ENV.ZIP contains the following files

     readme       -   this file
     err2env.exe  -   set entry errorlevel to environment parameter
     err2env.c    -   the C source code


 Ŀ
  FORMAT: 
 
     I.   err2env [/qnx#+#-#[,envpara]]
    II.   err2env "/<>qnx#+#-#t#[,envpara]" [fileout [filein] ]
          where # represents an positive integer

  Format I  is the usual application format. All options must be
            contained in a single string:

      q   - quiet with no non-critical messages
      n   - environment parameter ERR_LEVEL will not be changed
      x#  - exit with errorlevel specified by #
      +#  - exit errorlevel will be the entry errorlevel plus #
      -#  - exit errorlevel will be the entry errorlevel minus #
         - remove stored errorlevel addresses from ERR2ENV.EXE.
            ERR2ENV.EXE can store addresses for upto 100 DOS versions,
            when that is run out (possible?), we can use this option
            to clear off the old version addresses to make space
            for the new ones. But this is quite unlikely, so this
            option should perhaps never be used.
     ,env - set errorlevel to the environement parameter specified
            by "env"

  The order of above options are interchangeable and duplicable.

  Format II is essentially to be called by ERR2ENV.EXE itself. In this
            format, the first three option characters must be "\<>".
            The program will then read addresses from filein and
            write those back to fileout if the values specified by
            the address agrees with the value given via /t#. This
            algorithm is influenced by George A Theall's method in
            ERRLVL12.ZIP

  Examples:
      ERR2ENV /nqx25
            quietly set errorlevel to 25, env para ERR_LEVEL not changed
      ERR2ENV /-1,oldlevel
            set OLDLEVEL to current errorlevel, say 99, exit with
            new errorlevel 98, and display message: errorlevel=(99->98)


 Ŀ
  DISCLAIMER: 
 
   ERR2ENV version 1.0 are provided *AS IS* without any warranty,
   expressed or implied. The author will assume no liability for
   damages either from the direct use of this product or as a
   consequence of the use of this product.

   This package can be freely distributed (FREEWARE).

